Question

Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume...

Manipulate directory structures in Unix/Linux

Use the OS that you set up from Question 1. Assume you are started at your home directory.

  1. Perform a command that displays the absolute path of your home directory (your current location).

  1. Create a new directory inside your home directory and name it “Assignment-3”

  1. Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and Test2.

  1. Now navigate to the Assignmnet-3 directory and display the contents of your current working directory (the directory Assignment-3).

  1. Delete the directory Test2 and display the contents of the directory Assignment-3

    Manipulate directory structures in Unix/Linux

    Use the OS that you set up from Question 1. Assume you are started at your home directory.

  2. Perform a command that displays the absolute path of your home directory (your current location).
  3. Create a new directory inside your home directory and name it “Assignment-3”
  4. Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and Test2.
  5. Now navigate to the Assignmnet-3 directory and display the contents of your current working directory (the directory Assignment-3).
  6. Delete the directory Test2 and display the contents of the directory Assignment-3, this time using the long listing format and sort by modification time.
  7. Delete the directory “Assignment-3” and display the contents of the home directory.
  8. , this time using the long listing format and sort by modification time.
  9. Delete the directory “Assignment-3” and display the contents of the home directory.
0 0
Add a comment Improve this question Transcribed image text
Answer #1

Please find the step by step explanation for the required procedure.

Question# 1:

a. Perform a command that displays the absolute path of your home directory (your current location).

Answer: "ls -d ~" is the command displays the absolute path of home directory and "pwd" command is used for absolte path of current working directory.

Commands:

USER-PC>ls -d ~
/root
USER-PC>pwd
/root
USER-PC>

b. Create a new directory inside your home directory and name it “Assignment-3”

Answer: "mkdir" is used to create a directory.

Commands:

USER-PC>mkdir Assignment-3

c. Without moving into the directory you just made (staying in your home directory), create two new directories using one command inside of the Assignment-3 directory, and name them Test1 and Test2.

Answer: "mkdir -p Assignment-3/Test1 Assignment-3/Test2" is used to create directories in Assignment-3.

commands:

USER-PC>mkdir -p Assignment-3/Test1 Assignment-3/Test2

d. Now navigate to the Assignmnet-3 directory and display the contents of your current working directory (the directory Assignment-3).

Commands:

USER-PC>cd Assignment-3/
USER-PC>ls
Test1 Test2
USER-PC>

e. Delete the directory Test2 and display the contents of the directory Assignment-3

commands:

USER-PC>rm -r Test2
rm: remove directory ‘Test2’? y
USER-PC>ls
Test1
USER-PC>

j. Delete the directory Test2 and display the contents of the directory Assignment-3, this time using the long listing format and sort by modification time.

Answer: "ls -ltr" command is used to sort using modification time.

Commands:

USER-PC>ls -ltr
total 4
drwxr-xr-x 2 root root 4096 May 16 03:50 Test1

Delete the directory “Assignment-3” and display the contents of the home directory.

this time using the long listing format and sort by modification time

Answer: "rm -r" command is used to remove the directory.

Commands:

USER-PC>cd ..
USER-PC>rm -r Assignment-3/
rm: descend into directory ‘Assignment-3/’? y
rm: remove directory ‘Assignment-3/Test1’? y
rm: remove directory ‘Assignment-3/’? y
USER-PC>ls -ltr
total 4
-rw-r--r-- 1 root root 1320 Dec 4 2002 jcameron-key.asc

Screen shots for the all the Questions:

USER-PC>1sd root USER-PC>pwd /root USER-PC>mkdir Assignment-3 USER-PC>mkdir-p Assignment-3/Testl Assignment-3/Test2 USER-PC>c

