cat movies.txt grep The movies.txt grep The less movies.txt sort movies.txt sort head -n 3 movies.txt head -n 3 ls ls *.txt cat hi.txt cat movies.txt wc movies.txt wc hi.txt ls *.txt | wc -l wc movies.txt sort movies.txt sort movies.txt | grep "The" sort movies.txt | grep "The" | tail -n 3 sort movies.txt | grep "The" | tail -n 3 | head -n 1 which du which /usr/bin/du which man du /usr/bin/man du man which du /usr/bin/man which man | du du du `which man` ls *.txt ls *.txt | wc ls *.txt > temp cat temp wc < temp wc `ls *.txt` wc movies.txt hi.txt wc *.txt which man | xargs du ls *.txt | wc ls *.txt | xargs wc wc hi.txt wc hi.txt movies.txt xargs wc ps jobs ps aux ps -u rea ps top ls emacs movies.txt jobs ps jobs fg ls jobs kill %1 jobs emacs movies.txt & ps kill 960 ps ps -KILL 960 ps kill -9 960 ps ls javac Infinite.java more Infinite.java java Infinite ps java Infinite jobs ps kill 1317 jobs kill -KILL 1317 jobs ps java Infinite fg jobs ps emacs movies.txt jobs kill %1 jobs ssh attu4 w finger finger rea who write rea links cs.washington.edu alias ls -l alias ll="ls -l" ll alias ll *.txt exit ------------------------------------------------ Answers to questions on slides: Slide 4: Q: Amongst the top 250 movies in movies.txt, display the third to last movie that contains "The" in the title when movies titles are sorted. A: sort movies.txt | grep "The" | tail -n 3 | head -n 1 Q: Find the disk space usage of the man program Does which man | du work? A: No. "which man | du " does the same thing as just typing du at the command line. du is NOT a command that can take input from stdin, so piping the output of the which command into it does nothing. Slide 15: Q: Exercise : Make it so that typing q quits out of a shell. A: alias q=exit Q: Exercise : Make it so that typing woman runs man. A: alias woman=man Q: Exercise : Make it so that typing attu connects me to attu. A: alias attu="ssh username@attu.cs.washington.edu"