Unix Basics
This lab is intended for you to work on your own to practice the Unix commands
from class.
Follow these directions:
- You should be logged in, have a terminal session open and the web browser
with these instructions
- Issue the command to check what directory you are in
- If you are not in your home directory, move to it
- Create a directory named test and move to that directory
- Using the editor, create a file named sept.txt
- Copy sept.txt to testing
- Rename testing to today
- Copy today to your home directory and call it wonderbar
- change to your home directory
- Copy wonderbar to test and call it fabulous
- Copy wonderbar to test and call it magnificent
- Change to the test directory
- List the files
- List all the files including hidden files
- List all the files including hidden files with detailed information
- Type in garbage "hhhh" and before hitting enter, hold down the Ctrl key and hit the u key. The command should have been erased
- Issue the command "whereis ls". What does it tell you?
- Issue the command "which ls". What does it tell you?
- What is the difference between the w and the who commands
- display the value for the PATH environment variable
- remove the test directory and all the files
- change to your root directory
- Issue the command to list all files with additional information. Look at
the first 10 characters. The first - is used to indicate if the item listed
is a directory. The next 9 characters are permissions. They are in three sets
of three. Each set indicates if there is read, write, and execute
permissions on the file. So rwx would indicated all three permissions. But,
r-- would indicated only read, rw- would indicated read and write.
The first set of three are the permissions for you the user. The second
set of three apply to the group (currently only you). BUT the last set
of three apply to anyone who has access to the machine - which we refer
to as "other".
- From your home directory, carefully issue the following commands. After each command, check the long listing to determine what permissions changed.
- chmod go-rwx cs207
- mkdir public_html
- chmod go+rx public_html
- chmod go+x .
Running log for this lab