Skip to content

Instantly share code, notes, and snippets.

@eminorhan
Last active May 11, 2021 15:19
Show Gist options
  • Save eminorhan/eb8d983ca508637e83c9977282f2a96c to your computer and use it in GitHub Desktop.
Save eminorhan/eb8d983ca508637e83c9977282f2a96c to your computer and use it in GitHub Desktop.
(1) go through all tar files in a directory, (2) untar them to their own subdirectory, (3) delete the tar file
for a in `ls -1 *.tar`; do mkdir ${a%.*}; tar -xf $a -C ${a%.*}; rm -f $a; done &
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment