Thursday, September 10, 2009

Shell script to change folder directory owner after restore

SkyHi @ Thursday, September 10, 2009

#!/bin/bash
HOMED="/home"
DIRS=$(ls -l $HOMED | grep ^d | awk '{ print $8}')
for d in $DIRS
do
echo "chown -R $d.$d $HOMED/$d"
done