[SLE] script for chown + chgrp
Hi Susers, I have a sub-directory ( /tmp/local/ ) with 100 files all belonging to owner X and group Y. I would like to change the owner and the group of those files to owner A and group B. Anybody has a little script to change the owner and group ? Thanks a lot filip S7S7S7 S7S7S7 S7S7S7 S7S7S7 S7 S7 S7 S7 S7S7S7 S7 S7 S7S7S7 S7S7S7 S7 S7 S7 S7 S7 S7 S7 S7S7S7 S7S7S7 S7S7S7 S7S7S7 S7 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
On Wed, 20 Sep 2000, Filip wrote:
Hi Susers,
I have a sub-directory ( /tmp/local/ ) with 100 files all belonging to owner X and group Y. I would like to change the owner and the group of those files to owner A and group B. Anybody has a little script to change the owner and group ?
All the files are to be changed to ownerA: groupB? Whats wrong with chown A:B *.* Nick -- ----------------------------- Anybody got plans for an ark? ----------------------------- -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
On Wed, 20 Sep 2000, Filip wrote:
Hi Susers,
I have a sub-directory ( /tmp/local/ ) with 100 files all belonging to owner X and group Y. I would like to change the owner and the group of those files to owner A and group B. Anybody has a little script to change the owner and group ?
All the files are to be changed to ownerA: groupB?
Whats wrong with
chown A:B *.*
Nick --
Le jeu, 21 sep 2000, Nick Zentena a écrit : thanks worked perfectly, filip.
----------------------------- Anybody got plans for an ark? -----------------------------
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Hi, On Wed, Sep 20 2000 at 17:09 -0500, Nick Zentena wrote:
Whats wrong with
chown A:B *.*
It won't change files that have no dot in their name. Ciao, Stefan -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
On Wed, 20 Sep 2000, Nick Zentena wrote:
Whats wrong with
chown A:B *.*
*.* will NOT select all files under Linux. That's what's wrong. Just use * instead. Regards Ole -- Windows: Where do you want to go today? MacOS: Where do you want to be tomorrow? Linux: Are you coming or what? -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
Here are 2 methods. You will need to be root to do these, 1. If you want to change ownership of all files: cd /tmp/local chown -R A:B * 2. If you want to be selective, use find. find /tmp/local -type f -user X -group Y -exec chown A:B {} \; This will recursively find every regular file owned by X with a group of Y and change the ownership to A with a group of B. This will not change directories or symlinks. On 20 Sep 2000, at 22:28, Filip wrote:
Hi Susers,
I have a sub-directory ( /tmp/local/ ) with 100 files all belonging to owner X and group Y. I would like to change the owner and the group of those files to owner A and group B. Anybody has a little script to change the owner and group ?
Thanks a lot filip
S7S7S7 S7S7S7 S7S7S7 S7S7S7 S7 S7 S7 S7 S7S7S7 S7 S7 S7S7S7 S7S7S7 S7 S7 S7 S7 S7 S7 S7 S7S7S7 S7S7S7 S7S7S7 S7S7S7 S7
-- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
-- Jerry Feldman Contractor, eInfrastructure Partner Engineering 508-467-4315 http://www.testdrive.compaq.com/linux/ Compaq Computer Corp. 200 Forest Street MRO1-3/F1 Marlboro, Ma. 01752 -- To unsubscribe send e-mail to suse-linux-e-unsubscribe@suse.com For additional commands send e-mail to suse-linux-e-help@suse.com Also check the FAQ at http://www.suse.com/support/faq
participants (5)
-
gerry.feldman@compaq.com
-
okh-linux@post.cybercity.dk
-
stefan.troeger@wirtschaft.tu-chemnitz.de
-
vhf@skynet.be
-
zentena@hophead.dyndns.org