Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Can anyone please tell how can I change files/directories owned by me only.

below is the command that list out files/directories owned by me

 find . -user <username>
share|improve this question

1 Answer 1

up vote 2 down vote accepted
find . -user olduser -exec chown newuser:newuser -- {} . \;

You may need to switch to root user or use sudo before chown

share|improve this answer
Too many args to exec? What is the purpose of the dot? –  Mad Physicist Feb 12 '14 at 16:19
Now that you mention it, I have always used it, but it works without... –  Bruno9779 Feb 14 '14 at 15:59
The dot does something you may not intend since it changes the owner of the current directory every time. –  Mad Physicist Feb 14 '14 at 20:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.