- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Redirect out put to ?
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-24-2006 12:11 AM
тАО11-24-2006 12:11 AM
Just a dozen or so more questions!
How would I redirect this out put to null?
# ./demo_finish_recovery.sh
mv: /fpc/archivelog: rename: Device busy
mv: /fpc/data: rename: Device busy
Solved! Go to Solution.
- Tags:
- redirect
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-24-2006 12:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-24-2006 12:21 AM
тАО11-24-2006 12:21 AM
Re: Redirect out put to ?
> /dev/null
This only errors :
2> /dev/null
regards,
ivan
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2006 06:41 AM
тАО11-26-2006 06:41 AM
Re: Redirect out put to ?
The std files all have the same numbering convention: 1=stdin 2=stdout 3=stderr, so to get rid of just the error messages, use 2>/dev/null where 2=stderr, > menas to redirect and /dev/null is the bit-bucket. If you want normal as well as error messages to be redirected, you can do it two ways:
./demo_finish_recovery.sh 1>/dev/null 2>/dev/null
./demo_finish_recovery.sh 1>/dev/null 2>&1
The first form is straightforward, but the second has a shorthand: 2>&1 which means redirect file #2 into file #1 (which has been already redirected to /dev/null). The redirection must be in the order shown. Note that 1>/dev/null and >/dev/null are equivalent.
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-26-2006 10:20 AM
тАО11-26-2006 10:20 AM
Re: Redirect out put to ?
The numbering of the standard file descriptors opened by every standard Unix program are 'stdin' = 0, 'stdout' = 1 and 'stderr' = 2, respectively.
While Bill's examples are correct, he inadvertantly counted from one in associating their names with numbers.
Well-behaved Unix programs use STDERR to report warnings and/or errors leaving STDOUT to the expected output.
When both streams are mixed, STDERR is unbuffered while STDOUT is normally buffered. The presence of a newline character causes the current STDOUT buffer to be flushed. This is useful to remember, particularly in cases where you build output lines from several 'printf' statements with only the last one injecting a newline character.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2006 10:59 AM
тАО11-27-2006 10:59 AM
Re: Redirect out put to ?
Bill Hassell, sysadmin
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО11-27-2006 11:42 AM
тАО11-27-2006 11:42 AM
Re: Redirect out put to ?
Of course while you are there, you may want to capture the error output and do something if mv fails.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО12-12-2007 10:20 AM
тАО12-12-2007 10:20 AM