LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 06-18-2009, 01:17 AM   #1
pankaj_cw
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Rep: Reputation: 0
Question 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 ?
 
Old 06-18-2009, 01:22 AM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
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
 
Old 07-21-2009, 10:21 AM   #3
pankaj_cw
LQ Newbie
 
Registered: Jun 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Smile Like to see the output of my script, which get executed during logging.

Quote:
Originally Posted by chrism01 View Post
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 :-)
 
Old 07-21-2009, 04:56 PM   #4
jeromeNP7
Member
 
Registered: Jun 2009
Posts: 101

Rep: Reputation: 19
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

Last edited by jeromeNP7; 09-04-2009 at 09:11 PM.
 
  


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
Getting location of the script which is currently being executed jiju.jacob Linux - Newbie 4 07-21-2008 05:48 AM
Logging a script output ZAMO Linux - General 7 05-21-2008 06:35 AM
script executed inside another script dont make changes potraike Linux - Newbie 4 03-05-2008 05:27 AM
hotplug script executed 3 times Borelian Linux - Software 1 06-28-2004 11:46 PM
getting output from a program executed from c++ dfuse Programming 6 08-22-2003 02:24 AM

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

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