LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
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, 08: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, 09: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



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

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:13 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
Open Source Consulting | Domain Registration