Question

Assume you are at your home directory: Write the commands: Create a directory DR1 Change to...

Assume you are at your home directory: Write the commands:

Create a directory DR1
Change to DR1
Create DR2 in DR1
Change to DR2
Also answer the following: What will each command do :
   5. enter cd .
   6. enter   cd ..
   7. enter    cd

Homework Answers

Answer #1

1) Create a directory DR1

mkdir DR1

2) Change to DR1

cd DR1/

3) Create DR2 in DR1 (assuming we are in DR1)

mkdir DR2

Or we can use option -p to ensure that parent directory exists, such as

mkdir -p DR1/DR2

4) Change to DR2

cd DR2/

5) cd .

. Represents current directory, so this will have no effect, we will remain in the present directory

6) cd ..

.. represents a directory which is one level up the current directory. So, suppose if you are in DR2 currently, this will take you back to DR1

7) cd -

This again means, go back one directory similar to above command cd ..

Know the answer?
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
Similar Questions
PART 4: Learn about commands to navigate the directory tree structure: use the ls –ali /  ...
PART 4: Learn about commands to navigate the directory tree structure: use the ls –ali /   command to review the contents of the / directory Review the Linux Filesystem Standard (FSSTD) and document the following directories’ contents / ------- |--bin |--boot               |--dev               |--etc |--home               |--lib               |--mnt               |--opt               |--root               |--sbin               |--tmp               |--usr               |--var 3. use the cd etc  OR cd /etc  to change your default directory to the etc directory 4. use the...
If your current working directory is /home/alice/Documents/Financial, and you want to change it to /home/alice, you...
If your current working directory is /home/alice/Documents/Financial, and you want to change it to /home/alice, you can use this command: a. cd .. b. cd ../alice c. cd /alice d. cd ../../
Linux commands, the answer only about writing commands 1. What is the cd command that will...
Linux commands, the answer only about writing commands 1. What is the cd command that will change the current directory (which is “bob”) to the alice directory using a relative pathname (use the simplest possible relative pathname). Be sure to return to the “bob” directory 2. What is the cd command that will change the current directory (which is “bob”) to the etc directory using a relative pathname (use the simplest possible relative pathname). Be sure to return to the...
Create a directory dir1 • Create a file file1 in dir1 • Go to home directory...
Create a directory dir1 • Create a file file1 in dir1 • Go to home directory • Remove owner write permission permission for dir1 • Go to dir1 • Remove file1 Explain your observation? Note: If you don't have write permission for a directory, then you can't delete a file in the directory. If you have write access to the file you can update the data in the file.
List a sequence of Linux commands you would execute after you successfully log on to your...
List a sequence of Linux commands you would execute after you successfully log on to your VM machine, make a directory called midterm in your home directory, create a simple C program called display.c in the newly created directory, compile the code using gcc compiler, and run the program, and finally, save the output to a text file called display.txt. Remember to briefly explain each command.
Write Linux command lines to do the following: 1. Create a directory with name “yourName_ID” 2....
Write Linux command lines to do the following: 1. Create a directory with name “yourName_ID” 2. Create a file with name “yourLastName.txt” inside the directory created in step.1 3. Write inside the created file exactly the following content (you may use editors such as vim, pico, ….): Linux Lab Lab. ToDo#1 Summer Semester 2019/2020# 4. Display the first 2 lines of the file. 5. Change the permission of the file to read write and execute for owner, groups and others....
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and...
PLEASE DO QUICK LINUX ASSIGNMENT PLEASE ILL THUMBS UP You need to paste the command and the output in a word document and submit it. Part1: 1. Log in to Linux using your user account name and password. 2. If you logged in using a graphical login screen, open a terminal window by clicking on the icon in the lower left corner of the desktop to open the main menu, then selecting System Tools, then Terminal. A terminal window opens....
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used...
Linux Operation SECTION 2 – File and Directory Permissions: FILE PERMISSIONS: What is the command used to find out which user account you are logged into?      . This command may come in handy in the following exercises. Ensure you are in your home directory of the student1 account. Use the echo command with output redirection to create a file called labfile4 and put the following text in this file: “This is the first line of labfile4”. Using the symbolic notation...
1. Create a new virtual hard disk 2. Make a new directory in /mnt 3. Find...
1. Create a new virtual hard disk 2. Make a new directory in /mnt 3. Find the disk in UNIX QA. What command did you use? 4. Create a single primary partition on the disk QB. What command did you use? Why primary and not extended? 5. Mount the disk to the directory you created under /mnt QC. Was the mount command successful? If not, why and what would you need to change so that the command is successful? 6....
Write UNIX commands to perform the following tasks. Each task must use exactly one line of...
Write UNIX commands to perform the following tasks. Each task must use exactly one line of command. Unless stated otherwise, all files are assumed to be at your current working directory. a) (10 points) Print your current working directory into a file named file1 b) (10 points) Assume that your current working directory is NOT the same as your home directory. Print all file and subdirectory names of your home directory into a file named file2. c) (15 points) Copy...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT