I was executing a script and by measuring the time that he made, i've found that using the -v on some mv commands made it much slower,(all the outputs are redirected to a file) .

So why is the -v (verbose mode) make the execution of a command makes it slower, for example:

mv file.txt newname.txt faster then mv -v file.txt newname.txt when dealing with millions of files ?

  • You can test for yourself by prepending the command to test with time.
    – Murphy
    Oct 17, 2017 at 11:17
  • i've done and the difference is about 30% , i've edited my question.
    – Kingofkech
    Oct 17, 2017 at 11:18
  • 1
    yes. commands are single threaded and spend additional time in tty input/output. not sure about mv, but untaring a huge archive over a slow ssh session is significantly slow
    – myaut
    Oct 17, 2017 at 11:18
  • Capture the output of such a millions of files move and then time how much it takes to just cat that text (ok, or just fake such a mof-move-log file). Maybe trying different terminals will give more insight... will a real text mode terminal be faster compared to move megabytes of to 32bit per pixel rendered text? Lots of research! Game, fun and excitement for the whole family! o;-)
    – user62916
    Oct 17, 2017 at 11:42
  • For large directories like this caching plays a big role. Basically a second (and subsequent) run of mv will be faster than the first, regardless of which has the -v option. Oct 17, 2017 at 11:54

3 Answers 3


When a program runs each time it prints to the file it must communicate with the kernel using IPC. Redirection necessitates this and then the file system must actually write the changes which are buffered. This breaks up the scheduling of the programs run time and must wait a comparatively long time to buffer then simply doing what ever it was doing most of which probably was not IO locked. This is of course only a very general phenomenon and would apply wildly differently from command to command. However it should be true that commands that would be IO locked anyway should be less likely to be that different when executed with verbose flags.


Because being verbose means doing more. And doing more takes longer than doing less.

  • 3
    I'd actually beg to differ on your second statement. For example you can "do less" by traversing an array for a search but it takes a lot less time if you "do more" by first making a hashtable.
    – jdwolf
    Oct 17, 2017 at 13:28

Verbose calls the processing information on terminal which is displayed on the screen, the Channel I/O prompts the buffer cache for space allocation which usually in verbose is overcrowded. This delays the whole process. So, Verbose uses more resources making it slower.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .