Cp and ditto do not always copy files the same size

2003-11-25 Thread Ari Kahn
I have a perl script that recurses through a given directory structure,
identifies files, and then reorganizes the files by placing them in a new
directory structure.

I use the cp or ditto commands to accomplish the last part.
E.g.
`cp $filename $chromat_dir`; #copy encountered file to the chromatograph_dir
or   
`ditto $filename $chromat_dir/$file_prefix$file_suffix`;

I find that sometimes the sizes of the copied files are not the same.
E.g.
Original size 192 KB
Copied size 4 KB

There are a LOT of files I am dealing with. Maybe 3 GB.

Has anyone had a similar issue?
Suggestions?

Thanks,
-- 
Ari
http://binf.gmu.edu/akahn/

We are the music makers. We are the dreamers of dreams.
Gene Wilder as Willy Wonka, quoting O'Shaughnesy



Re: Cp and ditto do not always copy files the same size

2003-11-25 Thread Doug McNutt
At 04:32 -0500 11/25/03, Ari Kahn wrote:
I use the cp or ditto commands to accomplish the last part.
`cp $filename $chromat_dir`; #copy encountered file to the chromatograph_dir
`ditto $filename $chromat_dir/$file_prefix$file_suffix`;

I find that sometimes the sizes of the copied files are not the same.
Original size 192 KB
Copied size 4 KB

I don't think that cp is able to copy resource forks though there may be an Apple 
provided option. It sounds as though you are losing them.

My MPW heritage made me put this line in my .tcshrc script.

alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc

It will show the resource forks in the current working directory


-- 
-- On the eighth day, about 6 kiloyears ago, the Lord realized that free will would 
make man ask what existed before the Creation. So He installed a few gigayears of 
history complete with a big bang and a fossilized record of evolution. --


Re: Cp and ditto do not always copy files the same size

2003-11-25 Thread Ari Kahn
It is true that I wasn't copying the resource fork specifically. But when I
use the alias you gave me, it lists the sizes for the resource forks of the
ORIGINALS as 0.

Here is a good copy:

Original
-rwxr-xr-x1 kahn admin  193189 Oct 21 23:29
504-1_G3_14937f_H01.ab1/..namedfork/data*
-rwxr-xr-x1 kahn admin   0 Oct 21 23:29
504-1_G3_14937f_H01.ab1/..namedfork/rsrc*

Copy
-rw-r--r--1 kahn admin  193189 Nov 25 05:21
504-1_G3_14937f_H01.ab1/..namedfork/data
-rw-r--r--1 kahn admin   0 Nov 25 05:21
504-1_G3_14937f_H01.ab1/..namedfork/rsrc

But apparently it does copy the resource forks?


Here is a bad copy:

Original
-rwxr-xr-x1 kahn admin  192227 Oct 13 15:03
467-1_G7_2f_G04.ab1/..namedfork/data*
-rwxr-xr-x1 kahn admin   0 Oct 13 15:03
467-1_G7_2f_G04.ab1/..namedfork/rsrc*

Bad Copy
-rw-r--r--1 kahn admin 589 Nov 25 05:29
467-1_G7_2f_G04.ab1/..namedfork/data
-rw-r--r--1 kahn admin   0 Nov 25 05:29
467-1_G7_2f_G04.ab1/..namedfork/rsrc


-- 
Ari

 From: Doug McNutt [EMAIL PROTECTED]
 Date: Tue, 25 Nov 2003 07:55:03 -0700
 To: perl.org [EMAIL PROTECTED]
 Subject: Re: Cp and ditto do not always copy files the same size
 
 At 04:32 -0500 11/25/03, Ari Kahn wrote:
 I use the cp or ditto commands to accomplish the last part.
 `cp $filename $chromat_dir`; #copy encountered file to the chromatograph_dir
 `ditto $filename $chromat_dir/$file_prefix$file_suffix`;
 
 I find that sometimes the sizes of the copied files are not the same.
 Original size 192 KB
 Copied size 4 KB
 
 I don't think that cp is able to copy resource forks though there may be an
 Apple provided option. It sounds as though you are losing them.
 
 My MPW heritage made me put this line in my .tcshrc script.
 
 alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc
 
 It will show the resource forks in the current working directory
 
 
 -- 
 -- On the eighth day, about 6 kiloyears ago, the Lord realized that free will
 would make man ask what existed before the Creation. So He installed a few
 gigayears of history complete with a big bang and a fossilized record of
 evolution. --



Re: Cp and ditto do not always copy files the same size

2003-11-25 Thread Bruce Carter
CpMac and MvMac are supposedly the Macified versions, but I always use 
ditto with the -rsrc flag.

On Nov 25, 2003, at 9:55 AM, Doug McNutt wrote:
I don't think that cp is able to copy resource forks though there may 
be an Apple provided option. It sounds as though you are losing them.

My MPW heritage made me put this line in my .tcshrc script.

alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc

It will show the resource forks in the current working directory
--
Bruce Carter, ACTC, MacCSE, MCP  http://www.nd.edu/~bcarter/
Senior Systems Engineermailto:[EMAIL PROTECTED]
Riley Hall of Art, Room 217  AIM:bcarteratnd
University of Notre Dame   +1 574 631 2967 Voice
Notre Dame, IN  46556-0539 +1 574 631 8201   FAX


CPAN broken in Panther

2003-11-25 Thread Hannes
Are there others having problems with CPAN in 10.3. ? None of the file 
transfer methods seems to work and everything times out on more than 10 
different ftp archives. I already followed the instructions from one 
BSD mailing list:

http://news.gw.com/comp.unix.bsd.openbsd.misc/37614

but it only skips the initial retrieval errors, and just copying all 
perl modules in the .cpan directory outside of CPAN just to install 
them from the cpan shell doesn't seem to be the solution. I know that 
lynx, wget, ftp etc are working outside of cpan

I would be grateful for your advise or pointers to the archives (where 
I must have missed it then).

thanks/h

--
1GHz TiBook 1GB - Superdrive
MacOsX 10.3
aim:   hannes92122
www: http://users.sdsc.edu/~hannes


5.8.2 Library problem: module not seen

2003-11-25 Thread Randall Perry
Just upgraded from 5.8 to 5.8.2 on OSXS 10.3.1.

During configure I specified /Library/Perl for site-specific libs.

It compiled, tested, and installed ok. But when I went to test a script it
complained that a module wasn't there, though it's in the perl lib path.

So I ran CPAN to re-install the module (DBI).

Here's the perl lib path:
perl -e 'print $_\n for @INC'
/sw/lib/perl5
/usr/local/lib/perl5/5.8.2/darwin-2level
/usr/local/lib/perl5/5.8.2
/Library/Perl/darwin-2level
/Library/Perl
/Library/Perl

Here's the old DBI:
l /Library/Perl/darwin/DBI
total 624
-r--r--r--  1 root  admin  53966  7 Dec  2002 Changes.pm
drwxr-xr-x  5 root  admin170  7 Dec  2002 Const
-r--r--r--  1 root  admin  64423 29 Nov  2002 DBD.pm
-r--r--r--  1 root  admin  36024 24 Aug  2001 FAQ.pm
-r--r--r--  1 root  admin  14439 29 Nov  2002 Format.pm
-r--r--r--  1 root  admin  20573 29 Nov  2002 Profile.pm
-r--r--r--  1 root  admin  16411  1 Dec  2002 ProfileData.pm
drwxr-xr-x  3 root  admin102  7 Dec  2002 ProfileDumper
-r--r--r--  1 root  admin   8112  1 Dec  2002 ProfileDumper.pm
-r--r--r--  1 root  admin  18345  1 Dec  2002 ProxyServer.pm
-r--r--r--  1 root  admin  25130 29 Nov  2002 PurePerl.pm
-r-xr-xr-x  1 root  admin  29306 29 Nov  2002 Shell.pm
-r--r--r--  1 root  admin   4594 24 Aug  2001 W32ODBC.pm

