Question: Intro to UNIX/Linux Chapter 7- Lab Name: Sec: Self Test 1 from the textbook. 1) What is the command to create a directory named




Intro to UNIX/Linux Chapter 7- Lab Name: Sec: Self Test 1 from the textbook. 1) What is the command to create a directory named Proposals? 2) What command changes your current directory to the Proposals directory? 3) What command changes your current directory back to the home directory? 4) What shell command can you enter to identify your current directory? 5) What 1s command option tells 1s to distinguish files from directories in its output? 6) Your home directory is your current directory, and you enter the command s cd Projects You then create a file named confused. What directory will list the confused file? 7) How is it possible to have two files with the same filename in your account? 8) Assume your home directory is your current directory. What command will move a file named florence to a directory named Proposals, which is a subdirectory of the home directory? 9) Assume you want to move the file ideas from the current directory to a subdirectory named Work, and you enter the following command: S mv ideas Work When you examine the Work directory, the file is not listed there. Where is it? Chapter 7- Lab 1o) In the current directory, what command would list the files of a subdirectory named Cows and distinguish between files and directories? Self Test 2 from the textbook. 1) What command takes you back to the previous directory? Assume you are using a bash shell. 2) What directory can a user be in to access a file using commands with arguments such as: A. S more /etc/passwd B. S more Studydiary C. S more Desk/journal D. S more Desk/journal 3) At this point, we have specified directories using a variety of instructions. In the following table, a cd command, including its argument, is on the left. Fill in the result of entering the specified cd command on the right- which directory will you change into? Command Result S cd .. Change to parent directory. S cd. ../bill s cd - S cd -/bill S cd -bill s cd -bill/bill s cd /bill $ cd bill Chapter 7- Lab Solve the following problems from Self Test 2 by first sketching a directory tree of the information presented. Show your work below. page 3 Directory Tree Sketch 4) Assume your current directory is not known. What command changes your current directory to a directory named Education, which is listed in a directory named Proposals, which is listed in your home directory? 5) From your home directory, what command do you enter to edit a file mikekerby that is listed in the Proposals directory? 6) From any directory, how can you create a directory Rejected, listed in the Proposals directory in your home directory? 7) Regardless of your current directory, how would you copy a file selquist from your home directory into Education, which is a subdirectory of the Proposals directory that is listed in your home directory? 8) What command changes your directory to the parent directory? 9) What command changes into the Marilyn directory listed in your home directory? 10) Assume the directories Programs and Letters have the same parent directory (your home directory) and that you are currently in the Programs directory. How do you change your current directory from Programs to Letters? page 4 Chapter 7- Lab 11) How would you move the file report7 in the current directory to the parent directory? 12) How can you copy all files from the current directory to the parent? 13) Given that you are located in your home directory, what are three different ways you can create a directory named Junkyvard in a subdirectory called Location that is in your home directory? i) ii) iii) 14) You are in your home directory, using the vi editor to edit a ffile called client-list that is under Proposals Contracts, You end the (vi) session. Which directory are you in now? 15) What command do you issue to use the vi editor to edit the file cats in the home directory of the user named Chris? 16) What command will copy a file called rhino to a subdirectory Africa and rename the file elephant? 17) What command would move the file vans from the subdirectory Transportation in the home directory of the user named pjaddessi to the /tmp directory, renaming the file cars? Self Test 3 from the textbook. 1) What command would you enter to move the file eakins, which is in your current directory, so that it is listed in your home directory? 2) What is the difference between the commands rmdir and rm -r? 3) Assume you are in the Projects directory, which has the subdirectories Old-projects and New-projects. What is the command to move the Bookproject directory from New-projects to Old-projects? 4) You are in your home directory, where there is a file named users on. What command will list the file in both your home directory and in the subdirectory Projects?
Step by Step Solution
3.42 Rating (146 Votes )
There are 3 Steps involved in it
1 The command to create a directory named Proposals is mkdir Proposals 2 The command to change your current directory to the Proposals directory is cd Proposals 3 The command to change your current di... View full answer
Get step-by-step solutions from verified subject matter experts
