tar in Ubuntu
November 4, 2007
I’m taking a Linux class and we’re learning about Red Hat and Ubuntu at the same time.
One of the first tasks was to become familiar with tar.
Maybe I’m stating the bleeding obvious, but …
I’m sure most people out there have already figured this out, but it wasn’t obvious (and I couldn’t find explicit documentation anywhere that stated) that the -f switch (for file name in tar) had to be the last argument before the file name.
so:
tar -cfpvz filename.tgz /home/username
will fail; calling the file name “pvz”
Red Hat doesn’t seem to care about the order, but for new converters to Ubuntu, you’ll have to put the f last.
tar -cpvzf filename.tgz /home/username
