Deal of The Day! Hurry Up, Grab the Special Discount - Save 25% - Ends In 00:00:00 Coupon code: SAVE25
Welcome to Pass4Success

- Free Preparation Discussions

RedHat EX200 Exam - Topic 7 Question 108 Discussion

Posted by Bethanie on Feb 10, 2025 at 11:37 AM

Find the files owned by harry, and copy it to catalog: /opt/dir

Suggested Answer: A

Get Premium EX200 Questions as Interactive Web-Based Practice Test or PDF Real Exam Format Detailed Explanations Instant Access Get Your Practice Test
37 comments · newest first
CR
Crista 10 months ago
Good point, but it’s a solid way to get the job done!
SH
Shawnee 11 months ago
Just a heads up, you might need sudo for that.
JA
James 11 months ago
Wait, does that really copy all files? Seems risky!
VI
Vi 11 months ago
Agree, but be careful with `-exec cp`—it can overwrite files.
JA
Janey 11 months ago
That's the right command to find files owned by harry!
AN
Angelo 12 months ago
I recall that using `-user` with `find` is the right approach, but I wonder if I should specify the full path for `cp` to avoid any issues.
TR
Tracie 12 months ago
I feel confident about using `mkdir` to create the directory, but I’m not sure if I need to include `-rfp` in the `cp` command.
ST
Stephaine 12 months ago
I practiced a similar question where we had to find files by size. I think the `-exec` option is correct, but I might have mixed up the flags for `cp`.
TR
Truman 1 year ago
I think I remember that the `find` command is used to search for files, but I'm not entirely sure about the syntax for copying them.
TH
Thomasena 1 year ago
This seems like a good opportunity to demonstrate my Linux skills. I'll give it my best shot.
SO
Solange 1 year ago
Wait, do I need to create the /opt/dir directory first? I'm not totally clear on that.
EM
Emelda 1 year ago
Okay, the key is to find the files owned by harry and copy them to the /opt/dir directory. I've got this!
MA
Malissa 1 year ago
Hmm, I'm a bit unsure about the find command and the -exec option. I'll need to review that part.
ER
Erick 1 year ago
This looks straightforward, I think I can handle it.
AS
Ashton 1 year ago
This is a solid solution, but I'm wondering if I should bring my own chair to the exam room. These tests can be a real pain in the butt.
EL
Elsa 1 year ago
↳ replying to Ashton
I never thought about bringing my own chair, but it's a good idea.
TO
Tonja 1 year ago
↳ replying to Ashton
I always bring a cushion to exams, it helps with the discomfort.
CA
Catalina 1 year ago
↳ replying to Ashton
You should definitely bring your own chair, just to be safe.
JU
Jules 1 year ago
Looks good, but I'm a little worried about the potential for copying sensitive files. Maybe we should add a check to skip any files in /etc or /var.
LA
Lawrence 1 year ago
↳ replying to Jules
That's a great idea, let's update the command to exclude /etc and /var.
MO
Mozell 1 year ago
↳ replying to Jules
Agreed, let's make sure to add that extra check to avoid copying any sensitive files.
SU
Susana 1 year ago
↳ replying to Jules
That's a good idea. We can modify the find command to include a check to skip any files in those directories.
AN
Annmarie 1 year ago
↳ replying to Jules
We can use the -path option in the find command to exclude those directories.
MA
Maryann 1 year ago
↳ replying to Jules
Good point, we definitely don't want to copy sensitive files. We can add a condition to exclude /etc and /var directories.
AV
Avery 1 year ago
↳ replying to Jules
Good point, we should definitely add a check to skip files in /etc or /var.
LA
Lauran 1 year ago
This is a great solution, but I wonder if there's a way to do it without using the root directory. Maybe we could start the search from /home/harry instead?
AR
Art 1 year ago
I like the use of find and exec to copy the files, but shouldn't we use -type f to only copy regular files?
GW
Gwenn 1 year ago
↳ replying to Art
Great, let's update the command to include -type f for copying the files.
JO
Jordan 1 year ago
↳ replying to Art
I agree, adding -type f will ensure we only copy regular files owned by harry.
KE
Kenia 1 year ago
↳ replying to Art
Yes, that's a good idea. Let's make sure to include that in the command.
SC
Scarlet 1 year ago
↳ replying to Art
Good point, we should definitely add -type f to only copy regular files.
TH
Therese 1 year ago
This looks like the right solution, but I'm not sure about the -rfp flags. Are they necessary?
TR
Truman 1 year ago
↳ replying to Therese
You can try running the command without the flags and see if it works, but it's recommended to include them for proper file copying.
RU
Rueben 1 year ago
↳ replying to Therese
Yes, the -rfp flags are necessary to preserve the file permissions and copy recursively.
CE
Celestina 2 years ago
Yes, we need to use 'find' command with '-user harry' option and then 'cp' command to copy the files to /opt/dir.
KI
Kimberlie 2 years ago
I agree, but I remember the command to find and copy files owned by harry.
CE
Celestina 2 years ago
I think this question is tricky.
0/2000 characters

Save Cancel