Mime-Version: |
1.0 (Apple Message framework v1084) |
Content-Type: |
text/plain; charset=us-ascii |
Date: |
Wed, 15 Jun 2011 21:26:24 +0900 |
Reply-To: |
|
Subject: |
|
From: |
|
In-Reply-To: |
|
Content-Transfer-Encoding: |
quoted-printable |
Sender: |
|
Parts/Attachments: |
|
|
Hello,
I just posted my scripts that I used to set correct modified time to files/folders which got wrong modified time, because of some wrong (??) use of rsync.
In one of these scripts, I used the following lines to get the modified time and the size of files/folders.
for (@files) {
if (-d $_) {
$_ .= "/";
}
my $mod_date = `/usr/bin/GetFileInfo -m "$_"`;
chomp $mod_date;
my $sz = -s $_;
$res .= $_ . "\t" . $mod_date . "\t" . $sz . "\n";
}
-- And in the result, I found many many zero byte files. I checked some of them, and found that some of them were indeed zero byte, but others were not (there were for example many alias files which returned zero byte with Perl's file test "-s"). So, it seems that Perl's file test "-s" is not very reliable when we have to deal with Mac file system.
It seems that "ls -l" gives the same zero byte for alias files, etc.
Does anyone know how it is possible to get the "real" byte size of files with some Unix tool?
Thank you very much in advance.
Best regard,
Nobumi Iyanaga
Tokyo,
Japan
|
|
|