4.3 Browsing, the file system, and re-direction |
The purpose of this lab is to get some familiarity with the UNIX file system. Like the last lab, please take some time with this. There is LOTS to learn here.
Issue the pwd
command. This will show you your path to your
current working directory. This is an important concept. If you don't
specify otherwise, this command will shows you where relative file names
start from and the default location of files you create.
What directory did you get?
Issue the command cd ..
Note: The space between "cd
" & "..
".
Again issue the pwd
. Where are you now?
username@gort ~ $
cdusername@gort ~ $
pwd
Where are you now?
/
".
Please note that the return value from the pwd
command
is an absolute reference.
username@gort ~ $
cd /usr/bin username@gort/usr/bin $
ls -l
Did you get that? That list of files is just some of the
executable programs
available to you
this semester. One of the "problems" with todays computers and the
attached displays is that they are so fast. Unix (and other) systems
provide programs for slowing down the output.
The "standard" Unix command to do this is more
.
On gort, many Unix systems and Posix systems less
will also be installed. Both function in very much the same way.
Re-direct the output of the above command into less
.
username@gort ~ $
ls -l /usr/bin | less
What is the file size of that strange file named "[
"?
h
" (for help). What does the
letter "q
" do? q
" (After you have read it).
Search forward for head
. What is the size of the executable?~
"
at the beginning of a file name specifies a user directory.
You can use the charater sequence "~/
" to refer to your
home directory.
username@gort ~ $
cd ~cis137
How large is the bourne.script
file?
.welcome
What does it say?
username@gort ~ $
wc .welcome
How many lines words and characters does it have in it?
username@gort ~ $
cat .welcome | wc
How is the output different?
username@gort ~ $
man 7 hier
Notice that you are in the paging program. less
or more
.
What is the /home
directory used for?
Turn in this sections pages with your answers (or a copy).
Please turn your lab to Louis Taber or to Pima Community College employee in room A-115 of the Santa Rita Building. Ask them to place it in the dark blue folder in Louis Taber's mailbox.
Instructor: Louis Taber, louis.taber.at.pima at gmail dot com (520) 206-6850
My web site in Cleveland, OH
The Pima Community College web site
4.3 Browsing, the file system, and re-direction |