ExamGecko
Question list
Search
Search

List of questions

Search

Related questions











Question 320 - XK0-005 discussion

Report
Export

A user is cleaning up a directory because it has more than 100,000 files that were generated from an experiment. When the user tries to remove the unneeded experiment files, the user receives an error:

arduino

cannot execute [Argument list too long]

Which of the following should the user execute to remove these files?

A.

find . -name 'experiment*.txt' -exec rm '{}' ;

Answers
A.

find . -name 'experiment*.txt' -exec rm '{}' ;

B.

rm -rf experiment*.txt

Answers
B.

rm -rf experiment*.txt

C.

rm --force experiment*.txt

Answers
C.

rm --force experiment*.txt

D.

for i in experiment*.txt; do find . -name $i -exec rmdir '{}' ; done

Answers
D.

for i in experiment*.txt; do find . -name $i -exec rmdir '{}' ; done

Suggested answer: A

Explanation:

The 'Argument list too long' error occurs when the number of files exceeds the command-line argument limit. The find command with -exec is a workaround, as it processes files one by one, avoiding the argument limit. This method is efficient for handling large numbers of files.

asked 09/10/2024
Michael Bodine
28 questions
User
Your answer:
0 comments
Sorted by

Leave a comment first