System and application end-users who have taken an Introduction to Unix/Linux course and have seen the potential available in the command line utilities. This includes application support personnel, database administrators, and 4GL and Java programmers who need a functional familiarity with system tools and commands.
These contents are projected. As development continues this list may change to accommodate time constraints.
Review of Simple Commands
Process listing: ps
Directory listing: ls
File search: find
Extracting text: cut
Printing first or last lines: head
/ tail
Extended Regular Expressions
As implemented by egrep
As implemented by sed
As implemented by awk
Overview of PCRE (Perl-Compatible Regular Expressions)
Interactive Commands
script
(command logging)
screen
(multiple concurrent detachable shells)
vim
(shell commands within vim
, mapping keys, bookmarks, split screen support)
Data manipulation commands
Putting stdin on the command line: xargs
Sorting: sort
Differences between files: diff
/ sdiff
/ patch
Common lines: comm
Byte-by-byte comparison: cmp
Splitting one file into many: csplit
/ split
Formatting files: fmt
/ fold
/ nl
/ pr
Generating number sequences: seq
Filtering unique lines: uniq
Using Perl's pod
command for documentation
Administration-related commands
System log access: logger
Checksums: md5sum
/ shasum
Terminal control: tput
Repetitive execution: watch
Disk space: du
/ df
PATH searching: env
System configuration: getconf
Programmed interface: expect
Network tools
IO redirection of TCP and UDP in Bash and Korn
Secure shell: ssh
/ scp
/ sftp
Syncing two machines: rsync
Raw network connection: netcat
Raw IO control: dd
Downloading: wget
/ curl
/ lwp-get
/ lwp-download
Email message processing: formail
IP address arithmetic: ip
Compression utilities
Oldest LZW: compress
/ uncompress
GZip: gzip
/ gunzip
/ zcat
/ zmore
/ zless
/ zgrep
BZip2: bzip2
/ bunzip2
/ bzcat
/ bzmore
/ bzless
/ bzgrep
7-Zip: 7zip
/ 7unzip
Miscellaneous: zoo
/ zip
/ rar
/ others
Archival/backup commands
BSD archiver: tar
/ gnutar
SVR4 archiver: cpio
Portable archiver: pax
Windows archiver: zip
/ unzip
/ zipinfo
Raw IO control: dd
Upon completion of this course, the student will be able to create advanced command lines involving I/O redirection and pipes, and create simple automated scripts in bash
/ksh
. (Sophisticated scripts are the topic of other courses). A sample of the types of problems solved using commands covered by this course:
Examining log files to detect and count occurrences of sophisticated regular expressions ("How many times is a particular web page retrieved?" and "Which web page shows up in error messages the most often?"),
Advanced editing techniques for vi
and vim
("How do I run shell commands and read their output into my vi
buffer?" and "How do I easily reformat the comments in my shell scripts?"),
Monitoring system disk space parameters and warning when space thresholds are crossed ("I want to be notified when free disk space reaches certain percentage (or absolute) thresholds for these partitions..."),
Efficiently transporting data from one system to another by bundling small files in a single larger file ("How do I copy three separate directories from SystemA to SystemB in a quick and easy manner?"), and
Summarizing log files based on criteria contained in configuration files ("Look in myhostfile.txt and determine how many times those hosts appear in the FTP log...").
Students are invited to bring their current ideas and questions to the classroom for discussion. Case studies, lecture, group problem solving, and online laboratories will be used. Students will be encouraged to enhance their skills utilizing the techniques presented through classroom problem solving and controlled online workshops.
Completion of an Introduction to Unix or similar course, and six months of command line experience on a Unix/Unix-like operating system. See below for a quick quiz to determine if you're ready for this fast-paced course.
Are you ready for this course? If you can't immediately answer the following questions (no more than five seconds of time to think about the answer!), then you should consider taking an Introduction to Unix course and practicing your command line skills prior to attending this course.
The ls
command.
The ls
command normally displays the contents of whatever directory is provided on the command line. What option turns OFF the display of a directory's contents? (So the output would consist of one line of data with a d
in column zero.)
The cat
command.
The cat
command is normally used to display the contents of a file, but it can also add line numbers to the output, display tabs as ^I
characters, add end-of-line markers, and other functions. Name at least two valid option letters to the cat
command and describe what they do.
The tail
command.
The tail
command is a staple of the Unix environment. It can be executed with the -n
option followed by a positive or negative number. What do these numbers represent by default and what is the difference between the plus sign prefix and the minus sign prefix?
Describe what the following command does...
Describe what the following command does in 25 words or less (you can take 5 seconds for each command in the pipe, and you're allowed to guess at which data is being extracted from the ps
output):
ps -eaf | cut -c56- | tail -n +2 | sort -u
Which of these commands...?
Which of these command groups produce nonsense output (you get five seconds per command group):
ps -eaf | sort -k 1.56
ls -l /var/spool/at > /tmp/frank | wc -l
echo "%r" > format; date +$(cat format)
echo "%r" > format; var=$(date +$(cat format))
If you didn't get at least three of the above questions correct immediately, you're not ready for this course.
The answers are:
-d
-n
/-t
/-e
/-v
and some versions of the cat
command have -b
and -s
Number of lines.
A positive number begins counting from the beginning of the file and a negative number counts backwards from the end of the file.
Creates an alphabetical list of command lines running on the system (removing duplicates).
This assumes that ps -f
prints the command line beginning in column 56.
#2