On 6/3/10 8:51 AM, Edmund R. MacKenty wrote:
ConvertDirTree()
{
find "$1" -type f | while read file; do
     tmp="$file.ic$$"
     if iconv -f "$2" -t "$3" $file">  "$tmp"&&  \
         chown --reference="$file" "$tmp"&&  \
         chmod --reference="$file" "$tmp; then

This is purely nit-picky, but since you've gone to the trouble of ensuring the 
owner and permissions
are the same, you could also throw in (directly from the setfacl man page):

getfacl file1 | setfacl --set-file=- file2

Although pax probably doesn't store/restore ACLs anyway...

- Larry

----------------------------------------------------------------------
For LINUX-390 subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO LINUX-390 or visit
http://www.marist.edu/htbin/wlvindex?LINUX-390

Reply via email to