In: Computer Science
CompTIA Linux+ Guide to Linux Certification (4th Edition)(Please do not do it in a mac and add pictures of the machine.)
Project 4-6 In this hands-on project, you delete files and directories using the rmdir and rm commands.
1. Switch to a command-line terminal (tty2) by pressing Ctrl+Alt+F2 and log in to the terminal using the user name of root and the password of LNXrocks!.
2. At the command prompt, type cd samples and press Enter. At the command prompt, type ls -R and press Enter. Note the two empty directories todelete and undermysamples.
3. At the command prompt, type rmdir undermysamples todelete and press Enter. Did the command work? Why? Next, type ls –F at the command prompt and press Enter. Were both directories deleted successfully?
4. At the command prompt, type rm sample1* and press Enter. What message is displayed? Answer n to all three questions.
5. At the command prompt, type rm –f sample1* and press Enter. Why were you not prompted to continue? Next, type ls –F at the command prompt and press Enter. Were all three files deleted successfully?
6. At the command prompt, type cd .. and press Enter. Next, type rmdir samples at the command prompt and press Enter. What error message do you receive and why?
7. At the command prompt, type rm -Rf samples and press Enter. Next, type ls –F at the command prompt and press Enter. Was the samples directory and all files within it deleted successfully?
8. Type exit and press Enter to log out of your shell.
1. Logged into root user
2. Both directories were present
3. Both directories deleted successfully
4. No such file present to delete
5. Yes, all deleted successfully
6. No error message as they are deleted
7. Yes, directory is deleted
8. Exited from terminal
HOPE IT WILL HELP. THANKS.