Skip to content

Instantly share code, notes, and snippets.

@ereli
Created July 2, 2018 20:54
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 ereli/6f5874c8c46509299721f5c3f462f930 to your computer and use it in GitHub Desktop.
Save ereli/6f5874c8c46509299721f5c3f462f930 to your computer and use it in GitHub Desktop.
tar every folder in the current directory
for file in (find . -maxdepth 1 -type d)
tar -v --remove-files -cSf (basename $file).tar (basename $file)/
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment