< Perl Programming < Keywords

The chroot keyword

chroot works like the same system call on UNIX, by changing root directory for all pathnames that start with a / and all of its children to FILENAME. This system call can only be run by the superuser. Without FILENAME, the contents of $_ are used.

Syntax

  chroot FILENAME
  chroot

Examples

  chroot $filename;
  chroot /usr
This article is issued from Wikibooks. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.