Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

9. This ___ is to find all ‘*.txt’ files in the current directory you are in and

ID: 3886262 • Letter: 9

Question

9. This ___ is to find all ‘*.txt’ files in the current directory you are in and any sub-directories,

A. find-name "*.txt" -print

B. find . -name "*.txt" -print

C. find .. -name "*.txt" -print

D. find / -name "*.txt" -print

E. find $HOME -name "*.txt" -print

10. This is ___ to find files with a permission which is "read,

write and executable" by owner and "read and

execute" by everyone else.

A. find . -perm 557 -print

B. find . -perm 022 -print

C. find . -perm rwx -print

D. find . -perm 755 -print

E. find . -perm 777 -print

11. To find all symbolic linked files in /etc:

A. find /etc –t=l -print

B. find /etc –type=s -print

C. find /etc -type s -print

D. find /etc -type l -print

E. find /etc -l -print

12. To find files that are over 10

bytes in length using the ch

aracter format use:

A. find . -size +10c -print

B. find . -size 10c -print

C. find . –s=10 –print

D. find . –s=+10c -print

E. find . size=10c -print

13. To find files that are over 10 blocks in length (that’s 512

bytes a block) use:

A. find . -size +10 -print

B. find . -size 10b -print

C. find . –s=10b –print

D. find . –s=+10b -print

E. find . size=+10 -print

14. This "find" command option will go and look at all the files first before hitting any of the directories or sub-directories.

A. -depth

B. -directory

C. -file

D. –name

E. -mount

F. -type

15. This "find" command option will go and look for files only

on the current filesystem and not on other (mounted)

filesystems.

A. -depth

B. -directory

C. -file

D. –name

E. -mount

F. -type

16. This find command does display the found files in "ls –l" format, using "ls –l" as the command to execute.

A. find . –t=f ; ls -l

B. find . -type f & ls -l

C. find . -type f -run ls -l

D. find . -type f-exec ls -l {} ;

E. find . -type f -prog { ls -l }

17. This find command does find files that have not been modified in the last five days in logs, and then delete them.

A. find logs –t=f –m=+5 -ex rm {} ;

B. find logs -type f -mtime +5 -exec rm {} ;

C. find logs -f –m=+5 -exec rm {} ;

D. find logs -type f -mtime -5 -run rm

E. find logs –mt=+5 -exec rm {}

18. This find command does find first for all ‘passwd*’ files,for example passwd, passswd.old, passwd.bak, then runs grep to see if there is a user ‘richard’ located in the files.

A. find /etc -n "passwd*"

-run grep "richard" {} ;

B. find /etc -file "passwd*" > grep richard

C. find /etc -filename "passwd*" -ex grep "richard" {} ;

D. find /etc –n="passwd*"

-prog { grep "richard" }

E. find /etc -name "passwd*" -exec grep "richard" {} ;

19. This find command does find all ordinary empty files on the

system, and list them with their full file

information.

A. find / -type f -siz

e 0 -exec ls -l {} ;

B. find / -type f –s=0 –run { ls -l }

C. find / -filesize 0 -prog ls -l {} ;

D. find / -type d s=0 -ex ls -l {} ;

E. find / -fs 0 | ls -l

20. This find command does find all ordinary files older then 7

days in /var/logs

and delete them.

A. find /var/logs –t=f

–mt=+7 -exec rm {} ;

B. find /var/logs -f –m>=7 -exec rm {} ;

C. find /var/logs –type=f –mtime>7 -prog rm

D. find /var/logs -type f

-mtime +7 -exec rm {} ;

E. find /var/logs -type f

-mtime +7 –run { rm }

Explanation / Answer

9. This ___ is to find all ‘*.txt’ files in the current directory you are in and any sub-directories,

B. find . -name "*.txt" -print

10. This is ___ to find files with a permission which is "read,

write and executable" by owner and "read and

execute" by everyone else.

E. find . -perm 777 -print

11. To find all symbolic linked files in /etc:

D. find /etc -type l -print

12. To find files that are over 10

bytes in length using the ch

aracter format use:

A. find . -size +10c -print

13. To find files that are over 10 blocks in length (that’s 512

bytes a block) use:

A. find . -size +10 -print

14. This "find" command option will go and look at all the files first before hitting any of the directories or sub-directories.

F. -type

15. This "find" command option will go and look for files only

on the current filesystem and not on other (mounted)

filesystems.

E. -mount

16. This find command does display the found files in "ls –l" format, using "ls –l" as the command to execute

D. find . -type f -exec ls -l {} ;

17. This find command does find files that have not been modified in the last five days in logs, and then delete them.

B. find logs -type f -mtime +5 -exec rm {} ;

18. This find command does find first for all ‘passwd*’ files,for example passwd, passswd.old, passwd.bak, then runs grep to see if there is a user ‘richard’ located in the files.

E. find /etc -name "passwd*" -exec grep "richard" {} ;

19. This find command does find all ordinary empty files on the

system, and list them with their full file

information.

A. find / -type f -size 0 -exec ls -l {} ;

20. This find command does find all ordinary files older then 7

days in /var/logs and delete them

D. find /var/logs -type f -mtime +7 -exec rm {} ;