Question: 21. This find command does find all files on the system who are members of the 'audit' group. A. find / -g=audit print B. find

21. This find command does find all files on the system who are members of the 'audit' group.

A. find / -g=audit print

B. find / -file group=audit print

C. find / -name g "audit" print

D. find / -gr audit print

E. find / -group audit -print

22. This find command does find all directories and then sort them.

A. find . -dir -print | sort

B. find . -typed -print | sort

C. find . t=d -print | sort

D. find . t=dir -print | sort

E. find . -directory -print | sort

23. This find command does find all the ordinary files and then

test each file for its type.

A. find / -type f -

print | xargs file

B. find / -t=f -print | xargs type

C. find / -file -print | xargs file

D. find / -type=f -pr

int | xargs filetype

E. find / -f -print | xargs file

24. This find command does locate all files in public_html that are read, write and executable by everyone, and takes away the write permission.

A. find public_html p=7 print | xargs chmod o-w

B. find public_html -perm -7print | xargs chmod o-w

C. find public_html p="**7" print | xargs chmod o-w

D. find public_html perm=007 print > xargs chmod o-w

E. find public_html filemode="007" print | xargs chmod o-w

25. This is to find all the files in the /apps directory but do not search in /apps/bin:

A. find /apps -name prune "/apps/bin" -o -print

B. find /apps -name "/apps/bin" -prune -o -print

C. find /apps/bin -name "/apps" -o -print

D. find /apps -name skip "/apps/bin" o print

E. find /apps -filename skip "/apps/bin" o print

5

26. To find all files that have been modified in the last five

days:

A. find / -mtime +5 -print

B. find / -mtime -5 print

C. find / -mtime 5+ print

D. find / -mtime 5- print

E. find / -mtime 5* -print

27. To find files in /var/adm di

rectory that have not been mod

ified in the last five days:

A. find / -mtime +5 -print

B. find / -mtime -5 print

C. find / -mtime 5+ print

D. find / -mtime 5- print

E. find / -mtime ^5 -print

28. To find all directories in /etc

A. find /etc -ty

pe dir -print

B. find /etc -type d -print

C. find /etc -dir -print

D. find /etc type=d -print

E. find /etc -d -print

29. To find all files but not directories in /etc

A. find /etc -type !dir -print

B. find /etc !-type d -print

C. find /etc -!dir -print

D. find /etc t=!d -print

E. find /etc ^d -print

30. To match all filenames that

start with f, followed by any

two characters, followe

d by any string; the end

character must be an s:

A. ls f??[?*]s

B. ls f??*s

C. ls f**?s

D. ls f?**s

E. ls f**+s

31. To list all filenames that

start with an i or o:

A. ls io*

B. ls [i][o]*

C. ls [io]*

D. ls io\*

E. ls (io)*

32. To match filenames that begin

with log., followed by a si

ngle number, followed by any other character.

A. ls log.(0-9)*

B. ls log.[0-9]?

C. ls log.[0..9]*

D. ls log.[^0-9]*

E. ls log.[0-9]*

6

33. To list all filenames that hav

e the same criteria as above

but with no numbers.

A. ls log.[!0-9]*

B. ls log.![0-9]*

C. ls log.[~0-9]*

D. ls log.(!0..9)*

E. ls log.[[not 0-9]]*

34. To match filenames that sta

rt with CPP, where the next tw

o characters can be anything

, but the next character

must be a 1:

A. ls CPP??[1]

B. ls CPP**[1]

C. ls CPP??{1}

D. ls CPP??[$1]

E. ls CPP??*[1]

35. To match filenames that sta

rt with CPP, followed by any t

wo characters, followed

by any non-digit string:

A. ls CPP??[!0..9]*

B. ls CPP??[~0-9]*

C. ls CPP??[^[0-9]]

D. ls CPP??[!0-9]*

E. ls CPP??[~[0..9]]*

36. To match filenames starting with an upper case letter only:

A. ls [A-Z]*

B. ls [A..Z]*

C. ls [A-Z]?

D. ls "A-Z"*

E. ls (A..Z)*

37. To match filenames starting

with a lower case letter only:

A. ls (a..z)*

B. ls [a-z]?

C. ls "a-z"*

D. ls [a-z]*

E. ls {a-z}*$

38. To match only numbered filenames use:

A. ls (0..9)*

B. ls [0-9]?

C. ls "0-9"*

D. ls [0-9]*

E. ls {0-9}*

39. To match all your .files (that is, any hidden files begins

with a period).

A. ls .*

B. ls *.*

C. ls [.*]

D. ls (.)*$

E. ls "."*

7

40. To list filenames where the

first two characters can be any

character, followed by an R, followed by any string:

A. ls **R*

B. ls *{2}R-

C. ls ^??R*

D. ls $??R*

E. ls ??R*

Consider the following problems (

#41-#50) with grep command. Th

e content of data.txt is:

48 Dec 3BC1997 CPPX 68.00 LVX2A 138

483 Sept 5AP1996 USP 65.00 LVX2C 189

47 Oct 3ZL1998 CPPX 43.00 KVM9D 512

219 dec 2CC1999 CAD 23.00 PLV2C 68

484 nov 7PL1996 CAD 49.00 PLV2C 234

483 may 5PA1998 USP 37.00 KVM9D 644

216 sept 3ZL1998 USP 86.00 KVM9E 234

41. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '48[34]' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

42. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '[Ss]ept' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

43. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '[Ss]ept' data.txt | grep 483

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

8

44. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep 'K...D' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

45. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '[A-Z][A-Z]..C' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

46. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '5..199[6,8]' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

47. What would be the result of the following grep command with

the data.txt file as provided above.

grep '[0-9]\{3\}[8]' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

48. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '[0-9][0-5][0-6]' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

49. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '5[[:upper:]][[:upper:]]' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

50. What would be the result of the following grep command with

the data.txt file a

s provided above.

grep '^[^48]' data.txt

A. 0

B. 1

C. 2

D. 3

E. 4

F. 5

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!