- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Redirect output to /dev/null
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
Forums
Discussions
Discussions
Discussions
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
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
03-03-2004 12:32 AM
03-03-2004 12:32 AM
I am looking for examples on how to redirect output to /dev/null. Currently, we use
> /dev/null 2>&1
But I though I remember a shorter version of this with two && in the syntax?
Any of you gurus know the syntax?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 12:47 AM
03-03-2004 12:47 AM
Re: Redirect output to /dev/null
I dont see how with &&: && means what follows (&&) will be executed only if the preceding instructions complete without errors (return a 0 value)
All the best
Victor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 12:55 AM
03-03-2004 12:55 AM
Re: Redirect output to /dev/null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 12:56 AM
03-03-2004 12:56 AM
Re: Redirect output to /dev/null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 01:05 AM
03-03-2004 01:05 AM
Re: Redirect output to /dev/null
>/dev/null 2>&1
Rgds...Geoff
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 01:07 AM
03-03-2004 01:07 AM
Re: Redirect output to /dev/null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 01:23 AM
03-03-2004 01:23 AM
Re: Redirect output to /dev/null
Mark Syder (like the drink but spelt different)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 01:28 AM
03-03-2004 01:28 AM
Re: Redirect output to /dev/null
I hope you have a lot of patience because you will be studying those notes for some time.
How much shorter can it be! You need to have the "/dev/null" in there somewhere which leaves us 6 compulsory characters if we are also re-direct the standard error. Even you reduce this syntax by 50% you are only going to save three characters. However, if you like, do this
"ln /dev/null /n"
Thereafter, your syntax could be
>/n 2>&1
This gets it much shorter.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 02:09 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 02:14 AM
03-03-2004 02:14 AM
Re: Redirect output to /dev/null
this still would be
command &>- 2>&1
greetings,
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 02:17 AM
03-03-2004 02:17 AM
Re: Redirect output to /dev/null
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 02:24 AM
03-03-2004 02:24 AM
Re: Redirect output to /dev/null
I see, what you mean. a programme that does get it's stdout closed might abort or burden the cpu.
Michael
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2004 02:44 AM
03-03-2004 02:44 AM