And the newly installed DBI:
l /Library/Perl/darwin-2level/DBI
total 640
-r--r--r--  1 root  admin   63911 25 Nov 11:23 Changes.pm
drwxr-xr-x  5 root  admin 170 25 Nov 11:23 Const
drwxr-xr-x  3 root  admin 102 25 Nov 11:23 DBD
-r--r--r--  1 root  admin  104617 19 Aug 20:15 DBD.pm
-r--r--r--  1 root  admin   36024 24 Aug  2001 FAQ.pm
-r--r--r--  1 root  admin   21577 19 Aug 20:15 Profile.pm
-r--r--r--  1 root  admin   16486 26 Feb  2003 ProfileData.pm
drwxr-xr-x  3 root  admin 102 25 Nov 11:23 ProfileDumper
-r--r--r--  1 root  admin8112  1 Dec  2002 ProfileDumper.pm
-r--r--r--  1 root  admin   26172 14 May  2003 ProxyServer.pm
-r--r--r--  1 root  admin   26874 13 May  2003 PurePerl.pm
-r--r--r--  1 root  admin4594 24 Aug  2001 W32ODBC.pm


Did I set the path wrong on configure? Or do all modules need to be
re-compiled for 5.8.2?


-- 
Randall Perry
sysTame

Xserve Web Hosting/Co-location
Website Development/Promotion
Mac Consulting/Sales

http://www.systame.com/




Re: Cp and ditto do not always copy files the same size

2003-11-25 Thread Ari Kahn
When I do a search for the original file, I find
../../.AppleDouble/
sometimes. 
There are copies of the files I want to copy in ./AppleDouble that are 4 KB.
What is an AppleDouble?
-- 
Ari
http://binf.gmu.edu/akahn/


 From: Doug McNutt [EMAIL PROTECTED]
 Date: Tue, 25 Nov 2003 07:55:03 -0700
 To: perl.org [EMAIL PROTECTED]
 Subject: Re: Cp and ditto do not always copy files the same size
 
 At 04:32 -0500 11/25/03, Ari Kahn wrote:
 I use the cp or ditto commands to accomplish the last part.
 `cp $filename $chromat_dir`; #copy encountered file to the chromatograph_dir
 `ditto $filename $chromat_dir/$file_prefix$file_suffix`;
 
 I find that sometimes the sizes of the copied files are not the same.
 Original size 192 KB
 Copied size 4 KB
 
 I don't think that cp is able to copy resource forks though there may be an
 Apple provided option. It sounds as though you are losing them.
 
 My MPW heritage made me put this line in my .tcshrc script.
 
 alias files ls -lF \*/..namedfork/data \*/..namedfork/rsrc
 
 It will show the resource forks in the current working directory
 
 
 -- 
 -- On the eighth day, about 6 kiloyears ago, the Lord realized that free will
 would make man ask what existed before the Creation. So He installed a few
 gigayears of history complete with a big bang and a fossilized record of
 evolution. --



Re: Cp and ditto do not always copy files the same size

2003-11-25 Thread James Reynolds
I and many other lab admins are using ditto -rsrcFork to duplicate 
homefolders in our University labs and have no problem with the files 
that are duplicated.  On the other hand, cp breaks anything that has 
split forks.  I believe some lab admins are using CpMac also with no 
problems.

In the System Administration pdf on this page: 
http://www.occam.com/osx/main.html Leon towns-von Stauber discusses 
just why cp and mv don't work (page 46):

cp and mv only move data forks and leave resource forks orphaned...

Also on page 45 he talks more about data, resource, and attribute forks.

--

Thanks,

James Reynolds
University of Utah
Student Computing Labs
[EMAIL PROTECTED]
801-585-9811


Re: CPAN broken in Panther

2003-11-25 Thread Jeremy Mates
* Hannes [EMAIL PROTECTED]
 but it only skips the initial retrieval errors, and just copying all
 perl modules in the .cpan directory outside of CPAN just to install
 them from the cpan shell doesn't seem to be the solution. I know that
 lynx, wget, ftp etc are working outside of cpan

Sounds like a firewall gnawing on the non-passive FTP connection
attempts from the FTP server back to your host. Are these other
utilities set to use passive FTP or a proxy?

http://sial.org/howto/perl/life-with-cpan/

will likely help, in specific:

