[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Measure "cp" Speed?

>> I am wondering, how do I measure the speed while I am doing cp
> command?
> Sadly, no one seems to want to give you a straight answer...

Why? I told him that he could use the "time" command. It is made just
for this purpose. Of course, Google would have gotten him an answer 3
hours ago, but I told him about the time command only minutes after I
suggested 3e8.

> Try looking into the rsync command. If you read the man pages, there is
> a --progress flag that you can use. This will tell you the stats as it
> copies.
> `rsync --progress /file/to/copy /destination/path`

He asked for speed, not progress, which implies benchmarking.

> If you read the man pages on rsync, there are a few other flags that
> might work for better output depending on what you want/need.
> As someone else pointed out, there is the time command as well, but it
> will only give the time _after_ it has finished.
> `time cp /file/to/copy /destination/path`

Ah, you do relate to that. Thanks.

> Lastly, if you do the copy within Gnome using Nautilus (and pretty sure
> KDE has it to) it will show you the progress and time remaining. I don't
> know what it uses on the backend to give these stats as I have never
> looked into it.

On KDE at least, it is calculated internally.

Dotan Cohen



Reply to: