Linux Blog

File Transfer Disk Space Tip

Filed under: General Linux,Quick Linux Tutorials — TheLinuxBlog.com at 6:44 pm on Monday, December 12, 2011

Disk Space TipI recently got a new computer. Part of the upgrade process was backing up and moving a large amount of data off of my old PC and onto my NAS so that I could sort through it later. One of the annoying things about copying files is it’s difficult to really know how long its going to take, either way I still like to monitor progress when copying or rsyncing data. This post shows two methods of checking your transfer status without the GUI.

Everyone knows about using the disk usage utility in the terminal:

~$ du -h Downloads/
~$ du -hs Documents/

This works great, but not so well when you have large directories. A better way to monitor file progress, providing you are not doing anything else on that partition is to use the disk free utility, df.

~$ df -h

As long as you know what your disk space was when you started, and the size of the files you are trying to transfer, you can quickly figure out if you’re close or not by subtracting the two.

Hope this helps!

Image Source: http://www.flickr.com/photos/sharynmorrow/3717487309/

Man Pages for commands in this post »

du
df
rsync

1 Comment »

Comment by george

December 13, 2011 @ 4:34 am

yes df -h is a much better option, and the reason is that it takes almost no time to complete, compared to du that can take forever, especially when dealing with huge numbers of small files.

RSS feed for comments on this post. TrackBack URI

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>