THE POUND SIGN (#) PRECEDES COMMENTS: THE ACTUAL QUESTIONS BEGIN WITH THE STRING "QUESTION"
# ASK THE SOLARIS SHELL WHAT MY CURRENT NAME IS AS THE USER, AS
WELL AS THE "DEVICE LINE" I'M USING, AND WHEN I LOGGED IN.
%who am i
ucbext1 /dev/pts/5 Sep 19 18:28
# PRINT TO STANDARD OUTPUT (THE SCREEN) THE ABSOLUTE PATH NAME OF
THE CURRENT WORKING DIRECTORY.
%pwd
/home/users/ucbext1/talbert
QUESTION 1: HOW DID I GET TO HERE?
%pwd
/home/users/ucbext1/talbert/mydirLevel1/mydirLevel2
QUESTION 2: WHAT AM I ASKING FOR AS A RELATIVE PATH TO NAVIGATE
TO? AM I NAVIGATING THE FILE SYSTEM (OR DIRECTORY TREE) UPWARD OR DOWNWARD?
%cd ../..
%pwd /home/users/ucbext1/talbert
QUESTION 3: CAN I GET USING ONE COMMAND OR MUST I USE TWO
COMMANDS?
%pwd
/home/users/ucbext1/talbert/mydirLevel1/mydirLevel2
QUESTION 4: DO I NEED A SPACE AFTER I TYPE cd? THIS COMMANDS
TAKES ME TO MY "h____" (complete the word).
%cd
%pwd
/home/users/ucbext1
QUESTION 5: WHEN I LIST FILES WITH THE -F SWITCH, WHAT DO THOSE
SLASHES (/) MEAN? WHY IS IT THAT README.template DOES NOT HAVE A / MARK APPENDED TO IT?
%ls -F
Mail/ jburns/ lethington/ talbert/
README.template jmueller/ mtuttle/
boverby/ kbonavia/ rpalmer/
dhulbert/ klacourse/ rroberts/
# EXIT THE SCRIPTING SESSION.
%exit
exit script done on Sun Sep 19 18:30:14 1999
QUESTION 6: USE THE MAN COMMAND TO DISCOVER THE PURPOSE OF THE FINGER COMMAND. WHAT IS ITS PURPOSE?
QUESTION 7: From your telnet prompt, type finger. Do you see
something similar to what is below? How long has it been since Cynthia Hoffman typed a
command (how long has this user been idle)?
%finger
Login Name TTY Idle When Where
ratty =LMS=Tamera J. Ferro pts/1 2:49 Sun 13:23 ppp7-83.corp.cp.net
choff =CH2=Cynthia Hoffman *pts/8 4d Wed 13:45 fence27.ppp.lmi.net
ucbext1 =UCBE0001=Thomas Alb pts/3 Sun 16:31 talbert.vip.best.com
choff =CH2=Cynthia Hoffman *pts/9 6d Mon 10:40 fence44.ppp.lmi.net
ignacio =IRN=Ignacio Fernand pts/7 4:42 Sun 14:58 toolshed22.ppp.lmi.n
QUESTION 8: In your personal directory is a file called class1script. How big is this file? What command did you use to find out its size? Did you have to add any arguments to the command? If so, which argument(s)?
QUESTION 9: Type the following command:
cat class1script | grep bover
HOW MANY LINES DO YOU SEE? WHAT DO THESE LINES HAVE IN COMMON?
QUESTION 10: HIT THE UP ARROW. DO YOU SEE THE PREVIOUS COMMAND
APPEAR? CAN YOU EDIT THE COMMAND? IF SO, TRY THIS COMMAND:
cat class1script | grep Sun
HOW MANY LINES DO YOU SEE? WHAT DO THESE LINES HAVE IN COMMON?
Finally, edit the command to get the following:
cat class1script | grep Rutgers
HOW MANY LINES DO YOU SEE? WHAT DO THESE LINES HAVE IN COMMON?
QUESTION 11: Navigate to the /dev directory. Does it have any subdirectories? Can you navigate to /dev/dks? How can you find out how many device drivers there are for disks? How many disks do you think the shell server file system has?
QUESTION 12: Type cat class1script | more
WHAT DO YOU SEE EACH TIME YOU HIT RETURN? WHAT HAPPENS IF YOU TYPE THE LETTER q?
QUESTION 13: Experiment with the find command and the wildcard
character *. What kinds of files can you find? Where are the files you find?
> pwd
/home/users/ucbext1
> ls
Mail jburns lethington talbert
README.template jmueller mtuttle
boverby kbonavia rpalmer
dhulbert klacourse rroberts
> find boverby/*test*
QUESTION 14: TYPE env AND READ THE OUTPUT. THE SHELL SERVER, WHICH IS IN THE CITY OF BERKELY, IS RUNNING WHICH OPERATING SYSTEM? WHAT IS THE NAME OF THE COMPUTER IN BERKELEY? WHAT KIND OF A COMPUTER IS IT? WHO IS THE VENDOR OF THE OPERATING SYSTEM. IS THE COMPUTER HARDWARE ITSELF A MACHINE THAT LANMINDS BOUGHT FROM SUN MICROSYSTEMS? WHAT KIND OF PROCESSOR DOES THE MACHINE HAVE?
QUESTION 15: TYPE ls -F /bin AND DESCRIBE WHAT KIND OF FILES YOU SEE. WHY DO THESE FILES APPEAR WITH THE * AT THE END? (HINT: USE man ls TO FIND THE ANSWER.)
Happy Hacking. Please email your work and any questions to talbert@WORDesign.com
Thank you and see you Thursday.
_______________
copyleft 1999 Thomas Albert