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 5 discussion

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

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

Show Suggested Answer Hide Answer
Suggested Answer: See explanation below.
# cd /opt/
# mkdir dir
# find / -user harry -exec cp -rfp {} /opt/dir/ \;

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
airphreak
Highly Voted 3 years, 3 months ago
find / -user Harry -type f -exec cp {} /opt/dir \;
upvoted 17 times
...
thomasstate
Most Recent 4 months ago
why does it take time to process the command
upvoted 1 times
MichaelChapoco
3 months, 1 week ago
add -rf to the exec command
upvoted 1 times
...
...
Abhilashasok
7 months ago
# cd /opt/ # mkdir dir # find / -user harry -type f -exec cp -rfp {} /opt/dir/ \;
upvoted 1 times
...
ertgrty
7 months, 1 week ago
#mkdir /opt/dir #find / -type f -user Harry -exec cp {} -ar /opt/dir \;
upvoted 1 times
ertgrty
7 months, 1 week ago
sorry #mkdir /opt/dir #find / -type f -user Harry -exec cp -ar {} /opt/dir/ \;
upvoted 1 times
...
...
Rahul95
10 months ago
#mkdir -p /opt/dir #find / -user harry -exec cp -rfp {} /opt/dir/ \; #ls ltr /opt/dir - to verify if files appeared or not
upvoted 1 times
...
jahmad0730
10 months, 1 week ago
What is the answer please? Syntax in the example is not working. [root@station /]# find / -user tom -exec cp {} /opt/dir/ \; cp: '/opt/dir/.bash_logout' and '/opt/dir/.bash_logout' are the same file cp: '/opt/dir/.bash_profile' and '/opt/dir/.bash_profile' are the same file cp: '/opt/dir/.bashrc' and '/opt/dir/.bashrc' are the same file cp: '/opt/dir/tom' and '/opt/dir/tom' are the same file cp: -r not specified; omitting directory '/home/tom' find: ‘/proc/8531/task/8531/fd/6’: No such file or directory find: ‘/proc/8531/task/8531/fdinfo/6’: No such file or directory find: ‘/proc/8531/fd/5’: No such file or directory find: ‘/proc/8531/fdinfo/5’: No such file or directory
upvoted 1 times
...
tinythings
11 months, 4 weeks ago
mkdir -p /opt/dir cp -nr --parents $(find / /home -xdev -user harry) /opt/dir
upvoted 1 times
...
Mayowa15
1 year, 3 months ago
after copy them to /opt/dir , how can I verify that is really copy to that? please. I run #cat /opt/dir but don't really see what make me sure. thanks
upvoted 1 times
...
Ghassen0008
1 year, 5 months ago
plz i need account exam topics plzzz [email protected]
upvoted 1 times
...
robust993
1 year, 5 months ago
it's very easy # find / -user harry -exec cp {} /opt/dir/ \;
upvoted 1 times
...
Hayder_Alobaidi
1 year, 8 months ago
find / -user hayder -type f 2>/dev/null -exec cp '{}' /opt/dir \;
upvoted 3 times
...
maxim_sk
1 year, 10 months ago
for i in $(find / -user harry -type -f);do cp -rpvf $i /opt/dir;done
upvoted 1 times
maxim_sk
1 year, 9 months ago
i cannot edit, but the same as solution is: for i in $(find / -user harry);do cp -rpvf $i /opt/dir;done
upvoted 1 times
...
...
brahmimedamine
2 years, 1 month ago
find / -user harry -type f -exec cp -rpvf {} /opt/dir \; 2> /dev/null
upvoted 3 times
...
kenkct
2 years, 1 month ago
find / -type f -user harry -exec cp {} /opt/dir \;
upvoted 2 times
...
eid
2 years, 3 months ago
find / -user Harry -type f -exec cp -fp {}/opt/dir \; or cp -fp $(find / -user Harry -type f) /opt/dir
upvoted 1 times
...
eid
2 years, 3 months ago
find / -user Harry -type f -exec cp -fp /opt/dir \; or cp -fp $(find / -user Harry -type f) /opt/dir
upvoted 1 times
...
eldny
2 years, 4 months ago
find . -type d -user tester ! -path "./.*" -exec cp -rf {} I am excluding all the hidden files with ! -path "./.*"
upvoted 1 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 ...