LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Want cpio to run silent -- no print to display [SOLVED] (https://www.linuxquestions.org/questions/linux-newbie-8/want-cpio-to-run-silent-no-print-to-display-%5Bsolved%5D-4175426468/)

RandyTech 09-10-2012 02:38 AM

Want cpio to run silent -- no print to display [SOLVED]
 
Is there a way to get cpio to ... SHUT UP!!!? :)
Doing something like this for a test:

find /u/temp -print | cpio -ovB -Hcrc >/u/test.cpio

I've tried the --quiet option but that does not stop cpio from filling the screen with a list of all the contents in the temp path. I don't want any progress display. Just want cpio to do the deed and stay silent about the whole process. Google not being my friend on this search :(

acid_kewpie 09-10-2012 02:46 AM

can you not just chuck stderr to /dev/null?


find /u/temp -print | cpio -ovB -Hcrc >/u/test.cpio 2> /dev/null

RandyTech 09-10-2012 03:04 AM

Thanks acid_kewpie :doh: ... that did the trick. :hattip: I tried similar but had it turned around like this and cpio complained too many arguments:

find /u/temp -print | cpio -ovB -Hcrc >/u/test.cpio >/dev/null 2>&1


Your solution (this) works great!!:

find /u/temp -print | cpio -ovB -Hcrc >/u/test.cpio 2> /dev/null

acid_kewpie 09-10-2012 03:24 AM

Ahh well by pushing 2>&1 you're redirecting the debug data into the raw cpio output and buggering it all up royally!

ruario 09-16-2012 02:58 AM

Quote:

Originally Posted by RandyTech (Post 4776633)
Is there a way to get cpio to ... SHUT UP!!!? :)
Doing something like this for a test:

find /u/temp -print | cpio -ovB -Hcrc >/u/test.cpio

I've tried the --quiet option but that does not stop cpio from filling the screen with a list of all the contents in the temp path. I don't want any progress display. Just want cpio to do the deed and stay silent about the whole process. Google not being my friend on this search :(

If you don't want it to print the file listing, why are you using specifically telling cpio to do so with -v (verbose)? I'm not sure how you had trouble finding this. Forget Google if you started by reading the man/info page or the options section of the online cpio manual you would have seen that -v is to "List the files processed". ;)

Remove the -v to get rid of the list and add --quiet (to prevent the summary of blocks copied from being printed).

EDIT: What you wanted was this:

Code:

find /u/temp -print | cpio -oBHcrc --quiet >/u/test.cpio


All times are GMT -5. The time now is 09:10 AM.