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 ../../
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.
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....
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...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of...
1. By convention, how are configuration files separated from regular files? (NOTE: A practical effect of the separation is that they are not displayed by the default version of the ls command)                         a. the prefix "rc" (rc.filename)               c. the extension .cfig                         b. a dot (.) at the beginning                    d. by having the SUID bit set 2. The IP address which is reserved for local loopback (equivalent to "localhost") is:                         a. 255.255.255.0                                   c. 192.168.70.1...
At the command prompt, change to your home folder. Enter the following command and press enter....
At the command prompt, change to your home folder. Enter the following command and press enter. tree This command displays a graphical "tree view" of the folders in your home folder. Copy and paste the entire output of your tree command into the space provided below. Be sure you have executed the command from your home folder.
UNIX COMMANDS Task B Create a one-line command, using the famous.dat file, to add the word...
UNIX COMMANDS Task B Create a one-line command, using the famous.dat file, to add the word " STREET" to the address, for all who live on 2nd or 3rd. For example: "2nd" becomes "2nd STREET" and "3rd" becomes "3rd STREET". Display only the first 9 lines. Hint: Use 2 sed statements with pipes. Task C Display all lines in famous.dat that end in 0 or 1, and have a 1 in the 3rd from the last column. For example lines...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT