LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Silent tar (https://www.linuxquestions.org/questions/linux-general-1/silent-tar-602563/)

RaduH 11-26-2007 06:18 PM

Silent tar
 
Hi all,

I am running tar to create a tarball and I am not using the verbose option. However, I still get some output. For example:

tar: Removing leading `/' from hard link targets

Any way I could get rid of any output completely? I've read tar--help but haven't seen anything useful. I am running this tar command from inside a script and the output is really annoying me.

Thanks!

pwc101 11-26-2007 06:37 PM

Code:

tar cf your_file.tar /first_dir /second_dir &> /dev/null
should take care of it.

For reference, see: http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-3.html


All times are GMT -5. The time now is 09:35 PM.