Perl scripting problem using tar...

From: McIntosh Alan-R54071 (alan@motorola.com)
Date: Mon Aug 26 2002 - 13:18:46 EDT


Mgrs,

I am having a very frustrating time trying to transfer
files from one directory to another NFS mounted directory.
This same line of code works fine from the ksh scripts
I have always used, but I thought I would try writing it
in perl this time:

ksh script:
tar cf - $u | (cd /home/ACTIVE; tar xf -)

perl script:
system("/usr/sbin/tar cf - $thisfile | (cd /home/GROUP;
/usr/bin/pax -r -p e -s ',^/,,' )")

I switched to using 'pax' to unpack the tar file because
tar was squawking about trying to un-tar the file, as well
as the need to strip off the leading slash because of the
problem having to use absolute tar 'packing'.

Errors received from perl script using pax:
pax: [path to directory] : No such file or directory
pax: [path to directory] : could not restore owner/group

The perl version works fine from the command line, with
exception of the loss of the original permissions on
directories only, files are fine?!

This is running on a Solaris 5.7 OS with various versions
of perl ranging from 5.004 to 5.6.1.

Thanks in advance for any help, will summarize!

Sincerely,
Alan McIntosh
IT - UNIX Systems Administrator
alan@motorola.com
_______________________________________________
sunmanagers mailing list
sunmanagers@sunmanagers.org
http://www.sunmanagers.org/mailman/listinfo/sunmanagers



This archive was generated by hypermail 2.1.7 : Wed Apr 09 2008 - 23:24:50 EDT