& and nohup
- & Run process in background. Must be LAST on command line.
- Nohup may be used to keep a child process running, even when parent terminates. (Sometimes)
Process Monitoring
- ps list current shell processes
- ps -u user list, user's processes
- ps -f list fuller line of information
- ps -e list every process
The Glorious find Command
The find command is automatically recursive.
Expressions:
- -name file name “with” or w/o wild cards
- -user uname or UID
- -mtime with + or – or
- -perm
- -inum
- -nouser
Logging in and Running Remotely
When you log into a remote system, a series of processes fire off: ssh -> getty -> login -> bash
- A secure shell connection is established: ssh
- A process called 'getty' fires off.
- A login process is triggered.
- Finally, bash gets going with 'getty and login' dropping off.
- bash gets listed as a child process of ssh.
When logging in remotely, the “work” happens at the remote machine.
Shell Responsibilities
- Program Execution
- The shell analyzes the command line input and starts programs.
- Variable and Name Substitution
- Variable substitution and wild card expansion is done by the shell. The commands that we run cannot, in general, do any variable substitution or command line expansion.
- I/O Redirection
- The shell must interpret the redirection elements on the command line. (> >> < |) and source input correcting and direct command output to files.
- Pipeline Hookup
- Redirecting the output of a command to be the input of another command is also the responsibility of the shell.
- Environment Control
- This involves keeping track of the session environment, your pwd, search paths, etc.
- Interpreted Programming Language
- The shell has an interpreted built-in programming language that allows the creation of functions, conditional statements, looping structures and other programming features.