Instructions Fill in the Answer column with the proper Linux
Instructions
Fill in the Answer column with the proper Linux command.
Description
Answer
1. Remove the empty Linux directory called personal.
2. Change from the current directory to the root directory.
3. List all of the files, including hidden files, in the boot directory.
4. Find all files named secret.txt (ignoring sentence case) in the current directory and all subdirectories.
5. Rename myfile1 to myfile2.
6. Create a new directory called working.
7. Display the contents of the secret.txt file.
8. Remove the personal directory, including any files and subfolders.
9. Copy the secret.txt file from the current directory into the /home/quarantine directory.
10. Display the current directory path.
| Description | Answer |
| 1. Remove the empty Linux directory called personal. | |
| 2. Change from the current directory to the root directory. | |
| 3. List all of the files, including hidden files, in the boot directory. | |
| 4. Find all files named secret.txt (ignoring sentence case) in the current directory and all subdirectories. | |
| 5. Rename myfile1 to myfile2. | |
| 6. Create a new directory called working. | |
| 7. Display the contents of the secret.txt file. | |
| 8. Remove the personal directory, including any files and subfolders. | |
| 9. Copy the secret.txt file from the current directory into the /home/quarantine directory. | |
| 10. Display the current directory path. |
Solution
1. Remove the empty Linux directory called personal.
rmdir personal
2. Change from the current directory to the root directory.
cd /
3. List all of the files, including hidden files, in theboot directory.
ls -a
4. Find all files named secret.txt (ignoring sentence case) in the current directory and all subdirectories.
ls secret.txt
5. Rename myfile1 to myfile2.
mv mfile1 myfile2
6. Create a new directory called working.
mkdir working
7. Display the contents of the secret.txt file.
cat secret.txt
8. Remove the personal directory, including any files and subfolders.
rm -rf personal
9. Copy the secret.txt file from the current directory into the /home/quarantine directory.
cp secret.txt /home/quarantine
10. Display the current directory path. pwd
| 1. Remove the empty Linux directory called personal. | rmdir personal |
| 2. Change from the current directory to the root directory. | cd / |
| 3. List all of the files, including hidden files, in theboot directory. | ls -a |
| 4. Find all files named secret.txt (ignoring sentence case) in the current directory and all subdirectories. | ls secret.txt |
| 5. Rename myfile1 to myfile2. | mv mfile1 myfile2 |
| 6. Create a new directory called working. | mkdir working |
| 7. Display the contents of the secret.txt file. | cat secret.txt |
| 8. Remove the personal directory, including any files and subfolders. | rm -rf personal |
| 9. Copy the secret.txt file from the current directory into the /home/quarantine directory. | cp secret.txt /home/quarantine |
| 10. Display the current directory path. pwd |

