CS 279 - Week 15 Lecture 1 - 12-4-12

a few more odds and ends...

*   date
    *   yes, it gives the current date and time,
        BUT it also can be given format descriptors
	to specify an output string with JUST certain
	parts of the date and time included;

    *   you PRECEDE such a string with +

    *   you PRECEDE each format descriptor with a %

    *   see examples in screen shot

cal 
...can get an ASCII version of a monthly calendar
*   can specify a year, and get all 12 months
*   can specify a month and a year, and get just that
    month
*   ...and see man page for more...

printf
*   expects a string with format descriptors
    followed by values to be formatted in that string
    using those format descriptors

    pp. 274-278 and the man page have the MANY options
    and kinds of format descriptors!!

    but see screen shot for some quick'n'sleazy
    examples;

*   df - reports free disk space
    du - reports the disk space in use by a given
         file or directory

    du <name>
    du -a <name> - if <name> a directory, get the
                   disk space for each file within
    du -s <name> - only total usage (summary?) for <name>

*   uname 
    esp. uname -a
    can give you info about the OS, network node,
    hardware of your system;

*   sys admin advice:
    *   make TWO accounts, an admin and day-to-day,
        so you don't shoot yourself in the foot;

    *   keep little files in a recognizable place
        with what actually worked for sys admin duties;

*   sudo
    *   perform a command or commands as superuser
    *   a file sudoers contains which users are permitted
        to do this

*   useradd - add a new user

*   passwd - a user can reset their password,
    a superuser can set an account's password