On Mon, 2002-10-21 at 10:18, John French (CIMS) wrote:
> If I do an ls --lR >>filelist.txt can I use the output to change the
> usernames and groups of the same files in another directory to the same as
> the first directory?

Depends... on 8.0 with the getfacl and setfacl programs, it's extremely
easy.  The output of getfacl is suitable as input to setfacl, and can be
used to sync permissions:

(cd /path/dir1 && getfacl *) | (cd /path/dir2 && setfacl -S -)
or:
(cd /path/dir1 && getfacl *) | (cd /path/dir2 && setfacl --restore=-)

Forgive me for not testing the above; if the first doesn't work, the
second should.

If you don't have getfacl and setfacl, it'd require a small amount of
scripting to accomplish using chmod and chown.




-- 
redhat-list mailing list
unsubscribe mailto:redhat-list-request@;redhat.com?subject=unsubscribe
https://listman.redhat.com/mailman/listinfo/redhat-list

Reply via email to