5 ms·
> tar xfvz my-source-code.1.2.3.tar.gz Modern tar can detect the format so "tar xfv" is enough. The "v" option only means "verbose" so it's better just "tar
by kanox 7y ago
> tar xfvz my-source-code.1.2.3.tar.gz
Modern tar can detect the format so "tar xfv" is enough. The "v" option only means "verbose" so it's better just "tar xf" and avoid spamming the terminal.
- jandrese 7y agoI always use -v because every so often I find a tarball that was taken from inside of the working directory instead of outside. Of course these days it's not humanly possible to ctrl-c it before it extracts thousands of files and makes cleanup a chore but at least you won't be confused as to what happened when you attempt to cd into the directory later. For that matter knowing what directory to cd into is also a good reason to use -v. Note: If none of your files were clobbered and there are no spaces in the filenames to worry about you can do: tar -tf [tarball] | xargs rm -d Run it repeatedly if you also want to remove the directories.