Skip to content

Instantly share code, notes, and snippets.

@leveled
Created February 7, 2022 12:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leveled/9ee0ea9fb21cf235bab7a885af27b2e8 to your computer and use it in GitHub Desktop.
Save leveled/9ee0ea9fb21cf235bab7a885af27b2e8 to your computer and use it in GitHub Desktop.
tar show progress
# Linux
tar cf - /folder-with-big-files -P | pv -s $(du -sb /folder-with-big-files | awk '{print $1}') | gzip > big-files.tar.gz
# MacOS
tar cf - /folder-with-big-files -P | pv -s $(($(du -sk /folder-with-big-files | awk '{print $1}') * 1024)) | gzip > big-files.tar.gz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment