Question: Context : Locate files based on their various attributes. Perform the following tasks to search for files given various criteria. Task 1. Find all files
Context: Locate files based on their various attributes. Perform the following tasks to search for files given various criteria.
Task
1. Find all files in the directory /srv/myfile with their SUID + SGID bits set. Write a list of matching filenames, one per line, to the file /opt/myfile/audit.txt, which has already been created. Ensure that you specify the absolute path to each file
2. Find all files in the directory /srv/myfile with mode 0640. Copy those files to the directory /var/opt/myfile/permissions, which has already been created. Ensure that you preserve the original permissions of the source files
3. Find all files in the directory /srv/myfile with a size that is exactly 1024 bytes. Copy those files to the directory /var/opt/myfile/size, which has already been created
4. Find all files in the directory /srv/myfile with a file extension of .txt which are not owned by the user cableguy. Write a list of matching filenames, one per line, to the file /opt/myfile/extensions.txt, which has already been created. Ensure that you specify the absolute path to each file
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
