Description: Description: Cpts224logo

Homework 1 - Basics


Given out August 28, 2019

Due at 4:00pm on Wednesday, September 4 via the BLACKBOARD system

You will need access to a Unix (or Unix-like) system for this assignment. There is no requirement to use a particular system, or kind of system.

You will need to submit a writeup with your name, student ID, and the answers to the following questions.  Please create a reasonably formatted pdf file and submit it to the “Homework #1” dropbox via Blackboard.  A simple way do to is to use a word processor: you can copy and paste from a shell window if needed.

Scoring is 1 point per question.

  1. Briefly describe the system you are using. (e.g. "Redhat 7.2 running on my PC." or "wsunix.wsu.edu" or “ssh1.eecs.wsu.e” or some similar brief description.)
  1. What is the output of uname -a?
  1. What directory are you currently in?
  2. How do you know what directory you are in?
  3. What is the output of who am i?
  4. What is the output of whoami?
  5. How do the two differ?

    The next few questions use the man page for ls.
  6. How is the ls command described in the "Name" section of the man page?
  7. How many options are there to the ls command?
  8. How would you invoke ls to get output like the following (ignore the dates, username, and group; focus on what files are being listed)? Note that some of this will not make sense until we have completed covering the file system.

.:
total 12
20199177 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 hugeparms
17312868 -rw-r--r-- 1 hliu2 grad 0 Jul 31 2002 hugeparms.C
20199176 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 hyper
17312873 -rw-r--r-- 1 hliu2 grad 0 Mar 24 1998 hyper.C
17312862 drwxr-xr-x 2 hliu2 grad 4096 Mar 12 1997 independent
20199169 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 md1
20199168 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 mm1
25167961 -rw-r--r-- 1 hliu2 grad 0 Oct 20 1998 mm1.C
17312880 -rwxr-xr-x 1 hliu2 grad 0 Nov 26 1999 mm1_orig
20199175 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 mm1term
17312866 -rw-r--r-- 1 hliu2 grad 0 Feb 26 1997 mm1term.C
25167962 -rw-r--r-- 1 hliu2 grad 0 May 31 1996 multi.C
20199167 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 nonsteady
17312869 -rw-r--r-- 1 hliu2 grad 0 Jul 22 2002 nonsteady.C
20199173 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 norm
17312864 -rw-r--r-- 1 hliu2 grad 0 Feb 4 1997 norm.C
15581517 -rw-r--r-- 1 hliu2 grad 0 Aug 29 10:36 output
17312874 drwxr-xr-x 2 hliu2 grad 4096 Feb 20 2001 pascal
17312870 drwxr-xr-x 2 hliu2 grad 4096 Feb 20 2001 plain_c
17312867 -rw-r--r-- 1 hliu2 grad 0 Mar 7 2001 reg_mm1.C
17312881 -rw-r--r-- 1 hliu2 grad 0 Aug 27 2000 rmm1.mime
25167963 -rw-r--r-- 1 hliu2 grad 26 Mar 6 1995 SA
20199170 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 taks
25167964 -rw-r--r-- 1 hliu2 grad 0 Jul 1 2002 taks.C
25167965 -rwxr-xr-x 1 hliu2 grad 25 Oct 18 1994 test_env
25167966 -rw-r--r-- 1 hliu2 grad 0 Oct 11 1994 test_observation_analyser.C
20199174 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 tmm1
17312865 -rw-r--r-- 1 hliu2 grad 0 Feb 5 1997 tmm1.C
20199171 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 tproc
25167967 -rw-r--r-- 1 hliu2 grad 0 May 28 1996 tproc.C
25167969 -rw-r--r-- 1 hliu2 grad 0 Aug 15 1996 trand.C
25167968 -rw-r--r-- 1 hliu2 grad 0 Aug 15 1996 trand.out
25167970 -rw-r--r-- 1 hliu2 grad 0 Jun 16 1995 trgen.C
20199165 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 uni
20199166 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 uni2
25167971 -rw-r--r-- 1 hliu2 grad 0 Jul 27 1995 uni2.C
25167972 -rw-r--r-- 1 hliu2 grad 0 Jul 22 2002 uni.C
17312882 -rw-r--r-- 1 hliu2 grad 0 Feb 25 2004 uni.o
25167973 -rw-r--r-- 1 hliu2 grad 0 Aug 24 1995 yak.C
20199172 -rwxr-xr-x 1 hliu2 grad 0 Feb 25 2004 zeroes
25167974 -rw-r--r-- 1 hliu2 grad 0 Jul 12 1996 zeroes.C

./independent:
total 0
17312863 -rw-r--r-- 1 hliu2 grad 49 Feb 4 1997 Akaroa

./pascal:
total 0
17312879 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 akaroa.h
17312878 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 akaroa.pas
17312875 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 Makefile
17312877 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 temp.c
17312876 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 uni.pas

./plain_c:
total 0
17312871 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 Makefile
17312872 -rw-r--r-- 1 hliu2 grad 0 Sep 8 1998 uni.c