NAME

Unix::Sysadmin::Cmds - Unix commands base class


SYNOPSIS

 use Unix::Sysadmin::Cmds;
 use Unix::Sysadmin::Cmds::FreeBSD;
 use Unix::Sysadmin::Cmds::OpenBSD;
 use Unix::Sysadmin::Cmds::SunOS;
 use Unix::Sysadmin::Cmds::Linux;
 $cmds = Unix::Sysadmin::Cmds->new();
 $fbsdcmds = Unix::Sysadmin::Cmds::FreeBSD->new();
 $obsdcmds = Unix::Sysadmin::Cmds::OpenBSD->new();
 $suncmds = Unix::Sysadmin::Cmds::SunOS->new();
 $linuxcmds = Unix::Sysadmin::Cmds::Linux->new();
 return Cmds:: objects of the appropriate type


DESCRIPTION

This class describes generic Unix commands. Subclasses describe command specific to various *nix flavors. Currently four OS varieties are supported. They are FreeBSD, OpenBSD, SunOS (Solaris) and Linux. Commands values are the fully qualified path to a given command under a given OS. Commands are referenced with ``tags'', which are generally the name of the command in uppercase. For example, the command with tag ``SSH'' might have the value ``/usr/local/bin/ssh''.


Constructors

new()

      Returns an object of the specified type.


Properties

cmd()

Given a supported tag, returns the path to the command. For example, $cmd->cmd("UNAME" might return ``/usr/bin/uname''.

cmds()

Prints a list of command tags and their values. The base class provides the following generic values:

 CAT => "/bin/cat",
 CHMOD => "/bin/chmod",
 CHOWN => "/bin/chown",
 CP =>"/bin/cp",
 DIFF => "/usr/bin/diff",
 ECHO => "/bin/echo",
 GREP => "/bin/grep",
 HOSTNAME => "/bin/hostname",
 KILL => "/bin/kill",
 LN => "/bin/ln",
 LS => "/bin/ls",
 MAKE => "/usr/bin/make",
 MKDIR => "/bin/mkdir", 
 MV => "/bin/mv",
 PS => "/bin/ps",
 RCP => "/bin/rcp",
 RM => "/bin/rm",
 RSH => "/usr/bin/rsh",
 SH => "/bin/sh",
 SCP => "/usr/local/bin/scp",
 SSH => "/usr/local/bin/ssh",
 TEST => "/bin/test",
 UNAME => "/usr/bin/uname",
 WC => "/usr/bin/wc",

Unix::Sysadmin::Cmds::FreeBSD provides the following additions/overrides:

 CHOWN => "/usr/sbin/chown",
 GREP => "/usr/bin/grep",
 PSALL => "/bin/ps auxww",
 PWD_MKDB => "/usr/sbin/pwd_mkdb",
 RSH => "/usr/bin/rsh -K",

Unix::Sysadmin::Cmds::OpenBSD provides identical additions.

Unix::Sysadmin::Cmds::Linux provides the following additions/overrides:

 PSALL => "/bin/ps auxww",
 RCP => "/usr/bin/rcp",
 TEST => "/usr/bin/test",
 UNAME => "/usr/bin/uname",

Unix::Sysadmin::Cmds::SunOS provides the following additions/overrides:

 AUTOMOUNT => "/usr/sbin/automount",
 MAKE => "/usr/local/bin/make",
 PSALL => "/bin/ps -elf",


SEE ALSO

Man(3) pages (programmer's docs):

the Unix::Sysadmin::Host manpage, the Unix::Sysadmin::User manpage, the Unix::Sysadmin::Automount manpage, the Unix::Sysadmin::Group manpage, the Unix::Sysadmin::Netgroup manpage, the Unix::Sysadmin::List manpage, the Unix::Sysadmin::Cmds manpage, the Unix::Sysadmin::Files manpage the Unix::Sysadmin::Utility manpage the Unix::Sysadmin::Config manpage, the Unix::Sysadmin::Scoped manpage

Man(4) pages (file formats):

the Unix::Sysadmin::Host.list manpage, the Unix::Sysadmin::User.list manpage, the Unix::Sysadmin::Automount.list manpage, the Unix::Sysadmin::Group.list manpage, the Unix::Sysadmin::Netgroup.list manpage

Man(1m) pages (manager's docs):

the Unix::Sysadmin manpage, the Unix::Sysadmin::Setup manpage the usasetup manpage

the usatest manpage

the usabackup manpage

the usaupdate manpage

the usapush manpage


AUTHOR

Howard Owen <hbo@egbok.com> =cut