Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam EX200 topic 1 question 79 discussion

Actual exam question from RedHat's EX200
Question #: 79
Topic #: 1
[All EX200 Questions]

SIMULATION -
1. Find all sizes of 10k file or directory under the /etc directory, and copy to /tmp/findfiles directory.
2. Find all the files or directories with Lucy as the owner, and copy to /tmp/findfiles directory.

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
(1)find /etc -size 10k -exec cp {} /tmp/findfiles \;
(2)find / -user lucy -exec cp -a {} /tmp/findfiles \;
Note: If find users and permissions, you need to use cp - a options, to keep file permissions and user attributes etc.

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
jjknow85
Highly Voted 2 years, 5 months ago
#mkdir /tmp/findfiles # find /etc -size 10k -exec cp -r {} /tmp/findfiles \; # find / -user lucy -exec cp -r {} /tmp/findfiles \;
upvoted 6 times
...
Frenzy
Most Recent 1 year, 11 months ago
mkdir /tmp/findfiles cp $(find /etc -size 10k) /tmp/findfiles/ cp $(find / -user lucy) /tmp/findfiles/
upvoted 2 times
...
mattd81
1 year, 12 months ago
How would you check to see what is in the directory to verify your search?
upvoted 1 times
...
STFN2019
2 years, 7 months ago
Why not just use the following: find /etc -size 10k > /tmp/findfiles find / -user lucy >> /tmp/findfiles
upvoted 1 times
atilade
2 years, 7 months ago
/tmp/findfiles is a directory. You can only append to files
upvoted 2 times
...
reemartan
2 years, 6 months ago
This is just redirecting your command output to a file, but not copying the files to a directory
upvoted 3 times
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...