LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 12-01-2004, 09:58 AM   #1
ukrainet
Member
 
Registered: Nov 2004
Posts: 108

Rep: Reputation: 15
What applicability of a file /dev/null


What applicability of a file /dev/null
 
Old 12-01-2004, 10:04 AM   #2
otoomet
Member
 
Registered: Oct 2004
Location: Tartu, Ċrhus,Nürnberg, Europe
Distribution: Debian, Ubuntu, Puppy
Posts: 619

Rep: Reputation: 45
You mean what /dev/null can be used for?

you can e.g. run commands with output sent to /dev/null, so you keep just the return code.

Code:
if which >/dev/null 2>/dev/null rxvt; then
    rxvt &
else
    xterm &
fi
runs rxvt if it exists and xterm otherwise.

best,

Ott
 
  


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
What would happen if I where to cat /dev/mem > /dev/null Joey.Dale Linux - General 11 07-26-2009 01:46 PM
write errors to log file, instead of /dev/null c_r2005 Linux - General 2 07-30-2005 09:34 AM
mv c:\WINDOWS /dev/null; mount /dev/hda treehead LinuxQuestions.org Member Intro 5 10-19-2004 09:53 AM
Switch stdout between /dev/null and a file? gremlin2000 Linux - General 2 06-08-2004 08:12 AM
Switch stdout between /dev/null and a file? gremlin2000 Linux - Newbie 1 06-01-2004 11:13 AM


All times are GMT -5. The time now is 05:59 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