Next | Unix Command Internals | 30 |
stopafter 30 command arg arg arg...
sudo works similarly:
sudo command arg arg arg...
It runs as root, then prompts for a password, and execs the command if the password is correct
Similarly nice:
nice -10 command arg arg arg...
It sets the nice value and execs the command
Whenever a process tries to access a file, if the path begins with /, the lookup starts at the process's root directory
This is almost always /
But a pointer to the root inode is stored in each process structure
So chroot:
chroot dir command arg arg arg...
chroot sets the root directory inode and execs the command
Subsequent file lookups are interpreted relative to the new root
Next | Copyright © 2003 M. J. Dominus |