Skip to content

Instantly share code, notes, and snippets.

@scicco
Created September 24, 2012 13:54
Show Gist options
  • Save scicco/3776059 to your computer and use it in GitHub Desktop.
Save scicco/3776059 to your computer and use it in GitHub Desktop.
Replace all files owned by a non existing user on system
#!/bin/bash
for file in `find /home/foo/ -nouser`
do
echo $file
chown <NEW_OWNER>:<NEW_GROUP> $file
done
echo 'complete'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment