list out owned file/directories and change its permissions

1

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>

Ahmad

Posted 2014-02-12T15:36:42.453

Reputation: 199

Answers

2

find . -user olduser -exec chown newuser:newuser -- {} . \;

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

Bruno9779

Posted 2014-02-12T15:36:42.453

Reputation: 1 225

Too many args to exec? What is the purpose of the dot? – Mad Physicist – 2014-02-12T16:19:48.107

Now that you mention it, I have always used it, but it works without... – Bruno9779 – 2014-02-14T15:59:12.223

The dot does something you may not intend since it changes the owner of the current directory every time. – Mad Physicist – 2014-02-14T20:04:15.770