Part 1 Using vi
DONE
Part 2
1. Use wc to tell me how many lines are in the file /etc/fstab. How did you do this and what answer did you get?
There are 11 lines in fstab.
First I had to get to the correct directory by typing cd /etc. Then I just typed wc fstab. This command gives me a line that says " 11 51 556 fstab". The first number is the number of lines in the file. Afterwards I checked by typing cat fstab and there are to be 11 lines.
2. Use wc to tell me how many words are in the file /etc/fstab. How did you do this and what answer did you get?
There are 51 words in fstab.
I found this out the same way as above except the number of words is the second number. Here I didn't double check using the cat command.
3. Use echo to tell me what is contained in the following variables:
HISTSIZE - 1000
LOGNAME - mminten
HOME - /home/mminten
MAIL - /var/mail/mminten
SHELL - /bin/bash
4. Create a variable called NAME that holds you first name. How did you do this?
I just typed 'NAME=Matthew'. When I type 'echo $NAME' it appears to be there. Now I have a question for you... when I type 'env' to see all of my variables it does not appear in the list. Where does it go? I can see its value when I type the echo command.
Monday, February 22, 2010
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment