4 ms·
This is awesome, I ALWAYS have to google for how to untar an archive (I don't do it often enough to commit to memory) thank you!
by joshstrange 8y ago
This is awesome, I ALWAYS have to google for how to untar an archive (I don't do it often enough to commit to memory) thank you!
- zzo38computer 8y agoThere are man pages though, but still I suppose that might be useful to you. Anyways, the only options for tar that I commonly use are "c", "x", and "t"; I will use other programs for decompression, and for extracting into a directory, will use cd.
- acqq 8y agoIf the man pages had useful examples the “cheat sheets” would not be needed. So “duh use man pages” is a wrong and annoying answer in this context.
- zzo38computer 8y agoYes, I suppose you are right, the man pages do not have sufficient examples. So, it is good that they add more there. (The man page still explains what all of the options are; now we have this "cheat sheets" with the examples, too.)
- borplk 8y agotar czvf "create ze vucking file" tar xzvf "extract ze vucking files"
- ericnyamu 8y agoLol.
- stevekemp 8y agoI have an alias "x" setup to run: atool --extract $* That will unpack "anything", into a sub-directory if necessary. Something I use more than any other alias.
- aug-riedinger 8y agoI have: function extract () { if [ -f $1 ] ; then case $1 in *.tar.bz2) tar xjf $1 ;; *.tar.gz) tar xzf $1 ;; *.bz2) bunzip2 $1 ;; *.rar) unrar e $1 ;; *.gz) gunzip $1 ;; *.tar) tar xf $1 ;; *.tbz2) tar xjf $1 ;; *.tgz) tar xzf $1 ;; *.zip) unzip $1 ;; *.Z) uncompress $1 ;; *.7z) 7z x $1 ;; *) echo "'$1' cannot be extracted via extract()" ;; esac else echo "'$1' is not a valid file" fi } instead