chroot(1M) DG/UX 4.31 chroot(1M)
NAME
chroot - change root directory for a command
SYNOPSIS
/etc/chroot newroot command
DESCRIPTION
Chroot executes command relative to newroot. After executing
chroot, the initial slash (/) in subsequent pathnames is
changed to the new root directory you specify. newroot
becomes the initial working directory.
The new root is always relative to the current root. If a
chroot is currently in effect (for example, a sh or csh
command), newroot is relative to the current root of the
running process, not the original root (/).
Changing the root for command does not change the root for
chroot. Thus, I/O redirection is relative to the old root
directory.
Only the superuser can use the chroot command.
EXAMPLES
/etc/chroot /usr/alex/test /grep pattern /file1 > grep.out
/usr/alex/test/grep pattern /usr/alex/test/file1 > grep.out
These two lines are equivalent. Note that I/O redirection
is relative to the original root, not the new one.
SEE ALSO
chdir(2), chroot(2).
NOTE
Be careful if you wish to reference special files in the new
root file system. Unless the new root is /dev or you have
copies of the /dev files within the range of the new root,
these special files will be inaccessible.
Licensed material--property of copyright holder(s) Page 1