Skip to content

Instantly share code, notes, and snippets.

@rajatvikramsingh
Last active February 17, 2017 02:11
Show Gist options
  • Select an option

  • Save rajatvikramsingh/1bb137cde1f89da1ce4e8c45a9bfa5be to your computer and use it in GitHub Desktop.

Select an option

Save rajatvikramsingh/1bb137cde1f89da1ce4e8c45a9bfa5be to your computer and use it in GitHub Desktop.
Watch the filesize of a file you're downloading in Terminal

Recently I needed to watch the size of a file I was downloading and see how the size was increasing. I came across the command watch on unix. According to manpage of watch:

watch - execute a program periodically, showing output fullscreen

Sample Usage:

watch -n 5 "du -h <file name>"

Sample Output: (fullscreen)

Every 5.0s: du -h ./<file name>                                                         Wed Feb 15 20:36:48 2017

2.5G    ./<file name>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment