Skip to content

Instantly share code, notes, and snippets.

@tensorfields
Last active December 10, 2015 14:29
Show Gist options
  • Save tensorfields/4447957 to your computer and use it in GitHub Desktop.
Save tensorfields/4447957 to your computer and use it in GitHub Desktop.
Progress bars for common fs ops
# Commands: mv and cp
# You can alias these to the standard `mv` and `cp` commands
# For safety, I call them something else.
# Requires: rsync
alias rscp='rsync -aP'
alias rsmv='rsync -aP --remove-source-files'
# Commands: dd
# You could make an alias out of this, but be careful when using it!
# $size is the size of the input file (e.g. 1024K, 4096M, etc)
# Requires: dd, pv
$ dd if=/path/to/file1 2>/dev/null | pv -tpreb -s $size | dd of=/path/to/file2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment