Linux: Copy files owned by a user to another folder


To copy all files owned by root in folder rpms to say folder docker-rpms, do this –


find rpms -user root -exec cp -f {} docker-rpms/ \;



Note: the destination folder needs to be created before running the command.

Kj [/.] Sreekumar programs computers as a hobby and profession. Into programming from his school days, Sree uses Codemarvels to key in facts and fixes he finds interesting while working on different projects. Some of the articles here give away a few shades of his philosophical leanings too.

Leave a Comment

Your email address will not be published. Required fields are marked *