Re: [SLE] changing ownership for diferent users from the command line
23 Dec
2001
23 Dec
'01
00:06
"=?iso-8859-1?Q?Ra=FAl_Guti=E9rrez_Segal=E9s?="
I have a webmail service in a server and today after a backup & restore all the ownerships got messed up so now everything is owned by user root and group root, how can I do, perhaps with a little shell script, to change for example every file that starts with user_name (than_random_letters_generated_by_the_webmail_software) to have owenership user_name.users ???
Use find(1): #!/bin/bash users="user1 user2" for i in $users; do find . -name "${i}*" -print0 | xargs --null chown ${i}.users done -- Alexandr.Malusek@imv.liu.se
8161
Age (days ago)
8161
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandr Malusek