4.3 Browsing, the file system, and re-direction |
TABER CIS137-- Lab: 4.3
Name:
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?
cd ..
cd
" & "..
".
Again issue the pwd
. Where are you now? Where are you now?username@gort ~ $
cdusername@gort ~ $
pwd
/
".
Please note that the return value from the pwd
command
is an absolute reference.
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 isusername@gort ~ $
cd /usr/binusername@gort ~ $
ls -l
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?4.3 Browsing, the file system, and re-direction |