
1
CSCI 100
Think Like Computers
Lecture 7
Fall 2008
Example HTML File
•<html>
•<title> My Home Page </title>
•<body>
•<center><h2>Welcome!</h2></center>
•The text goes here …
•</body>
•</html>
Some More Unix
•grep (print lines matching a pattern)
•grep clark.edu ~/public_html/*.html
•ls –l | grep jpg
Find files
•find (search for files in a directory
hierarchy)
•find . –name “DSC*.jpg” –print
•find . –iname “DSC*.jpg” –print
•find ~/ -size +1000k
•find ~/ -ctime -2
Other
•wget (network downloader)
wget http://myhome.com/file/achive.zip
•date (get time)
•cal (calendar)
•ssh, sftp, ftp (remote access/file transfer)
Unix Process Control
•^C : interrupt
•^Z : suspend
•jobs (show jobs list)
•fg (bring to foreground – resume)
•bg (bring to background – resume)
•command &: run command at background
(most GUI programs)
•ps : process status
•kill process_id : terminate a process