Can I verbose output during a copy command processing?
Solution 1
No you can't, but you could use the watch command to look at the destination directory to see how the process is progressing, eg.
watch ls -l /dsc/
Solution 2
This question seems to be old, but for the cp
command you've got the --verbose
option.
So the command works as follows:
cp --verbose -rf /src/ /dsc/
Solution 3
You could always use rsync
instead, you'll atleast get to see the files that are being copied
rsync -rva /src/ /dst/
Of-course this only works before you start copying as an alternative to cp
. The good news is though that rsync will only copy the files it needs to so you can kill your long-running cp
command run the rsync
command and it will pick up where cp
left off.
Solution 4
I propose :
watch du -sh /dsc/
Chen
Updated on September 18, 2022Comments
-
Chen almost 2 years
Situation: If I entered a copy command like
cp -rf /src/ /dsc/
then I am waiting several minutes for copy large directories. I forgot to put-v
flag to verbose an output, Can I do it during copying? -
guy mograbi over 9 yearsPlease add
watch "find . | wc -l"
as well. I found it better since your command only shows one level depth. -
muru about 9 yearsSince this is just an improvement to an existing answer, consider suggesting an edit instead.
-
Orphans over 7 yearssomeone mark this a correct answer
-
merv over 7 yearsThis is ideally what one should have done, but the point of the question was, what can you do to monitor the copy progress if you forgot to do this for a large operation.
-
muon almost 6 yearson mac terminal, this gives
cp: illegal option -- -
-
muon almost 6 yearsalthough
cp -rv
works -
Ali Nobari over 5 years
cp -v -r
will indicate that you want to display files being copied (as specified by-v
), and-r
will indicate that you want to recursively copy files, which will be needed if you are copying any sub-directories.