grub.conf
Vivek J. Patankar
list307 at gmail.com
Wed Jul 11 16:18:51 UTC 2007
Luciano Rocha wrote:
> Is the program graphical? If not, then a line with:
>
> su - -s /bin/sh user -c "program" < /dev/null &> /var/log/program.log &
>
> in /etc/rc.local will take care of it.
What is the role played by /dev/null here? I tried the command with
/dev/null and without. The behavior was the same.
[root at marvin ~]# su - veejay -s /bin/sh -c "tar cvf
/home/veejay/test.tar /home/veejay/test" < /dev/null &>
/home/veejay/test.log &
[root at marvin ~]# ll /home/veejay/test.*
-rw-r--r-- 1 root root 46767 2007-07-11 21:34 /home/veejay/test.log
-rw-r--r-- 1 veejay users 10414080 2007-07-11 21:34 /home/veejay/test.tar
[root at marvin ~]# su - veejay -s /bin/sh -c "tar cvf
/home/veejay/test.tar /home/veejay/test" &> /home/veejay/test.log &
[root at marvin ~]# ll /home/veejay/test.*
-rw-r--r-- 1 root root 46767 2007-07-11 21:42
/home/veejay/test.log
-rw-r--r-- 1 veejay users 10414080 2007-07-11 21:42 /home/veejay/test.tar
--
Regards,
विवेक ज. पाटणकर (Vivek J. Patankar)
Registered Linux User #374218
Fedora release 7 (Moonshine)
Linux 2.6.21-1.3228.fc7 x86_64
More information about the fedora-list
mailing list