Question: Use of Find command and Regular Expression. Create a subdirectory(a1p3) in cs3377 directory Using the find utility, perform the following tasks (where the directory is
Use of Find command and Regular Expression.
Create a subdirectory(a1p3) in cs3377 directory
Using the find utility, perform the following tasks (where the directory is "/usr/include").
Try first "ls R /usr/include | wc"
| ls -R | wc 24379 23090 362358
|
This tells that there are 24379 entries in /usr/include.
Task#1. List all files in the directory and all subdirectories that have been modified within the last 30 days. How many are they? List the number (count) of the files listed as well. First, you may run this command with a pipe to wc command to get an estimate for the number of the files.
(Note. You may be a bit overwhelmed by the sheer size of /etc directory. To avoid those files without your access, you may get first the list of the files to find first those files that you can access to work with.)
| command(s) in pipe, including find command, to do this task
|
| the result of command(s) run the list of the files and then the count
|
Task#2. List all files you have read access in the directory and all subdirectories that are larger than 1 kilobyte.
How many are they? List the number (count) of the files listed as well. You may run the same command pipe to wc command to list the number of the files.
| command(s) in pipe, including find command, to do this task
|
| the result of command(s) run the list of the files and then the count
|
Task#3. List the inode numbers of all files in the directory whose filenames end in .c.
| command(s) in pipe, including find command, to do this task
|
| the result of command(s) run the list of the files and then the count
|
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
