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

31. To list all filenames that start with an ‘i’ or ‘o’: A. ls io* B. ls [i][o]*

ID: 3886272 • Letter: 3

Question

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}*

Explanation / Answer

31. C. ls [io]*

This command will displays filenames start with i or o.

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

This will displays required files. [0-9] means any number between 0-9 and * means any thing after that.

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

[0-9] means any number between 0-9,! Means not i.e it doesn't list any files having digit after log. Name and * means any thing after that.

34. A. ls CPP??[1]

Here ?? After CPP is here there might be any two characters and then [1] is after the given pattern whatever files ends with 1. Those files it will displays.

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

Same as above but it displays the files that doesn't ends with numeric digit.

36.A. ls [A-Z]*

It will displays the files starting with any upper case letter.

37. D. ls [a-z]*

It will displays the files starting with any lower case letter.

38.D. ls [0-9]*

It will displays the filesnames having numbers only.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote