3 ms·
While aliases may be great for saving time typing, you can use them to steal from yourself the opportunity to learn how unix commands like 'tar' work. Frankly,
by belovedeagle 13y ago
While aliases may be great for saving time typing, you can use them to steal from yourself the opportunity to learn how unix commands like 'tar' work. Frankly, tar should never seem like an "incantation", because most of the flags are there as shortcuts. From your example, -f and -z are shortcuts for certain pipes and redirects. 'tar -xzvf file.gz' is equivalent to 'zcat file.gz | tar -xv'; and of course the -v is unnecessary so you have 'zcat file.gz | tar x', which is a lot clearer than 'untar', which won't work for tar.bz2 files, or even plain old .tar files (but, just switch zcat to bzcat and you're golden).
- danneu 13y agoI feel like everyone who has responded to me so far plugged that coax cable from The Matrix into the back of their brain stem one day and just downloaded Everything Unix. I don't really relate to a single comment. I call it an incantation because you're on your couch eating a frozen meal at 7:30pm on a Tuesday night with your laptop in front of you. The TV is on, but it's muted so it sits in the limbo between a social coping device and a distraction for the few hours you have between the commute from work and bedtime. Yeah, one day you want to learn more about Unix and tar and how electrons flow on a circuit board and maybe what gravity is -- like, what it really is --, but tonight you just want to get nginx set up for the first time on your linode so it can serve your hand-rolled blog and move the needle just enough so you feel like you're making some progress in life. You've managed to use `wget` to download nginx-1.2.9.tar.gz onto your VPS. And all you want to do next is get the files out of tar.gz. You'd love to right click it and select "Uncompress" from a context menu, but it's in a terminal window. For now you just google "ubuntu uncompress tar", click the first result, and copy the incantation into .bashrc aliased to `untar` for future reference before pressing forward into the abyss.