I got an error when I append > /dev/null
to tar command, anyone know what's going on in second example?
good:
tar -cvf $kname /var/www
bad:
tar -cvf $kname /var/www > /dev/null error:tar: Removing leading `/' from member names
tar: Removing leading `/' from member namesThis is a simple warning to tell you that it is writing a tar file without absolute paths. This is because you cannot then relocate the data at a later date when you unarchive the file. Most people simply ignore this warning.
$ tar xvzf file.tar.gz. 5. Creating compressed tar archive file in Linux using option -j : This command compresses and creates archive file less than the size of the gzip. Both compress and decompress takes more time then gzip.
The GNU tar (short for Tape ARchiver) command is the most widely used archiving utility in Linux systems. Available directly in the terminal, the tar command helps create, extract, and list archive contents.
The "good" version is also displaying the same message you've just missed it.
If you don't like the behaviour, search for "leading", in manual. First hit:
-P, --absolute-names don't strip leading '/'s from file names
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With