Chown script

Paul Howarth paul at city-fan.org
Thu Oct 21 15:31:58 UTC 2004


Franco wrote:
> Sorry,
> i do an example, i have 2 folder in the same parent folder,
> pippo and pippo1 these have as owner and group pippo and pippo.
> I need to change just the owner in pippo.pippo and pippo1.pippo

Create script ~/mychown:

#!/bin/sh
for folder in "$@"
do
	chown -R $folder $folder
done

Then run: sh ~/mychown pippo pippo1

You can use wildcards for the folder names.

Paul.




More information about the fedora-list mailing list