BASE="/home/ec2-user/feeds/transit"
for file in /home/*
do
if [ "$file" != "/home/ec2-user" ]; then
echo Copying ${file} to ${BASE}${file}
mkdir -p ${BASE}${file}
sudo bash -c "cp -vr ${file}/* ${BASE}${file}"
fi
done
sudo bash -c "chown -vR ec2-user:ec2-user $BASE/*"
Friday, June 3, 2011
bash script for copying and chown-ing contents of /home
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment