Re: I'm sure this is a silly question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Kostas Sfakiotakis wrote:
Greetings ,

Rick Stevens wrote:

< snip >


Put an ampersand after your command to run it in the background. For example, you can type this in console:


gedit &

Now if you close the console, gedit will still be running.



Better yet:

    gedit >/dev/null 2>&1 &

(redirect both stdout and stderr to /dev/null and run program in
background).


Rick, by sending both stdout and stderr to /dev/null wouldn't you
prevent gedit ( or whatever the application is ) from printing an error
message should an error condition, or even an application crash  occur ?

Yes, it would, but so does closing the console. If one needs to save stdout and stderr, they could be directed to files instead of /dev/null or the program could be run under "nohup":

	nohup gedit &

in which case stdout and stderr get sent to "current_dir/nohup.out".
See nohup(1).
----------------------------------------------------------------------
- Rick Stevens, Senior Systems Engineer     rstevens@xxxxxxxxxxxxxxx -
- VitalStream, Inc.                       http://www.vitalstream.com -
-                                                                    -
-    They say when you play a Microsoft CD backwards, you'll hear    -
-   Satanic messages, but if you play it forwards, it will install   -
-           Windows...which means Satan is in your system.           -
----------------------------------------------------------------------


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux