Main Menu

friends

Latest articles

Hello World in Fortran
29/12/2009 | mad mad mod

This article describes how to write, compile and execute a "Hello World" program in Fortran on Linux (RedHat / Centos / Fedora).  1. the prerequisitesa text editor of your choice (e.g. vi)a Fortr [ ... ]


very simple folder encryption with ecryptfs
27/09/2009 | mad mad mod

Sometimes you want to protect some of your files from unauthorized access. One option is use a cryptographic filesystem like ecryptfs. "eCryptfs is a POSIX-compliant enterprise-class stacked cryptogra [ ... ]


Other Articles
Facebook MySpace Twitter Digg Delicious Stumbleupon Google Bookmarks 

Designed by:
SiteGround web hosting Joomla Templates
How to run a command in the background or after you exit from a shell prompt E-mail
sysadmin

Solution 1: use "nohup"

 

example:

[root@blackmod ~]# nohup sleep 1234 &
nohup: ignoring input and appending output to `nohup.out'
[1] 2800
[root@blackmod ~]# exit
logout

 

logon again and check the sleep process with ps:

[root@blackmod ~]# ps -Fp 2800
UID        PID  PPID  C    SZ   RSS PSR STIME TTY          TIME CMD
root      2800     1  0  1331   476   0 06:54 pts/1    00:00:00 sleep 1234

 

A nice way to monitor the output of a nohup command ist to use tail -f:

[root@blackmod ~]# nohup find / -name test &
nohup: ignoring input and appending output to `nohup.out'
[1] 2909
[root@blackmod ~]# tail -f nohup.out

/test/myfile

/test/myfilex

 

 

Solution 2: use "at"

 

To submit a command with "at" you just have to echo your command and pipe it to at:

 

[root@blackmod ~]# echo sleep 11111 | at now
job 1 at 2010-03-10 07:01

exit

 

logon again and check the sleep process with ps:


[root@blackmod ~]# ps -ef | grep 11111
root      2942  2941  0 07:01 ?        00:00:00 sleep 11111

 

 

Comments (0)
Write comment
Your Contact Details:
Comment:
[b] [i] [u] [url] [quote] [code] [img]   
:D:angry::angry-red::evil::idea::love::x:no-comments::ooo::pirate::?::(
:sleep::););)):0
Security
Please input the anti-spam code that you can read in the image.

!joomlacomment 4.0 Copyright (C) 2009 Compojoom.com . All rights reserved."

 
mad mad mod, Powered by Joomla! and designed by SiteGround web hosting