Introduction
to
Command line
(Just the Exercises)
Exercise
-
cd to your home directory
- create the girl/develop directory path
- navigate into the girl/develop directory
- create the it directory
- view the contents of the it directory
- navigate up two directories
- use the pwd command to verify you are home
- remove the girl/develop/it path
Exercise
- Create a new file named testfile in your home directory
- Grant yourself execute permission on the file
- Remove read permission on testfile from
your group and everyone else
- Delete testfile
Exercise
ls | grep bash
Use the "ls" and "grep" commands to print
out only the files in your home directory that contain the word "bash"
Exercise
- Run the top command
- Suspend the process
- Bring the process back into the foreground
Exercise
-
Clear your terminal and run the "yes" command
- Use the Ctrl+Z key sequence to suspend the process
- Use the "bg" command to send the process to the background
- Notice the output is still happening even though the process is running in the background
- Open a new terminal window, locate the PID for the "yes" process and use it to kill the process.
Exercise
- Use your up and down arrows to locate a past
command with one or more arguments
- Jump to beginning of the line
- Jump to the end of the line
- Change one of the arguments and run it
- Run the date command
- Re-run the command from step 4 using !
- Time the execution of your original
command by running time !!
Hit me up with questions.
jared.k.stilwell@gmail.com
@meany_face (twitter)