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
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