Due: Tuesday, February, 6, 1:00 PM
Most of these questions are based on a common directory structure found at
~wilsonp/ep476-hw1.
Prepare a standard text file with the answers to these questions, as appropriate. Send the text file to me by email.
-
What is the command that will tell you the full path of this directory? What is that full path?
-
Describe the contents of this subdirectory in a way that shows the hierarchy and indicates which are files, which are directories and which are symbolic links.
-
Write a script with the commands that would accomplish the following in precisely this order:
- make a new copy of the entire directory structure from its original
location (
~wilsonp/ep476-hw1) to the current directory, and in that new copy: - create an environment variable called
NUCLEAR_DIRthat refers to the absolute path of the top-level directory of this copy, i.e. the directory that was created by making the copy - Create an alias that will show you a long listing of the
fissiondirectory that you copied above. - change to the
fusiondirectory - rename the
tokamak.rstfile to betokamak.txt - make two directories:
magneticandinertial - move the
tokamak.txtandstellarator.txtfiles to themagneticdirectory - move the
iec.txtandlaser.txtfiles to theinertialdirectory - list the contents of the
thermalsubdirectory of thefissiondirectory - create a symbolic link in your current directory (
fusion) to thehybrid.txtfile that is in thefissiondirectory - Change the permissions of the directory referenced in
NUCLEAR_DIR, and all of the directories and files below it, so that others can view it. You may also have to change the permissions of some directories above it to ensure that it is accessible. It is advisable to give the minimum possible permissions to the directories above this one. I will check these permissions by accessing the directory indicated byNUCLEAR_DIRabove. - change your prompt to remove only the username and hostname portion
Attach your script as a separate file to your email.
- make a new copy of the entire directory structure from its original
location (
-
Repeat question #2 with the new directory structure.
-
In what ways does tab completion improve both accuracy and efficiency when working with the command-line?
-
What did you learn about the command-line that might affect the way that you work?