Just like you I was also a computing student and you won't really learn anything if you don't exert any effort in working out these problems. I did a similar UNIX subject and most people who failed in class did well in assignments but bombed final exams because they had other people do assignments for them. Therefore it might help if you at least posted what you have done so far and what's getting you stuck. From your post it seems you have done absolutely *nothing*, not even try. Questions like what does "cat 1> m1" do takes like less than 2 mins to solve even for someone who have never used cat before (hint: man cat).

Carlo


David Herd wrote:


Hi
I'm a computing student who is having troubles with part of my assignment. Can I have any help out there in Linux land.

Question 1. (16 marks)

Write UNIX commands to

a) show the lines of the online manual page for sort that contain the word order.

b) show how many characters the date command outputs.

c) copy all C source files (the filenames end in .c) from the present working
  directory into a subdirectory called Cfiles.

d) list all files in the present working directory that have filenames
  that match:
                                starts with either t or T
                                the extension is a single digit

e) compress all the files in the directory Docs/ and store them in an
 archive called Docs.tar

f) sort the file /etc/passwd in reverse alphabetical order by username.

g) append all the lines of m1 that contain "name" to m2

h) Mail the present working directory contents to the current user
  with subject Directory.

Question 2. (4 marks)

m1, m2 and m3 are text files.
What do the follow commands do under bash?
Answer in English.

a) cat 1> m1

b) cat 0< m1 | sort 1> m2 2> m3

Question 3. (4 marks)

m1, m2 and m3 are text files.
What do the following commands do under tcsh?
Answer in English.

a) ls -l | grep admin |tee m1 | lpr -Pp1

b) zcat m.z | head -20



thanks
David



--
SLUG - Sydney Linux User's Group Mailing List - http://slug.org.au/
Subscription info and FAQs: http://slug.org.au/faq/mailinglists.html

Reply via email to