Kirubakraran :
I want to display the number of files which are copied from one directory to other while doing "CP"command. what could be the command to add to it.
Dominique :
According to cp
man-pages, there is the -v
parameter, which shows what is being done. This can be processed as in following simple example:
Normal usage of cp -v
:
Prompt$ cp -v .bash_history /dev/null
'.bash_history' -> '/dev/null'
Now, with some processing (counting):
Prompt$ cp -v .bash_history /dev/null | wc -l
1