Linux: copy files based on a user

The script is incomplete but can be tweaked to meet your needs

find /root/ -user apache -print | \
while read file
do
cp "$file" /root/test1/`"$file"`
done

Comments are closed.