[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 110: Undefined array key "cached"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 111: Undefined array key "normal"
[phpBB Debug] PHP Notice: in file /includes/db/dbal.php on line 112: Undefined array key "total"
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/session.php on line 885: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3391: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3393: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3394: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 3395: Cannot modify header information - headers already sent by (output started at /includes/functions.php:2922)
Cabrillo College Linux Classes • View topic - Lab 4 graded

Lab 4 graded

Introduction to UNIX/Linux

Lab 4 graded

Postby Rich Simms on Fri Oct 03, 2008 2:10 pm

I graded these last night and sent out all the graded labs by email. If you want some help on any of these areas prior to the test next week I'll be in the CIS Lab from 4:30 to 6:30. I also have office hours right before class on Wednesday from 4:30 to 6:00.

[b]Most missed questions:[/b]
02 xxxxxxx (relative pathnames)
03 xx
05 xxxxxxxxx (hidden directory files)
06 x
07 xxxx
08 xxxx
09 xxxx
10 xxx
11 xxxx
12 xxxx
13 x
15 xxxxxxxx (files not to display with cat or more)
16 x
17 xxxxxxxxxxxxx (ls applied to the directory [i]itself[/i])
18 xx
19 xxxxxxx (relative path)
20 xxxx (viewing files with binary data)
21 xxxxxxx (setting prompts)
22 x
23 xxx
25 xxxxxx (links and inodes)


[b]Answers[/b]
1. Write down the absolute path of your home directory.
/home/cis90/xxxxxxxx (xxxxxxxx = logname)


2. Relative to your home directory, what is the pathname of the tiger file in the Blake subdirectory?
Poems/Blake/tiger


3. What command allows you to see hidden files in your current directory?
ls -a


4. What command shows the pathname of your current working directory?
pwd


5. Are any of your hidden files directories? If so, which ones?
Yes .mozilla (also . and ..)


6. What does the cd command do when it is invoked with no arguments?
Changes the directory to your home directory.


7. Assuming you are in your home directory, what command will change your current working directory to the directory that holds Shakespeare's sonnets?
cd Poems/Shakespeare/


8. What is the inode number of the /home/cis90 directory?
87745


9. Who is the owner of your home directory?
simmsben


10. What's the name of the largest text file in your home directory?
mbox


11. What's the name and size of the smallest file in your home directory?
empty


12. How many subdirectories does the Poems directory have?
3


13. What is the first line of the file old in the Poems/Yeats directory?
When you are old and grey and full of sleep,


14. What is the last line of sonnet3 in the Shakespeare directory?
Die single, and thine image dies with thee.


15. Which files in you home directory should you not view with the cat or more commands?
binary (unprintable) data files (e.g. what_am_i) use file* to identify them


16. What key should you type when you want to exit from the more command?
q


17. What ls command-line allows you to see the permissions of your home directory while you are in your home directory?
ls -ld


18. What Unix command will allow you to look at the contents of a data (binary) file?
xxd


19. From your home directory what is the relative path to sonnet1?
Poems/Shakespeare/sonnet1


20. What Unix command will allow you to look at the contents of a data file?
xxd



21. What command will give you a prompt showing your current working directory path and a $?
PS1='$PWD $'


22. How many lines are in Shakespeare's sonnet1?'
14


23. What english word do you see between hex offset 00000f0 and 0000100 of the file what_am_i?
fruit


24. What file in the Miscellaneous directory is a symbolic link to another file?
mystery


25. What is the inode number of the file being linked to?
nnnnnn (varies, must be inode number of your bin/enlightenment file though)


26. Extra Credit (2 pts): With what command can you list only the hidden files of your home directory?
ls -a | grep '^\.'
ls -a | grep ^[.]
file .*
echo .*
User avatar
Rich Simms
Site Admin
 
Posts: 640
Joined: Thu May 15, 2008 2:44 pm

Return to CIS 90 - Fall 2008

Who is online

Users browsing this forum: No registered users and 0 guests

cron