Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
The nohup tells it not to hang up when a terminal closes and is likely not necessary if this is started in the background since no terminal is there. The >logfile redirects standard output to logfile. The 2>&1 redirects standard error to standard output which was already redefined as logfile. You can substitute the path and name of the file you want to log to for logifle in the above. The final ampersand (&) tells it to background the process (which again may not be necessary if you're starting it from a background process.
I don't know of a command called "start-stop-daemon".
Which distribution and version of Linux are you using?
What does "which start-stop-daemon" output?
What does "file $(which start-stop-daemon)" output?
In general though for most programs you can redirect stdout/stderr as I indicated even if the program takes input. If for example start-stop-daemon expected you to put a daemon (for example sshd) you might try:
start-stop-daemon sshd >/var/log/sshd_log 2>&1
Note that I am not saying it can be used that way because as I noted I don't know what this command is. Assuming it isn't a script someone there wrote it may have a man page or an info page (or both). Typing "man start-stop-daemon" or "info start-stop-daemon" might give you more details including what the command allows to be redirected (or what it doesn't).
Last edited by MensaWater; 05-11-2012 at 08:16 AM.