LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Like to see the output of my script, which get executed during logging. (https://www.linuxquestions.org/questions/linux-newbie-8/like-to-see-the-output-of-my-script-which-get-executed-during-logging-733801/)

pankaj_cw 06-18-2009 01:17 AM

Like to see the output of my script, which get executed during logging.
 
Hi All

I just created one script by name "run_script"
I placed this script at rc.local file, some like this

/root/to/run_script

>does placed the script on right place in right way ?
>where can i see the output of my script ?

chrism01 06-18-2009 01:22 AM

1. right place ? Depends, /etc/rc.local is called once only at system boot up. Is that what you want?
2. To redirect the output

/root/to/run_script >script.log 2>&1

pankaj_cw 07-21-2009 10:21 AM

Like to see the output of my script, which get executed during logging.
 
Quote:

Originally Posted by chrism01 (Post 3577939)
1. right place ? Depends, /etc/rc.local is called once only at system boot up. Is that what you want?
2. To redirect the output

/root/to/run_script >script.log 2>&1


Thanks :-)

jeromeNP7 07-21-2009 04:56 PM

If you need the script to run a login time (instead of boot up time), then it makes more sense to put it into .bashrc or .bash_profile - rc.local is not the proper place for this, I guess.

Linux


All times are GMT -5. The time now is 07:50 AM.