Week 3 notes
Concepts
Daemons - Unix can run many processes at once. Daemons are typically programs that run and do things without asking for that session. Usually daemons can be identified in the process table by the trailing d in their name like sshd, ftpd, syslogd, etc...
SUID - In addition to the read, write and execute permissions, you can tell a program to run the person who owns the file.
Commands
More on permisions
- chown - change file's (or directory) owner
- chgrp - change file's group
To change a file to SUID or other special permisions you can use a special bitmask with chmod. For instance chmod 4555 filename will allow ANYONE to run that file as the other user.
Talking to your terminal
- stty - set terminal keys and options
- clear - clear terminal screen contents
- reset - bring terminal to known good state
Some simple applications
- date - display or set date
- cal - display calender
- bc - basic calculator
- mail - view and send mail (~/mbox)
- pine - menu driven mail client
- aspell - spellchecker, improved derivitive of ispell
Printing
- lpd - maintains, sends and receives requests for printing
- lp - print file
- lpstat - status of printing
- cancel - cancel print job
- lpr - print file(BSD)
- lpq - request status of job(BSD)
- lprm - remove print job(BSD)
- lpc - interactive printer command line
What is this machine doing?
- who - who is logged in
- w - same thing with format
- top - interactive system monitoring
- ps - show running processes
- kill - send signal to process, usually end
Working with text, winding up to write a script
- wc - word count
- sort - sorting
- grep - searching
- cut - extracting
- paste - inserting
Does your brain hurt yet?