Question: Lab 2 . 1 Manage Files STEP 1 . Open a terminal window. Answer: Click Applications in the menu bar, then Utilities, then Terminal. STEP

Lab 2.1 Manage Files
STEP 1. Open a terminal window.
Answer: Click Applications in the menu bar, then Utilities, then Terminal.
STEP 2. Display your current directory.
Answer: Enter the following:
pwd
STEP 3. Using an absolute pathname, switch to the /etc directory.
Answer: Enter the following:
cd /etc
STEP 4. Using a relative pathname, move to the /etc/skel directory.
Answer: Enter the following:
cd skel
STEP 5. Using a relative pathname, move up one directory.
Answer: Enter the following:
cd
STEP 6. List the files in the current directory.
Answer: Enter the following:
ls
STEP 7. Perform a long display listing of the files in the current directory.
Answer: Enter the following:
ls -l
STEP 8. List all the files in the current directory that begin with the letter s.
Answer: Enter the following:
ls s*
STEP 9. Run the command that will determine the type of contents in the /etc/group file.
Answer: Enter the following:
file /etc/group
STEP 10. Display only the last five lines of the /etc/group file.
Answer: Enter the following:
tail -n 5/etc/group
STEP 11. Execute the command to return to your home directory.
Answer: Enter the following:
cd
STEP 12. Make a directory named data in the current directory.
Answer: Enter the following:
mkdir data
STEP 13. Copy the /etc/passwd file into the data directory.
Answer: Enter the following:
cp /etc/passwd data
STEP 14. Copy the /etc/ppp directory into the current directory (and ignore any Permission denied error messages).
Answer: Enter the following:
cp -r /etc/ppp
STEP 15. Rename the ppp directory that is located in the current directory to peers.
Answer: Enter the following:
mv ppp peers
STEP 16. Update the timestamp of the data/passwd file to the current date and time.
Answer: Enter the following:
touch data/passwd
STEP 17. Create a new empty file named test in the data directory.
Answer: Enter the following:
touch data/test
STEP 18. Delete the data/passwd file.
Answer: Enter the following:
rm data/passwd
STEP 19. Delete the peers directory.
Answer: Enter the following:
rm -r peers

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!