SIMULATION -
Locate all the files owned by ira and copy them to the / root/findresults directory.
SIMULATION -
Locate all the files owned by ira and copy them to the / root/findresults directory.
To locate all files owned by a user named 'ira' and copy them to the /root/findresults directory, you can use the 'find' command along with 'cp' and 'exec' options. Follow these steps: 1. Create the directory /root/findresults if it doesn't already exist using 'mkdir -p /root/findresults'. 2. Use the command 'find / -user ira -exec cp -a {} /root/findresults \\;'. This command will search the entire filesystem for files owned by 'ira' and execute the cp command to copy each found file to the /root/findresults directory, preserving attributes and links using the '-a' option.
cp -rp $(find / -user ira -type f) /root/findfiles
Thx Stachomir, that's really helpful
find / -user ira -type f -exec cp {} /root/findfiles \;