The current scripts i have written so far:
#!/bin/ksh
rm -fR /tmp/aclget
cd /
find ./ -type d \
| grep -v "^./tmp/" \
| xargs -I {} mkdir -p "/tmp/aclget/{}"
find ./ \
| grep -v "^./tmp/" \
| xargs -I {} aclget -o "/tmp/aclget/{}.acl" "{}"
cd /tmp
tar -cvf acl.tar aclget
gzip acl.tar
To replicate the permission on another machine
#!/bin/ksh
cd /tmp
gunzip acl.tar
tar -xvf acl.tar
cd /tmp/aclget
find ./ -exec aclput -i {} `echo "{}" | sed "s/^\.//g"`
The problems i am having is that the tmp always goes out of space when building the list. is it possible to make pipe so that it can work on the fly ?
update code after reading feedback and trying with some idea of uuencode, change after some testing. (probably kernel tuning is need for the 255 bytes limit in xargs)
Checking:
odmget -q "attribute=ncargs" PdAt
lsattr -El sys0 | grep ncargs
Tunning:
chdev -l sys0 -a ncargs=1024
Scripts:
#!/bin/ksh
cd /
find ./ -name "^./tmp/" -o \
-exec sh "aclget '{}' | uuencode - '/tmp/acl/{}.acl'" \; \
| gzip acl.uu.gz
anyone got idea on the the reverse part ? i have come up so far, need to cut the file down since uudecode can only decode the first file
#!/bin/ksh
gunzip acl.uu.gz | uudecode
cd /tmp
find ./ -exec aclput -i {} `echo "{}" | sed "s/^\.//g"`