12.2. UNIX commands from the inside

You can run every external command using system 
but it makes it platform dependant and might have more security implications.

The following calls are available from Perl.
There are more but we won't cover them now.

Table 12-1. UNIX command

  UNIXDOS
unlinkFILENAMErmdel
renameOLDFILE, NEWFILEmvren
chmodMODE, FILEchmod-
chownUID, GID, FILEchown-
chdirDIRNAMEcdcd
mkdirDIRNAME, PERMmkdirmkdir
rmdirDIRNAMErmdirrmdir
linkOLDNAME, NEWNAMEln-
symlinkOLDNAME, NEWNAMEln -s-
readlinkLINKNAMEls -l-
globWILDCARDSls -1dir
opendir, readdir ls -1dir
%ENV, $ENV{HOME}   
my $uid = getpwnam($username);
my $gid = getgrnam($groupname);

If you are interested in on-site trainings by the author, please contact me directly.

Online courses:

Would you like to get
updated when I publish
the next article?

Follow me:

Google Plus Twitter RSS feed