LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   1+0 records in how to disiable in DD command "1+0 records out" (https://www.linuxquestions.org/questions/linux-software-2/1-0-records-in-how-to-disiable-in-dd-command-1-0-records-out-535577/)

Kotresh 03-07-2007 10:55 PM

1+0 records in how to disiable in DD command "1+0 records out"
 
hi
if i use DD command then it is giving me
1+0 records in
1+0 records out

but i dont want this to display.plz help me to disable this one


Regards
Kotresh

timmeke 03-08-2007 02:24 AM

You could redirect stdout to /dev/null:
Code:

dd ... > /dev/null
You'll still get the messages on stderr, but not those on stdout.

Quigi 03-08-2007 08:54 AM

Quote:

Originally Posted by timmeke
You could redirect stdout to /dev/null:

Timmeke, on what version of dd did you try this out?
The ones I test (dd (coreutils) 5.93 and dd (coreutils) 5.2.1) write the summary to stderr. In that case you need to redirect stderr -- either of
Code:

dd ... >& /dev/null              for (t)csh, or
dd ... 2> /dev/null              for (ba)sh.

depending on your shell.

timmeke 03-08-2007 08:57 AM

I didn't actually test it. I assumed it would print on stdout, as normal tools do.


All times are GMT -5. The time now is 06:50 AM.