#!/bin/bash
# Search for files with pattern name defined on name var, then
# apply new user, group and other perms. located in path
old_user='gin';
new_user='shakka';
old_group='guest';
new_group='geek';
name='*.ogg'
path='/home/gin/video/';
perm='700';
chmod ${perm} `find ${path} -name ${name} -user ${old_user} -group ${old_group}`;
chown ${new_user}:${new_group} `find ${path} -name ${name} -user ${old_user} -group ${old_group}`;
exit 0;
bash
1
#!/bin/bash# Search for files with pattern name defined on name var, then# apply new user, group and other perms. located in pathold_user='gin';
new_user='shakka';
old_group='guest';
new_group='geek';
name='*.ogg'path='/home/gin/video/';
perm='700';
chmod ${perm}`find ${path} -name ${name} -user ${old_user} -group ${old_group}`;
chown ${new_user}:${new_group}`find ${path} -name ${name} -user ${old_user} -group ${old_group}`;
exit 0;
Hey there! I see you're running Internet Explorer 6.
That's neat. This reminds me of my grandpa. He had this old car that he kept having to fix. He spent so much money on it that he didn't want to get rid of it (even when it stopped running).
0 Comments