There are many ways to do any of these tasks!
> ls -l total 2031 -rw-r--r-- 1 hollingd grads 996 Jan 13 1999 RESULTS drwxrwx--x 4 hollingd grads 1024 Jan 18 1999 coordeval/ drwxrwx--x 2 hollingd grads 1536 Jan 15 1999 new/ -rw-r--r-- 1 hollingd grads 1415376 Jan 18 1999 new.tar.gz drwxrwx--x 2 hollingd grads 1536 Jan 7 1999 old/ -rw-rw---- 1 hollingd grads 636968 Dec 10 1998 reactive-sat.ps drwxrwx--x 2 hollingd grads 512 Jan 13 1999 test/The output of your command should look something like this:
141537699 new.tar.gz
63696898 reactive-sat.ps
153699 new/
153699 old/
102499 coordeval/
99699 RESULTS
51299 test/
Each line should contain only the size and name of the file/directory
(no permissions, dates or other fields)."ls -l |" )
wc command (word count). If you give
wc the name of a file it will generate output like this:
> wc foo
247 1159 7210 foo
The output indicates that there are 247 lines in foo, 1159 words and
7210 characters.I want this output, but I want it to look like this:
247 1159 7210Specifically, I want each value on a line by itself with no leading whitespace, and I don't want to see the name of the file. HINT: Look at
tr including the -s option. Your answer to this task is a single command line that produces the output requested for a file named "foo" (the numbers will be different).
JANUARY 2000or
FEBRUARY 2000HINT: the
cal command might be helpful.
Feel free to include the results of testing that you did (sample output), a description of any problems you had or anything else you think might help us. Please also indicate what flavor of unix you used to develop your answers (Sun, Linux, BSD, SGI, IBM, ...).
If you have questions, check out the HW1 FAQ on the course home page (as we get questions we will create this document) or send email to introunix@cs.rpi.edu.