Created
September 24, 2012 13:54
-
-
Save scicco/3776059 to your computer and use it in GitHub Desktop.
Replace all files owned by a non existing user on system
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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