http://sial.org/howto/perl/life-with-cpan/#s4

on networking issues, along with the Mac OS X tips on /usr/bin/HEAD
problems and manual installation under /man:

http://sial.org/howto/perl/life-with-cpan/#s5.4


Re: Cp and ditto do not always copy files the same size

2003-11-25 Thread Doug McNutt
At 11:53 -0500 11/25/03, Ari Kahn wrote:
When I do a search for the original file, I find
.../../.AppleDouble/
What is an AppleDouble?

AppleDouble and AppleSingle are file formats which incorporate the resource fork and 
the data fork and the finder information (type/creator and some other things) into a 
structure for storage on a medium that does not support the HFS specialties. They are 
commonly used for transport of Apple files over a network.

At 15:05 + 11/25/03, John Delacour wrote:
 --rsrc
   Preserve resource forks and HFS meta-data.  ditto will store this
   data in Carbon-compatible ._ AppleDouble files on filesystems that
   do not natively support resource forks.

I thought that AppleDouble would produce two files and that AppleSingle would produce 
only one but now I am a bit confused.

Are you moving files from an HFS+ volume to a UFS volume?  I doubt that 
../../.AppleDouble/ would ever exist on an HFS+ device unless, perhaps, it got there 
over a modem.

-- 

-- In Christianity, man can have only one wife. This is known as monotony. --


Re: CPAN broken in Panther

2003-11-25 Thread Morbus Iff
At 9:09 AM -0800 11/25/03, Jeremy Mates wrote:
* Hannes [EMAIL PROTECTED]
 but it only skips the initial retrieval errors, and just copying all
 perl modules in the .cpan directory outside of CPAN just to install
 them from the cpan shell doesn't seem to be the solution. I know that
 lynx, wget, ftp etc are working outside of cpan

Sounds like a firewall gnawing on the non-passive FTP connection
attempts from the FTP server back to your host. Are these other
utilities set to use passive FTP or a proxy?

I can confirm - just shut off the internal firewall (System Prefereces 
Sharing), and cpan works fine. I've not had time to look into it further.

-- 
Morbus Iff ( insert pithy quote here )
Technical: http://www.oreillynet.com/pub/au/779
Culture: http://www.disobey.com/ and http://www.gamegrene.com/
icq: 2927491 / aim: akaMorbus / yahoo: morbus_iff / jabber.org: morbus


Re: CPAN broken in Panther

2003-11-25 Thread Elizabeth Mattijsen
At 12:30 -0500 11/25/03, Morbus Iff wrote:
I can confirm - just shut off the internal firewall (System Prefereces 
Sharing), and cpan works fine. I've not had time to look into it further.
You might wanna do a

  export FTP_PASSIVE=1

before running CPAN.  Helps me most of the time...

Liz


Re: CPAN broken in Panther

2003-11-25 Thread Hannes
Turning off the firewall made it working again. I still don't 
understand why CPAN can't do all these file transfers on the 
commandline with or without the firewall enabled.

Thanks to all who responded /h

On Nov 25, 2003, at 1:07 PM, Elizabeth Mattijsen wrote:

At 12:30 -0500 11/25/03, Morbus Iff wrote:
I can confirm - just shut off the internal firewall (System 
Prefereces 
Sharing), and cpan works fine. I've not had time to look into it 
further.
You might wanna do a

  export FTP_PASSIVE=1

before running CPAN.  Helps me most of the time...

Liz


--
1GHz TiBook 1GB - Superdrive
MacOsX 10.3
aim:   hannes92122
www: http://users.sdsc.edu/~hannes


Re: CPAN broken in Panther

2003-11-25 Thread Hannes
What I meant was:

On Nov 25, 2003, at 1:27 PM, Hannes wrote:

Turning off the firewall made it working again. I still don't 
understand why CPAN can't do all these file transfers
If ftp, lynx, wget etc. work with no problems if I run them

on the commandline with or without the firewall enabled.

Thanks to all who responded /h
--
1GHz TiBook 1GB - Superdrive
MacOsX 10.3
aim:   hannes92122
www: http://users.sdsc.edu/~hannes