Command executing to be in the background !


 
Thread Tools Search this Thread
Operating Systems AIX Command executing to be in the background !
# 1  
Old 12-21-2010
Command executing to be in the background !

Guys

I'm working to make in AIX script and I have some commands need to be excited by that script

Like the below commands ...

startsrc -s sshd


I want that executing to be in the background of the system I do not like to see the out put of that

# 2  
Old 12-21-2010
to run in background :
Code:
startsrc –s sshd &

also
Code:
man nohup

# 3  
Old 12-21-2010
... or even redirect the output from the script/commands to /dev/null:-

Code:
startsrc -s sshd >/dev/null 2>&1

The service is started as a deamon anyway.

What is so wrong with the output? Could this be started at system boot instead? The output would go to the console only then and you could set it to run before the console login prompt, so it will roll off natually.




Robin
Liverpool/Blackburn
UK
# 4  
Old 12-21-2010
Quote:
Originally Posted by Mr.AIX
I want that executing to be in the background of the system I do not like to see the out put of that
If your target is not to display output of this command on screen then rbatte1's solution is correct. However suggested by ctsgnb, running command in background like this will display the output also if there is any.
R0H0N
Login or Register to Ask a Question

Previous Thread | Next Thread

9 More Discussions You Might Find Interesting

1. Linux

Not able to put ls -lR command in background

Hi All, i am trying to put ls -lRt command to run in the background but it fails. i continue to get output on screen and didnt get the command prompt right after i put the command in background. command i am using is ls -lRt & i am using bash. Can someone let me know how to... (6 Replies)
Discussion started by: omkar.jadhav
6 Replies

2. Shell Programming and Scripting

Executing a background script using ssh keys

Greetings, i've been working with a user-friendly menu on ksh to allow users execute scripts located on a remote server, so they wont have to login and manually launch those scripts every single time. This is a HP-UX box and currently on a /usr/bin/ksh shell. I've setup ssh keys on both... (1 Reply)
Discussion started by: nbriozzo
1 Replies

3. Solaris

running command in background

hi all i am running following command ufsdump 0ubf 512 /dev/rmt/0cbn /database/backup2/rman_backup/level1 >> /database/backup2/backup_tape/level1_rman_03aug12 2>&1; i want to run it in background how can i do it in this i am generating logs for backup. the problem occurs when i am... (3 Replies)
Discussion started by: nikhil kasar
3 Replies

4. UNIX for Advanced & Expert Users

stopped(sigttou) error while executing a script in background

Hi All, I have an issue where in when i execute a script in the background using '&', it exits with stopped(SIGTTOU) signal. There are two servers, where the Compute server is HP-Unix and Data server is Linux. I tried using the "stty - tostop" command to disable the SIGTTOU for background... (1 Reply)
Discussion started by: vmenon
1 Replies

5. Shell Programming and Scripting

Run command in background thru script

Dear All, Writing a script in which I want to run a command in background and keep it running even script is finished. I have tried like below, `truss -p <pid> >> & /tmp/log &` But doesnt work.. script goes running and nothing in log file. (7 Replies)
Discussion started by: Deei
7 Replies

6. UNIX for Dummies Questions & Answers

several command in background

hi everyone! I would like to know if someone can tell me how to run several command in background on one line. I already tried thisi: cmd1 &; cmd2 &; cmd3 & --->produce an error syntax cmd1 ; cmd2 ; cmd3 & --->don't execute in bg cmd1 & cmd2 & cmd3 & --->execute... (1 Reply)
Discussion started by: Eti38
1 Replies

7. Shell Programming and Scripting

A puzzle with a printing function executing in background

Somebody on a thread in the (french) Mandriva Forum recently suggested a script, designed to provide a tool to display kind of "temporisation widgets" on the console (to be ultimately pasted in other more complex scripts). One version of this script was something like the following, which seems... (6 Replies)
Discussion started by: klease
6 Replies

8. UNIX for Dummies Questions & Answers

Executing a sequence of commands as a single background process

I'm writing a PHP script which will take a given media file and convert it into a flash (flv) file. In addition to this, once the flv file has been generated I create two thumbnails (of different sizes) from the newly generated flv file. In order to do this I'm calling ffmpeg from the command... (4 Replies)
Discussion started by: phatphug
4 Replies

9. Shell Programming and Scripting

recording command outputs in background

For example: % ls /store > list.txt % less list.txt % 1.txt % 2.txt I want to execute 'ls' in verbose and store the result in background to 'list.txt' so i dont have to execute another command just to view the contents of the 'list.txt' % ls /store > list.txt % 1.txt % 2.txt %... (2 Replies)
Discussion started by: jehrome_rando
2 Replies
Login or Register to Ask a Question