Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
With latest tar versions, you can actually do
tar xf <filename>
And it'll work out the decompression method by file extension for you. -
hell169537y-x extract
-c compress
-z gzip
-j bzip
-v verbose
-f file
Thats how I remember it π -
Shodan4987yI'm gonna go out on a limb here and say that this is one of the use cases that 'alias' was invented for.
-
@azous bzip being a j flag is self documenting. Don't know why people have so much trouble. Lol
-
devnope5697y-j is xz
-z s gzip
-c is create archive
-x is xtract te archive
That's how this stuff works -
shine9696yWith my experience in the terminals, I've learnt to use the long options and make a sentence / story out of it for all the commands that I use.
tar --create (a) --gzip (archive with) --file <archive-name.tar.gz> (using the files) files/*
ls (with) --human -lt (those 2 don't have long options) (in) --reverse
sort (in) --human (form)
du (in) --human (form with) --max-depth 1
I've always struggled with the find command (which is probably also where this storyfication of commands originated)
find (files in) <directory> (with the) -name '<*whatever-name*>' (in a) -maxdepth (of) 1 (that has) -perm /<permission-mode> (that is an) -executable (which is) -newer (than) <some-file> (and is owned by the) -user <username> (and then) -delete (it).
To end that beautiful story, I sometimes combine it with the stories I mentioned above too with -exec flag.
PS : most of this doesn't work out of the linux environment (I'm looking at you BSD and macOS)
#mindhacks π
joke/meme