Add a comment
Know the answer?
Add Answer to:
Manipulate directory structures in Unix/Linux Use the OS that you set up from Question 1. Assume...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Question 2: Manipulate directory structures in Unix/Linux (24 marks – 4 marks each) Use the OS...

    Question 2: Manipulate directory structures in Unix/Linux (24 marks – 4 marks each) Use the OS that you set up from Question 1. Assume you are started at your home directory. a) Perform a command that displays the absolute path of your home directory (your current location). b) Create a new directory inside your home directory and name it “Assignment-Two” c) Without moving into the directory you just made (staying in your home directory), create three new directories using one...

  • UNIX Manipulate directory structures. Display the absolute path of your home directory. Create a new subdirectory...

    UNIX Manipulate directory structures. Display the absolute path of your home directory. Create a new subdirectory called COP3353-temp in your home directory. Create a new subdirectory called assign1 in COP3353-temp. Create a new subdirectory called assign2 in COP3353-temp. Display the contents of the directory COP3353-temp. Delete the directory assign2. Display the contents of the directory COP3353-temp. Provide screenshots of each step and processes. Paste your screenshots in word document and send as attachent.

  • 1. Navigate to your home directory by typing cd. Now type ls and notice that there...

    1. Navigate to your home directory by typing cd. Now type ls and notice that there is a subdirectory called Downloads. Now navigate to the root of the file system by typing cd /. From here, which single command would you use to navigate directly to the Downloads folder that is located in your home directory? The output of the command would be as follows: 2. From the Downloads directory which single command would you use to navigate back up...

  • Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following...

    Using Kali Linux, the Windows Linux Sub-System, or another Debian based Linux distribution, perform the following tasks based on the Linux Fundamentals lecture. For this lab, take screenshots for all major steps completed to illustrate that each task was successfully completed the same method as would be used for other labs). Tasks: 1. Create a new user named Billy Bob using the command linter face 2. Add Billy Bob to the sudoers group 3. Update and upgrade your Linux distribution...

  • In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and...

    In unix/Linux Assume you have a subdirectory named dotofiles directly under your current working directory, and you have two files nomed datol and dotaz in your current directory. What command can you use to copy the data and dotaz files from your current working directory to the datafiles directory? TTT Artal 3120 T.... 5 BE36 Pantep Words: 0

  • Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell...

    Unix questions, i need help on Hint: Commands to study to answer this question: predefined shell variables, and .profile script file, echo SHELL, HOME, PATH, MAIL and TERM are predefined shell variables. You can use the value of a shell variable in a shell command putting $ in front of it. For example, to display the value of the HOME directory of the user, specify $HOME in the echo command like echo $HOME. Do not give just the value of...

  • Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using...

    Really need help from 11 on: Create the directory structure IFT383FinalExam/Activities/Activity1 in your home directory. Using the cat command, create a file named classRoster with the following fields, separated by a comma. Student ID First Name Last Name Grade Program of Study ASURITE ID (username) Add three records to your file. Display the contents of the file. Move the file classRoster to the directory Activity1. Go to the Activity1 directory. Display the directory you are in. Add read, write and...

  • do numbers 4-8 4. Given any directory, use the Is command to display: • all files...

    do numbers 4-8 4. Given any directory, use the Is command to display: • all files and sub-directories starting with the letter "D" (note do not list anything in any sub-directory) • its immediate sub-directories (sub-directories only, and no other ordinary files) its immediate hidden sub-directories only - take a screenshot (#3-3) that clearly shows the command and the result. 5. Assume that the following files are in the working directory: $ ls intro notesb ref2 section 1 section3 section4b...

  • Login to Suse Linux as root. Complete the task working as the root user. 1. What...

    Login to Suse Linux as root. Complete the task working as the root user. 1. What is your current directory. What did you enter at the command prompt to determine your current working directory? 2. Change directories if needed to find your foods (or food) file. Use vi to make the file contain 10 food items. Save your file and quit. Use the cat command, and option, and the argument food to display the food file with numbered lines. Use...

  • 19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can...

    19. UNIX/Linux normally include two editors: vi and (choose the single best answer). 20. You can use thecommand to create empty a create b. make c touch d mu 21. Which command can be used to leave vi temporarily to access the command line? 22 If you execute the contents of filel are sorted and the results are stored in file2. a sort file1 -ofile2 b. sort file1 >file2 c sort filel -d file2 d sort filel filez field or...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT