CS 120 / Unix Lab 1 - Jan 28 and 29, 2010 Allison Mankin, amankin1@jhu.edu, Head TA ==================================================== Anyone with lab questions, email me, Alex or Steve You can also get with us on lab at our office hours. ==================================================== putty - set up ssh access to ugrad accounts course cheat sheets and C, Unix links home directory, unix directories vs. folders cd ~ . .. pwd ls, ls -l, ls -a directory path, /home/, other examples man, man -k less cp and mv use 'mkdir' to create ~/tmp cp /usr/include/ldap.h ~/tmp [just some content] rm -i emacs process control: ctrl-z, fg, bg, jobs, kill -9 introduction to emacs hello world ctrl-x ctrl-f hello.c, editing commands, ctrl-x ctrl-s ctrl-z gcc hello.c ./a.out it works. Hello, Unix command line C programmer! introduction to unix building blocks: | wc grep shell command line editing: use arrow keys, review your commands, modify and re-run exit - always logout, ensure putty has closed. ==================================================== building blocks exercise: Roughly how many times does the word 'word' occur in the man page for wc? man wc | grep word | wc -l ====================================================