LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 09-10-2012, 03:38 AM   #1
RandyTech
Member
 
Registered: Oct 2010
Posts: 47

Rep: Reputation: 1
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

Last edited by RandyTech; 09-10-2012 at 04:06 AM. Reason: Mark as 'solved'
 
Old 09-10-2012, 03:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
can you not just chuck stderr to /dev/null?


find /u/temp -print | cpio -ovB -Hcrc >/u/test.cpio 2> /dev/null
 
Old 09-10-2012, 04:04 AM   #3
RandyTech
Member
 
Registered: Oct 2010
Posts: 47

Original Poster
Rep: Reputation: 1
Thanks acid_kewpie ... that did the trick. 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
 
Old 09-10-2012, 04:24 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
Ahh well by pushing 2>&1 you're redirecting the debug data into the raw cpio output and buggering it all up royally!
 
Old 09-16-2012, 03:58 AM   #5
ruario
Senior Member
 
Registered: Jan 2011
Location: Oslo, Norway
Distribution: Slackware
Posts: 2,175

Rep: Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172Reputation: 1172
Quote:
Originally Posted by RandyTech View Post
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

Last edited by ruario; 09-16-2012 at 05:33 AM. Reason: added example; cleaned up; added link to manual
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
cpio -idcmv command hanged while extracting .cpio command ravindra.atre Linux - General 2 08-22-2011 05:10 AM
How to use cpio to extract a cpio archive? linx win Debian 4 06-17-2005 02:53 PM
how to run cat command in silent mode user_linux Linux - Newbie 4 06-16-2005 11:21 AM
gv display/print question provkitir Linux - Software 2 11-29-2004 01:22 AM
print a long-width display using cgi.pm john lee Programming 0 08-04-2004 03:47 AM


All times are GMT -5. The time now is 12:44 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration