CS60 Project Assignment 3 -------------------------------- Due: Oct 31st at Midnight Good Old SHell (gosh) ---------------------------------- The goal of project 3 is to write your own scaled down command interpreter (shell), similar to the shells you've been using on the CSIL machines. The task of a UNIX shell is to display a prompt to the user, take a command string from the user, execute the input command, and return to a prompt waiting for the next command. The minimal features of your shell must include: 1.) read strings input by the user and break them up into their individual parts: - the command itself - variable number of arguments to the command - special IO shell characters '<' or '>' - filename following special IO shell characters the only guaranteed part of an input string is the command itself, everything else is optional. ex input strings: ls ls -al ls -a -l /etc ls -a -l /etc > foo.txt echo SOMEFOO > blah.txt cat < blah.txt cat foo.txt 2.) Shell must fork a new process which executes the input command with the input command arguments. (fork(), execvp()/execv()/etc) 3.) Shell must wait until the child command exits before returning to a prompt (wait()) 4.) Shell must support IO redirection from files. Specifically if the user input commands or the form 'cmd > filename' or 'cmd < filename' then the forked child process must redirect it's stdout or stdin to/from 'filename' before execving 'cmd'. You shell must detect the following errors 1.) entered command string is malformed - no command before '<' or '>' - no file after '<' or '>' - no command at all 'just an enter', should just return another prompt 2.) entered command failed to execute 3.) output redirection file cannot be created 4.) input redirection file cannot be opened You may assume the following restrictions 1.) the user input string must be <= 1024 characters long 2.) no command accepts more than 32 arguments Hints -------------- Stevens Chapters 3 and 8. For this assignment, the following program breakdown is suggested 1.) create a data type that contains all information about an input command. you may want to decide which variant of exec you want to use before starting this step as the form of cmd arguments depends on which variant of exec you use. execvp is probably the simplest. 2.) create a simple loop that reads in a raw input string from the user. Then create a tokenizer that splits the input string into the various parts of a command that you defined in step 1. 3.) implement the fork()/exec() functionality, where the shell first forks, then the child calls exec on the current command while the parent calls wait(). 4.) implement IO redirection last, using open() to open the redirected file, dup2() to redirect stdout wor stdin, which all happens right before the exec is called. Turnin --------------------- The turnin tag for this project is 'project3' and must include your source, a typescript showing the compilation of your shell with '-ansi -pedantic' and no warnings, and your shell executing at minimum the five commands shown in the first section, and an optional README with any special instruction for the grader. Extra Credit (10pts) --------------------- Add the ability for your shell to use the '|' operator just like common shells. That is, two commands, separated by the special shell character '|', will both be execute, after the stdout of the first command is redirected to the stdin of the second command. Both processes must be executed, and the shell still must support IO redirection (only output of second cmd if you are using a '|'). Commands such as the following should now be allowed: ls -l | wc ls -al | more ls -a -l | grep passwd cat /etc/passwd | grep root Sample Output ------------------ gccnurmi@crow:~/project3$ gcc -ansi -pedantic gosh.c -o gosh nurmi@crow:~/project3$ ./gosh gosh% ls a.out gosh gosh.c gosh.c~ project3 project3~ typescript gosh% ls -al total 60 drwxr-xr-x 2 nurmi nurmi 4096 Oct 24 10:20 . drwxr-sr-x 103 nurmi nurmi 16384 Oct 24 10:17 .. -rwxr-xr-x 1 nurmi nurmi 7804 Oct 24 10:16 a.out -rwxr-xr-x 1 nurmi nurmi 7804 Oct 24 10:20 gosh -rw-r--r-- 1 nurmi nurmi 3183 Oct 24 10:17 gosh.c -rw-r--r-- 1 nurmi nurmi 3128 Oct 24 10:09 gosh.c~ -rw-r--r-- 1 nurmi nurmi 6458 Oct 24 10:09 project3 -rw-r--r-- 1 nurmi nurmi 6431 Oct 24 10:09 project3~ -rw-r--r-- 1 nurmi nurmi 0 Oct 24 10:20 typescript gosh% ls -a -l /etc total 1608 drwxr-xr-x 94 root root 8192 Oct 24 07:19 . drwxr-xr-x 28 root root 4096 Apr 20 2003 .. -rw------- 1 root root 0 Oct 1 2001 .pwd.lock -rw-r--r-- 1 root root 3244 Oct 1 2001 .serial.conf.old drwxr-xr-x 3 root root 4096 Oct 1 2001 CORBA drwxr-xr-x 3 root root 4096 Oct 1 2001 GNUstep -rw-r--r-- 1 root root 4965 Oct 6 07:13 Muttrc -rw-r--r-- 1 root root 4686 Mar 19 2002 Muttrc.dpkg-dist drwxr-xr-x 2 root root 4096 May 21 08:24 Net drwxr-xr-x 21 root root 4096 Sep 23 07:14 X11 -rw-r--r-- 1 root root 2563 Feb 5 2002 a2ps-site.cfg -rw-r--r-- 1 root root 15069 Apr 14 2002 a2ps.cfg -rw-r--r-- 1 root root 1660 Oct 1 2001 adduser.conf -rw-r--r-- 1 root root 1646 Oct 1 2001 adduser.conf.dpkg-save -rw-r--r-- 1 root root 48 Jun 23 15:32 adjtime -rw-r--r-- 1 root root 666 Oct 6 07:13 aliases drwxr-xr-x 3 root root 4096 Feb 20 2002 alsa drwxr-xr-x 2 root root 8192 Sep 23 07:14 alternatives -rw-r--r-- 1 root root 358 Mar 29 2001 anacrontab drwxr-xr-x 3 root root 4096 Oct 12 2001 apm drwxr-xr-x 3 root root 4096 Oct 6 07:13 apt -rw-r--r-- 1 root root 2548 Jan 25 2002 asound.conf -rw------- 1 root root 144 Apr 3 2000 at.deny -rw-r--r-- 1 root root 150 Jun 23 15:32 aumixrc -rw-r--r-- 1 root root 289 Jan 30 2002 auto.cs -rw-r--r-- 1 root root 206 Oct 6 07:13 auto.home -rw-r--r-- 1 root root 249 Oct 6 07:13 auto.master -rw-r--r-- 1 root root 89 Oct 12 07:13 auto.mayhem -rw-r--r-- 1 root root 264 Oct 12 07:13 auto.misc -rwxr-xr-x 1 root root 1046 Jan 5 2002 auto.net drwxr-xr-x 2 root root 4096 Apr 9 2002 autoconf2.13 -rw-r--r-- 1 root root 211 Jan 12 2002 bash.bashrc -rw-r--r-- 1 root root 65921 Apr 8 2002 bash_completion drwxr-xr-x 2 root root 4096 Apr 22 2002 bash_completion.d drwxr-xr-x 2 root root 4096 Mar 29 2002 bbtools drwxr-xr-x 2 root root 4096 Jul 19 2002 calendar -rw-r--r-- 1 root root 617 Feb 28 2002 cdebconf.conf -rw-r--r-- 1 root root 756 Dec 22 2001 cdrecord.conf drwxr-xr-x 3 root root 4096 Sep 30 06:00 cfengine drwxr-s--- 2 root dip 4096 Oct 1 2001 chatscripts -rw-r--r-- 1 root root 3956 Oct 1 2001 checksecurity.conf drwxr-xr-x 2 root root 4096 Jan 16 2002 console drwxr-xr-x 2 root root 4096 Jan 9 2002 console-tools drwxr-xr-x 2 root root 4096 Oct 10 07:13 cron.d drwxr-xr-x 2 root root 4096 Sep 8 07:15 cron.daily drwxr-xr-x 2 root root 4096 Sep 3 2002 cron.monthly drwxr-xr-x 2 root root 4096 Aug 28 07:35 cron.weekly -rw-r--r-- 1 root root 596 Jan 27 2001 crontab -rw-r--r-- 1 root root 629 Nov 6 2000 csh.cshrc -rw-r--r-- 1 root root 129 Nov 6 2000 csh.login -rw-r--r-- 1 root root 121 Nov 6 2000 csh.logout drwxr-xr-x 2 lp sys 4096 Jun 12 07:36 cups -rw-r--r-- 1 root root 48 Feb 21 2002 cvs-cron.conf -rw-r--r-- 1 root root 0 Jun 14 2001 cvs-pserver.conf -rw-r--r-- 1 root root 2290 Mar 28 2002 debconf.conf -rw-r--r-- 1 root root 4 Nov 28 2001 debian_version drwxr-xr-x 2 root root 4096 Oct 6 07:13 default -rw-r--r-- 1 root root 12 Oct 2 2001 defaultdomain drwxr-xr-x 4 root root 4096 Apr 28 2002 defoma -rw-r--r-- 1 root root 336 Sep 17 2001 deluser.conf drwxr-xr-x 3 root root 4096 Oct 12 2001 devfs -rw-r--r-- 1 root root 695 Nov 22 1998 dict.conf -rw-r--r-- 1 root root 12 Oct 2 2001 domainname drwxr-xr-x 3 root root 4096 Jun 9 2002 dpkg drwxr-xr-x 3 root root 4096 Feb 19 2002 emacs drwxr-xr-x 3 root root 4096 Oct 1 2001 emacs20 -rw-r--r-- 1 root root 312 Jan 19 2002 email-addresses -rw-r--r-- 1 root root 4841 Apr 3 2002 enscript.cfg -rw-r--r-- 1 root root 7 Apr 9 2003 environment drwxr-xr-x 2 root root 4096 Jan 16 2002 esound drwxr-xr-x 2 root root 4096 Oct 6 07:13 exim -rw-r--r-- 1 root root 1895 Oct 24 07:13 exports -rw-r--r-- 1 root root 1024 Aug 15 2002 fam.conf -rw-r--r-- 1 root root 24504 Oct 1 2001 fb.modes -rw-r--r-- 1 root root 354 Oct 1 2001 fdmount.conf -rw-r--r-- 1 root root 1246 Oct 1 2001 fdprm.obsolete -rw-r--r-- 1 root root 366 Jan 30 2002 fstab -rw-r--r-- 1 root root 97 Oct 1 2001 gateways drwxr-xr-x 6 root root 4096 Oct 1 2001 gconf drwxr-xr-x 3 root root 4096 Oct 1 2001 gdm drwxr-xr-x 3 root root 4096 Feb 24 2002 ggi drwxr-xr-x 3 root root 4096 Oct 1 2001 gimp drwxr-xr-x 5 root root 4096 Apr 19 2002 gnome -rw-r--r-- 1 root root 7790 Mar 6 2002 gnome-vfs-mime-magic drwxr-xr-x 2 root root 4096 Sep 23 07:14 gnucash -rw-r--r-- 1 root root 1756 Mar 4 2001 gpm-root.conf -rw-r--r-- 1 root root 550 Oct 1 2001 gpm.conf drwxrwxr-x 3 root root 4096 Oct 20 07:15 grid-security drwxr-xr-x 2 root root 4096 Mar 29 2002 groff -rw-r--r-- 1 root root 2218 Oct 24 00:13 group -rw-r--r-- 1 root root 1172 Feb 20 2002 group- -rw-r----- 1 root shadow 1307 Oct 24 00:13 gshadow -rw------- 1 root root 635 Feb 20 2002 gshadow- drwxr-xr-x 2 root root 4096 Apr 27 2002 gtk -rw-r--r-- 1 root root 26 Oct 1 2001 host.conf -rw-r--r-- 1 root root 5 Oct 1 2001 hostname -rw-r--r-- 1 root root 1487 Oct 6 07:13 hosts -rw-r--r-- 1 root root 1758 Oct 6 07:13 hosts.allow -rw-r--r-- 1 root root 709 Oct 6 07:13 hosts.deny -rw-r--r-- 1 root root 117 Nov 14 2001 hosts.equiv -rw-r--r-- 1 root root 1749 Sep 1 2001 identd.conf drwxr-xr-x 2 root root 4096 Apr 10 2002 imlib -rw-r--r-- 1 root root 1796 Sep 8 07:15 inetd.conf drwxr-xr-x 2 root root 4096 Oct 20 07:15 init.d -rw-r--r-- 1 root root 1856 Oct 1 2001 inittab -rw-r--r-- 1 root root 422 Aug 22 2001 inputrc -rw------- 1 root root 60 Oct 14 16:33 ioctl.save -rw-r--r-- 1 root root 776 Oct 1 2001 isapnp.conf -rw-r--r-- 1 root root 994 Oct 1 2001 isapnp.gone -rw-r--r-- 1 root root 25 Nov 28 2001 issue -rw-r--r-- 1 root root 21 Nov 28 2001 issue.net drwxr-xr-x 3 root root 4096 Dec 12 2002 j2se drwxr-xr-x 3 root root 4096 Sep 27 2002 jdk drwxr-xr-x 7 root root 4096 Sep 20 07:14 kde2 lrwxrwxrwx 1 root root 22 Aug 2 07:36 kderc -> kde2/system.kdeglobals -rw-r--r-- 1 root root 966 May 28 1997 kernel-pkg.conf -rw-r--r-- 1 root root 45619 Oct 1 07:14 ld.so.cache -rw-r--r-- 1 root root 81 Jan 8 2002 ld.so.conf drwxr-xr-x 3 root root 4096 Jan 13 2003 ldap -rw-r--r-- 1 root root 2792 Feb 24 2002 lftp.conf -rw-r--r-- 1 root root 19 Jan 1 2002 libao.conf -rw-r----- 1 root root 3818 Oct 1 2001 lilo.conf -rw-r--r-- 1 root root 2597 Mar 24 2002 locale.alias -rw-r--r-- 1 root root 609 Apr 9 2003 locale.gen lrwxrwxrwx 1 root root 39 Apr 9 2003 localtime -> /usr/share/zoneinfo/America/Los_Angeles drwxr-xr-x 4 root root 4096 Jan 1 2002 logcheck -rw-r--r-- 1 root root 9812 Apr 7 2002 login.defs -rw-r--r-- 1 root root 627 Oct 6 07:13 logrotate.conf drwxr-xr-x 2 root root 4096 May 12 2002 logrotate.d -rw-r--r-- 1 root root 128545 Oct 1 2001 lynx.cfg -rw-r--r-- 1 root root 135289 Aug 20 2001 lynx.cfg.dpkg-dist -rw-r--r-- 1 root root 23973 Jul 29 2001 lyxrc -rw-r--r-- 1 root root 111 Dec 27 1999 magic -rw-r--r-- 1 root root 125 Aug 8 2001 mail.rc -rw-r--r-- 1 root root 16541 Sep 23 07:14 mailcap -rw-r--r-- 1 root root 449 Nov 18 1999 mailcap.order -rw-r--r-- 1 root root 5 Oct 1 2001 mailname -rw-r--r-- 1 root root 4703 Feb 21 2002 manpath.config -rw-r--r-- 1 root root 2607 Oct 1 2001 manpath.config.dpkg-old drwxr-xr-x 2 root root 4096 Mar 4 2002 mc -rw-r--r-- 1 root root 11297 Oct 1 2001 mediaprm drwxr-xr-x 2 root root 4096 Feb 17 2002 menu drwxr-xr-x 2 root root 4096 Sep 20 07:14 menu-methods -rw-r--r-- 1 root root 36823 Sep 8 2001 mime-magic -rw-r--r-- 1 root root 99960 Apr 5 2002 mime-magic.dat -rw-r--r-- 1 root root 15723 Apr 9 2002 mime.types drwxr-xr-x 2 root root 4096 Mar 19 2002 minicom -rw-r--r-- 1 root root 270 Jun 25 2002 modules -rw------- 1 root root 4693 Aug 21 08:02 modules.conf -rw-r--r-- 1 root root 4693 Aug 21 08:02 modules.conf.old drwxr-xr-x 3 root root 4096 Apr 20 2003 modutils -rw-r--r-- 1 root root 496 Oct 19 07:13 motd -rw-r--r-- 1 root root 363 Oct 1 2001 motd.old drwxr-xr-x 2 root root 4096 Jul 18 2002 mozilla drwxr-xr-x 2 root root 4096 Jul 8 2002 mpich -rw-r--r-- 1 root root 888 Oct 24 07:19 mtab -rw-r--r-- 1 root root 624 Jun 2 2001 mtools.conf drwxr-xr-x 2 root root 4096 Sep 14 07:14 mysql drwxr-xr-x 3 root root 4096 Oct 1 2001 netscape4 drwxr-xr-x 6 root root 4096 Feb 1 2002 network drwxr-xr-x 2 root root 4096 Jan 9 2002 nmh -rw-r--r-- 1 root root 524 Oct 2 2001 nsswitch.conf -rw-r--r-- 1 root root 465 Oct 2 2001 nsswitch.conf.DIST drwxr-xr-x 2 root root 4096 Apr 29 2002 oaf drwxr-xr-x 2 root root 4096 Feb 24 2002 ocaml -rw-r--r-- 1 root root 446 Oct 19 2000 octave2.0.conf drwxr-xr-x 2 root root 4096 Oct 1 2001 openldap -rw-r--r-- 1 root root 534 Oct 1 2001 pam.conf drwxr-xr-x 2 root root 4096 Sep 22 07:14 pam.d -rw-r--r-- 1 root root 595 Sep 8 2001 paper.config -rw-r--r-- 1 root root 7 Oct 1 2001 papersize -rw-r--r-- 1 root root 4945 Oct 15 16:13 passwd -rw------- 1 root root 4527 Dec 5 2002 passwd- drwxr-xr-x 4 root root 4096 Feb 21 2002 pdq -rw-r--r-- 1 root root 4991 Feb 22 2001 pgp.conf -rw-r--r-- 1 root root 3161 Jan 26 2000 pluggerrc drwxr-x--- 6 root dip 4096 Feb 1 2002 ppp -rw-r--r-- 1 root root 1873 Oct 6 07:13 printcap -rw-r--r-- 1 root root 576 Jul 10 2001 printcap.DIST -rw-r--r-- 1 root root 643 Dec 10 2001 printcap.dpkg-dist -rw-r--r-- 1 root root 342 Oct 1 2001 profile -rw-r--r-- 1 root root 1748 Oct 1 2001 protocols drwxr-xr-x 2 root root 4096 Sep 9 2002 python2.1 drwxr-xr-x 2 root root 4096 Oct 19 07:13 queue drwxr-xr-x 2 root root 4096 Dec 27 1995 rc.boot drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc0.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc1.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc2.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc3.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc4.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc5.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc6.d drwxr-xr-x 2 root root 4096 Jun 28 2002 rcS.d -rw-r--r-- 1 root root 125 Oct 6 07:13 resolv.conf -rwxr-xr-x 1 root root 268 Feb 17 2000 rmt -rw-r--r-- 1 root root 35 Aug 13 16:37 rmtab -rw-r--r-- 1 root root 862 Nov 18 2001 rpc drwxr-xr-x 2 root root 4096 Apr 7 2003 samba drwxr-xr-x 2 root root 4096 Sep 11 07:14 sane.d -rw-r--r-- 1 root root 3607 Apr 10 2002 screenrc -rw-r--r-- 1 root root 44 Mar 22 2002 scrollkeeper.conf -rw-r--r-- 1 root root 317 Oct 22 2001 securetty drwxr-xr-x 2 root root 4096 Feb 1 2002 security -rw-r--r-- 1 root root 3440 Oct 1 2001 serial.conf -rw-r--r-- 1 root root 16192 Jan 31 2003 services drwxr-xr-x 3 root root 4096 Apr 13 2002 sgml -rw-r----- 1 root shadow 4146 Oct 24 00:13 shadow -rw------- 1 root root 1976 Feb 19 2002 shadow- -rw-r--r-- 1 root root 185 Mar 26 2002 shells drwxr-xr-x 2 root root 4096 Apr 22 2002 skel drwxr-xr-x 3 root root 4096 Oct 1 2001 sound drwxr-xr-x 2 root root 4096 Sep 22 07:14 ssh drwxr-xr-x 5 root root 4096 Oct 1 07:14 ssl -r--r----- 1 root root 415 Oct 24 00:13 sudoers -rw-r--r-- 1 root root 185 Oct 1 2001 sysctl.conf -rw-r--r-- 1 root root 1749 Jan 30 2002 syslog.conf drwxr-xr-x 2 root root 4096 Feb 24 2002 t1lib drwxr-xr-x 11 root root 4096 Oct 1 2001 terminfo drwxr-xr-x 9 root root 4096 Dec 12 2002 texmf -rw-r--r-- 1 root root 20 Oct 1 2001 timezone -rw-r--r-- 1 root root 1378 Mar 2 2002 timidity.cfg -rw-r--r-- 1 root root 397 Jun 1 2001 updatedb.conf drwxr-xr-x 2 root root 4096 Jan 30 2002 vfont -rw-r--r-- 1 root root 4559 May 4 2002 vfontcap drwxr-xr-x 3 root root 4096 Oct 1 2001 vfs drwxr-xr-x 2 root root 4096 Apr 10 2002 vga drwxr-xr-x 2 root root 4096 May 4 2002 vim drwxr-xr-x 3 root root 4096 Feb 1 2002 vmware -rw-r--r-- 1 root root 4622 Oct 1 2001 vnc.conf -rw-r--r-- 1 root root 4002 Feb 19 2002 wgetrc -rw-r--r-- 1 root root 136 May 12 1998 wmifsrc -rw-r--r-- 1 root root 1777 Aug 4 2001 wmtzrc -rw-r--r-- 1 root root 11 Sep 15 2001 xlock.staff drwxr-xr-x 2 root root 4096 Jan 7 2003 xpdf -rw-r--r-- 1 root root 4897 Jan 7 2003 xpdfrc drwxr-xr-x 2 root root 4096 Apr 28 2002 xtraceroute gosh% ls -a -l /etc > foo.txt gosh% ls -l foo.txt -rw-r--r-- 1 nurmi nurmi 15501 Oct 24 10:20 foo.txt gosh% echo SOMEFOO > blah.txt gosh% cat < blah.txt SOMEFOO gosh% cat foo.txt total 1608 drwxr-xr-x 94 root root 8192 Oct 24 07:19 . drwxr-xr-x 28 root root 4096 Apr 20 2003 .. -rw------- 1 root root 0 Oct 1 2001 .pwd.lock -rw-r--r-- 1 root root 3244 Oct 1 2001 .serial.conf.old drwxr-xr-x 3 root root 4096 Oct 1 2001 CORBA drwxr-xr-x 3 root root 4096 Oct 1 2001 GNUstep -rw-r--r-- 1 root root 4965 Oct 6 07:13 Muttrc -rw-r--r-- 1 root root 4686 Mar 19 2002 Muttrc.dpkg-dist drwxr-xr-x 2 root root 4096 May 21 08:24 Net drwxr-xr-x 21 root root 4096 Sep 23 07:14 X11 -rw-r--r-- 1 root root 2563 Feb 5 2002 a2ps-site.cfg -rw-r--r-- 1 root root 15069 Apr 14 2002 a2ps.cfg -rw-r--r-- 1 root root 1660 Oct 1 2001 adduser.conf -rw-r--r-- 1 root root 1646 Oct 1 2001 adduser.conf.dpkg-save -rw-r--r-- 1 root root 48 Jun 23 15:32 adjtime -rw-r--r-- 1 root root 666 Oct 6 07:13 aliases drwxr-xr-x 3 root root 4096 Feb 20 2002 alsa drwxr-xr-x 2 root root 8192 Sep 23 07:14 alternatives -rw-r--r-- 1 root root 358 Mar 29 2001 anacrontab drwxr-xr-x 3 root root 4096 Oct 12 2001 apm drwxr-xr-x 3 root root 4096 Oct 6 07:13 apt -rw-r--r-- 1 root root 2548 Jan 25 2002 asound.conf -rw------- 1 root root 144 Apr 3 2000 at.deny -rw-r--r-- 1 root root 150 Jun 23 15:32 aumixrc -rw-r--r-- 1 root root 289 Jan 30 2002 auto.cs -rw-r--r-- 1 root root 206 Oct 6 07:13 auto.home -rw-r--r-- 1 root root 249 Oct 6 07:13 auto.master -rw-r--r-- 1 root root 89 Oct 12 07:13 auto.mayhem -rw-r--r-- 1 root root 264 Oct 12 07:13 auto.misc -rwxr-xr-x 1 root root 1046 Jan 5 2002 auto.net drwxr-xr-x 2 root root 4096 Apr 9 2002 autoconf2.13 -rw-r--r-- 1 root root 211 Jan 12 2002 bash.bashrc -rw-r--r-- 1 root root 65921 Apr 8 2002 bash_completion drwxr-xr-x 2 root root 4096 Apr 22 2002 bash_completion.d drwxr-xr-x 2 root root 4096 Mar 29 2002 bbtools drwxr-xr-x 2 root root 4096 Jul 19 2002 calendar -rw-r--r-- 1 root root 617 Feb 28 2002 cdebconf.conf -rw-r--r-- 1 root root 756 Dec 22 2001 cdrecord.conf drwxr-xr-x 3 root root 4096 Sep 30 06:00 cfengine drwxr-s--- 2 root dip 4096 Oct 1 2001 chatscripts -rw-r--r-- 1 root root 3956 Oct 1 2001 checksecurity.conf drwxr-xr-x 2 root root 4096 Jan 16 2002 console drwxr-xr-x 2 root root 4096 Jan 9 2002 console-tools drwxr-xr-x 2 root root 4096 Oct 10 07:13 cron.d drwxr-xr-x 2 root root 4096 Sep 8 07:15 cron.daily drwxr-xr-x 2 root root 4096 Sep 3 2002 cron.monthly drwxr-xr-x 2 root root 4096 Aug 28 07:35 cron.weekly -rw-r--r-- 1 root root 596 Jan 27 2001 crontab -rw-r--r-- 1 root root 629 Nov 6 2000 csh.cshrc -rw-r--r-- 1 root root 129 Nov 6 2000 csh.login -rw-r--r-- 1 root root 121 Nov 6 2000 csh.logout drwxr-xr-x 2 lp sys 4096 Jun 12 07:36 cups -rw-r--r-- 1 root root 48 Feb 21 2002 cvs-cron.conf -rw-r--r-- 1 root root 0 Jun 14 2001 cvs-pserver.conf -rw-r--r-- 1 root root 2290 Mar 28 2002 debconf.conf -rw-r--r-- 1 root root 4 Nov 28 2001 debian_version drwxr-xr-x 2 root root 4096 Oct 6 07:13 default -rw-r--r-- 1 root root 12 Oct 2 2001 defaultdomain drwxr-xr-x 4 root root 4096 Apr 28 2002 defoma -rw-r--r-- 1 root root 336 Sep 17 2001 deluser.conf drwxr-xr-x 3 root root 4096 Oct 12 2001 devfs -rw-r--r-- 1 root root 695 Nov 22 1998 dict.conf -rw-r--r-- 1 root root 12 Oct 2 2001 domainname drwxr-xr-x 3 root root 4096 Jun 9 2002 dpkg drwxr-xr-x 3 root root 4096 Feb 19 2002 emacs drwxr-xr-x 3 root root 4096 Oct 1 2001 emacs20 -rw-r--r-- 1 root root 312 Jan 19 2002 email-addresses -rw-r--r-- 1 root root 4841 Apr 3 2002 enscript.cfg -rw-r--r-- 1 root root 7 Apr 9 2003 environment drwxr-xr-x 2 root root 4096 Jan 16 2002 esound drwxr-xr-x 2 root root 4096 Oct 6 07:13 exim -rw-r--r-- 1 root root 1895 Oct 24 07:13 exports -rw-r--r-- 1 root root 1024 Aug 15 2002 fam.conf -rw-r--r-- 1 root root 24504 Oct 1 2001 fb.modes -rw-r--r-- 1 root root 354 Oct 1 2001 fdmount.conf -rw-r--r-- 1 root root 1246 Oct 1 2001 fdprm.obsolete -rw-r--r-- 1 root root 366 Jan 30 2002 fstab -rw-r--r-- 1 root root 97 Oct 1 2001 gateways drwxr-xr-x 6 root root 4096 Oct 1 2001 gconf drwxr-xr-x 3 root root 4096 Oct 1 2001 gdm drwxr-xr-x 3 root root 4096 Feb 24 2002 ggi drwxr-xr-x 3 root root 4096 Oct 1 2001 gimp drwxr-xr-x 5 root root 4096 Apr 19 2002 gnome -rw-r--r-- 1 root root 7790 Mar 6 2002 gnome-vfs-mime-magic drwxr-xr-x 2 root root 4096 Sep 23 07:14 gnucash -rw-r--r-- 1 root root 1756 Mar 4 2001 gpm-root.conf -rw-r--r-- 1 root root 550 Oct 1 2001 gpm.conf drwxrwxr-x 3 root root 4096 Oct 20 07:15 grid-security drwxr-xr-x 2 root root 4096 Mar 29 2002 groff -rw-r--r-- 1 root root 2218 Oct 24 00:13 group -rw-r--r-- 1 root root 1172 Feb 20 2002 group- -rw-r----- 1 root shadow 1307 Oct 24 00:13 gshadow -rw------- 1 root root 635 Feb 20 2002 gshadow- drwxr-xr-x 2 root root 4096 Apr 27 2002 gtk -rw-r--r-- 1 root root 26 Oct 1 2001 host.conf -rw-r--r-- 1 root root 5 Oct 1 2001 hostname -rw-r--r-- 1 root root 1487 Oct 6 07:13 hosts -rw-r--r-- 1 root root 1758 Oct 6 07:13 hosts.allow -rw-r--r-- 1 root root 709 Oct 6 07:13 hosts.deny -rw-r--r-- 1 root root 117 Nov 14 2001 hosts.equiv -rw-r--r-- 1 root root 1749 Sep 1 2001 identd.conf drwxr-xr-x 2 root root 4096 Apr 10 2002 imlib -rw-r--r-- 1 root root 1796 Sep 8 07:15 inetd.conf drwxr-xr-x 2 root root 4096 Oct 20 07:15 init.d -rw-r--r-- 1 root root 1856 Oct 1 2001 inittab -rw-r--r-- 1 root root 422 Aug 22 2001 inputrc -rw------- 1 root root 60 Oct 14 16:33 ioctl.save -rw-r--r-- 1 root root 776 Oct 1 2001 isapnp.conf -rw-r--r-- 1 root root 994 Oct 1 2001 isapnp.gone -rw-r--r-- 1 root root 25 Nov 28 2001 issue -rw-r--r-- 1 root root 21 Nov 28 2001 issue.net drwxr-xr-x 3 root root 4096 Dec 12 2002 j2se drwxr-xr-x 3 root root 4096 Sep 27 2002 jdk drwxr-xr-x 7 root root 4096 Sep 20 07:14 kde2 lrwxrwxrwx 1 root root 22 Aug 2 07:36 kderc -> kde2/system.kdeglobals -rw-r--r-- 1 root root 966 May 28 1997 kernel-pkg.conf -rw-r--r-- 1 root root 45619 Oct 1 07:14 ld.so.cache -rw-r--r-- 1 root root 81 Jan 8 2002 ld.so.conf drwxr-xr-x 3 root root 4096 Jan 13 2003 ldap -rw-r--r-- 1 root root 2792 Feb 24 2002 lftp.conf -rw-r--r-- 1 root root 19 Jan 1 2002 libao.conf -rw-r----- 1 root root 3818 Oct 1 2001 lilo.conf -rw-r--r-- 1 root root 2597 Mar 24 2002 locale.alias -rw-r--r-- 1 root root 609 Apr 9 2003 locale.gen lrwxrwxrwx 1 root root 39 Apr 9 2003 localtime -> /usr/share/zoneinfo/America/Los_Angeles drwxr-xr-x 4 root root 4096 Jan 1 2002 logcheck -rw-r--r-- 1 root root 9812 Apr 7 2002 login.defs -rw-r--r-- 1 root root 627 Oct 6 07:13 logrotate.conf drwxr-xr-x 2 root root 4096 May 12 2002 logrotate.d -rw-r--r-- 1 root root 128545 Oct 1 2001 lynx.cfg -rw-r--r-- 1 root root 135289 Aug 20 2001 lynx.cfg.dpkg-dist -rw-r--r-- 1 root root 23973 Jul 29 2001 lyxrc -rw-r--r-- 1 root root 111 Dec 27 1999 magic -rw-r--r-- 1 root root 125 Aug 8 2001 mail.rc -rw-r--r-- 1 root root 16541 Sep 23 07:14 mailcap -rw-r--r-- 1 root root 449 Nov 18 1999 mailcap.order -rw-r--r-- 1 root root 5 Oct 1 2001 mailname -rw-r--r-- 1 root root 4703 Feb 21 2002 manpath.config -rw-r--r-- 1 root root 2607 Oct 1 2001 manpath.config.dpkg-old drwxr-xr-x 2 root root 4096 Mar 4 2002 mc -rw-r--r-- 1 root root 11297 Oct 1 2001 mediaprm drwxr-xr-x 2 root root 4096 Feb 17 2002 menu drwxr-xr-x 2 root root 4096 Sep 20 07:14 menu-methods -rw-r--r-- 1 root root 36823 Sep 8 2001 mime-magic -rw-r--r-- 1 root root 99960 Apr 5 2002 mime-magic.dat -rw-r--r-- 1 root root 15723 Apr 9 2002 mime.types drwxr-xr-x 2 root root 4096 Mar 19 2002 minicom -rw-r--r-- 1 root root 270 Jun 25 2002 modules -rw------- 1 root root 4693 Aug 21 08:02 modules.conf -rw-r--r-- 1 root root 4693 Aug 21 08:02 modules.conf.old drwxr-xr-x 3 root root 4096 Apr 20 2003 modutils -rw-r--r-- 1 root root 496 Oct 19 07:13 motd -rw-r--r-- 1 root root 363 Oct 1 2001 motd.old drwxr-xr-x 2 root root 4096 Jul 18 2002 mozilla drwxr-xr-x 2 root root 4096 Jul 8 2002 mpich -rw-r--r-- 1 root root 888 Oct 24 07:19 mtab -rw-r--r-- 1 root root 624 Jun 2 2001 mtools.conf drwxr-xr-x 2 root root 4096 Sep 14 07:14 mysql drwxr-xr-x 3 root root 4096 Oct 1 2001 netscape4 drwxr-xr-x 6 root root 4096 Feb 1 2002 network drwxr-xr-x 2 root root 4096 Jan 9 2002 nmh -rw-r--r-- 1 root root 524 Oct 2 2001 nsswitch.conf -rw-r--r-- 1 root root 465 Oct 2 2001 nsswitch.conf.DIST drwxr-xr-x 2 root root 4096 Apr 29 2002 oaf drwxr-xr-x 2 root root 4096 Feb 24 2002 ocaml -rw-r--r-- 1 root root 446 Oct 19 2000 octave2.0.conf drwxr-xr-x 2 root root 4096 Oct 1 2001 openldap -rw-r--r-- 1 root root 534 Oct 1 2001 pam.conf drwxr-xr-x 2 root root 4096 Sep 22 07:14 pam.d -rw-r--r-- 1 root root 595 Sep 8 2001 paper.config -rw-r--r-- 1 root root 7 Oct 1 2001 papersize -rw-r--r-- 1 root root 4945 Oct 15 16:13 passwd -rw------- 1 root root 4527 Dec 5 2002 passwd- drwxr-xr-x 4 root root 4096 Feb 21 2002 pdq -rw-r--r-- 1 root root 4991 Feb 22 2001 pgp.conf -rw-r--r-- 1 root root 3161 Jan 26 2000 pluggerrc drwxr-x--- 6 root dip 4096 Feb 1 2002 ppp -rw-r--r-- 1 root root 1873 Oct 6 07:13 printcap -rw-r--r-- 1 root root 576 Jul 10 2001 printcap.DIST -rw-r--r-- 1 root root 643 Dec 10 2001 printcap.dpkg-dist -rw-r--r-- 1 root root 342 Oct 1 2001 profile -rw-r--r-- 1 root root 1748 Oct 1 2001 protocols drwxr-xr-x 2 root root 4096 Sep 9 2002 python2.1 drwxr-xr-x 2 root root 4096 Oct 19 07:13 queue drwxr-xr-x 2 root root 4096 Dec 27 1995 rc.boot drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc0.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc1.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc2.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc3.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc4.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc5.d drwxr-xr-x 2 root root 4096 Aug 25 15:07 rc6.d drwxr-xr-x 2 root root 4096 Jun 28 2002 rcS.d -rw-r--r-- 1 root root 125 Oct 6 07:13 resolv.conf -rwxr-xr-x 1 root root 268 Feb 17 2000 rmt -rw-r--r-- 1 root root 35 Aug 13 16:37 rmtab -rw-r--r-- 1 root root 862 Nov 18 2001 rpc drwxr-xr-x 2 root root 4096 Apr 7 2003 samba drwxr-xr-x 2 root root 4096 Sep 11 07:14 sane.d -rw-r--r-- 1 root root 3607 Apr 10 2002 screenrc -rw-r--r-- 1 root root 44 Mar 22 2002 scrollkeeper.conf -rw-r--r-- 1 root root 317 Oct 22 2001 securetty drwxr-xr-x 2 root root 4096 Feb 1 2002 security -rw-r--r-- 1 root root 3440 Oct 1 2001 serial.conf -rw-r--r-- 1 root root 16192 Jan 31 2003 services drwxr-xr-x 3 root root 4096 Apr 13 2002 sgml -rw-r----- 1 root shadow 4146 Oct 24 00:13 shadow -rw------- 1 root root 1976 Feb 19 2002 shadow- -rw-r--r-- 1 root root 185 Mar 26 2002 shells drwxr-xr-x 2 root root 4096 Apr 22 2002 skel drwxr-xr-x 3 root root 4096 Oct 1 2001 sound drwxr-xr-x 2 root root 4096 Sep 22 07:14 ssh drwxr-xr-x 5 root root 4096 Oct 1 07:14 ssl -r--r----- 1 root root 415 Oct 24 00:13 sudoers -rw-r--r-- 1 root root 185 Oct 1 2001 sysctl.conf -rw-r--r-- 1 root root 1749 Jan 30 2002 syslog.conf drwxr-xr-x 2 root root 4096 Feb 24 2002 t1lib drwxr-xr-x 11 root root 4096 Oct 1 2001 terminfo drwxr-xr-x 9 root root 4096 Dec 12 2002 texmf -rw-r--r-- 1 root root 20 Oct 1 2001 timezone -rw-r--r-- 1 root root 1378 Mar 2 2002 timidity.cfg -rw-r--r-- 1 root root 397 Jun 1 2001 updatedb.conf drwxr-xr-x 2 root root 4096 Jan 30 2002 vfont -rw-r--r-- 1 root root 4559 May 4 2002 vfontcap drwxr-xr-x 3 root root 4096 Oct 1 2001 vfs drwxr-xr-x 2 root root 4096 Apr 10 2002 vga drwxr-xr-x 2 root root 4096 May 4 2002 vim drwxr-xr-x 3 root root 4096 Feb 1 2002 vmware -rw-r--r-- 1 root root 4622 Oct 1 2001 vnc.conf -rw-r--r-- 1 root root 4002 Feb 19 2002 wgetrc -rw-r--r-- 1 root root 136 May 12 1998 wmifsrc -rw-r--r-- 1 root root 1777 Aug 4 2001 wmtzrc -rw-r--r-- 1 root root 11 Sep 15 2001 xlock.staff drwxr-xr-x 2 root root 4096 Jan 7 2003 xpdf -rw-r--r-- 1 root root 4897 Jan 7 2003 xpdfrc drwxr-xr-x 2 root root 4096 Apr 28 2002 xtraceroute gosh% exit nurmi@crow:~/project3$