Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Project 4 - 3 ESTIMATED TIME: 2 0 minutes OBJECTIVE: Organize files and directories. DESCRIPTION: In this hands - on project, you use the mv

Project 4-3
ESTIMATED TIME: 20 minutes
OBJECTIVE: Organize files and directories.
DESCRIPTION: In this hands-on project, you use the mv command to rename and move files and directories.
1
Switch to a command-line terminal (tty5) by pressing Ctrl+Alt+F5 and log in to the terminal using the user name of root and the password of LINUXrocks!.
2
Next, type ls -F at the command prompt and press Enter. Note the contents of your home folder.
3
At the command prompt, type mv sample1 and press Enter. What error message was displayed and why?
4
At the command prompt, type mv sample1 sample4 and press Enter. Next, type ls -F sample* at the command prompt and press Enter. How many files are listed and what are their names? What happened to sample1?
5
At the command prompt, type mv sample4 mysamples and press Enter. Next, type ls -F sample* at the command prompt and press Enter. How many files are there and what are their names? Where did sample4 go?
6
At the command prompt, type cd mysamples and press Enter. Next, type ls -F sample* at the command prompt and press Enter. Notice that the sample4 file you moved in Step 5 was moved here.
7
At the command prompt, type mv sample4.. and press Enter. Next, type ls -F sample* at the command prompt and press Enter. How many files are there and what are their names? Where did the sample4 file go?
8
At the command prompt, type cd .. and press Enter. Next, type ls -F at the command prompt and press Enter to view the new location of sample4.
9
At the command prompt, type mv sample4 mysamples/sample2 and press Enter. What message appeared on the screen and why?
10
Type y and press Enter to confirm you want to overwrite the file in the destination folder.
11
At the command prompt, type mv sample? mysamples and press Enter. Type y and press Enter to confirm you want to overwrite the file sample3 in the destination folder.
12
At the command prompt, type ls -F sample* and press Enter. How many files are there and why?
13
At the command prompt, type mv sample1* mysamples and press Enter. Type y and press Enter to confirm you want to overwrite the file sample1B in the destination directory.
14
At the command prompt, type ls -F sample* and press Enter. Notice that there are no sample files in the /root directory.
15
At the command prompt, type cd mysamples and press Enter. Next, type ls -F at the command prompt and press Enter. Notice that all files originally in /root have been moved to this directory.
16
At the command prompt, type cd .. and press Enter. Next, type ls -F at the command prompt and press Enter. Type mv mysamples samples and press Enter. Next, type ls -F at the command prompt and press Enter. Why did you not need to specify the recursive option to the mv command to rename the mysamples directory to samples?
17
Type exit and press Enter to log out of your shell.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beyond Big Data Using Social MDM To Drive Deep Customer Insight

Authors: Martin Oberhofer, Eberhard Hechler

1st Edition

0133509796, 9780133509793

More Books

Students also viewed these Databases questions

Question

=+What about SRI funds? Why, or why not?

Answered: 1 week ago