• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Liutauras Vilda
  • Tim Cooke
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Knute Snortum
  • paul wheaton
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Ganesh Patekar
Bartenders:
  • Tim Holloway
  • Carey Brown
  • salvin francis

Unix command wiredness in OS 10.3

 
author
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK, I know this is not a Java question. But in case some of you happen to know ...
I know that the Unix file commands ignore resource forks on the OS X system. I have found that the Unix CP command makes corrupted copies of my large QuickTime .mov files. So, I have learned to copy files with CpMac or use the finder. That is all good.
However, I was trying to get some large files to a windows machine via the OSX's build-in FTP server tonight. It seems that the Mac FTP server uses the Unix "ls" and "cp" to serve the FTP requests. That resulted in corrupted files on the FTP client end.
Any thoughts how I might fix that? Thanks a lot.
 
Author
Posts: 367
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I didn't know quicktime used resource forks. Quicktimes get transfered all over the net all the time. You might check your export options on quicktime to make sure you are exporting normally. If you really had forks you wouldn't be able to view the movie on anything but a mac.
Beyond that, a dmg or sit file would definitely capture the information you need. You can create a disk image with the disk tool. (look in /Applications/Utilities I think) I'm not sure if the version of stuffit that comes with OS X will create .sit archives, but you could also try that. I'm not a fan of that format, but it's another option...
 
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Another thing to check is that the files are being transferred as 'binary', not the default 'text'. That's by far the biggest cause of corrupted ftp transfers, going way back to even before the first Mac existed.
 
Michael Yuan
author
Posts: 1427
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I did use "binary" in FTP transfer ...
Ok, quicktime does not depend on resource forks, but Unix "cp" definately corrupts large files. Say if I have a 700MB QuickTime file "mymovie.mov". If I do

Quicktime will return an error that file is not "QT format". If I do

it works fine.
It also works fine if I make a copy "tmp3.mov" from the finder itself.
Now. when I use the Unix "ls -al" command to see those files, all of them have the exact same size. But in finder, the three "tmpX.mov" files have three different size. "tmp1.mov" reports the same size from the Unix "ls" and the finder, but it is corrupted.
Is this a new bug in panther?
[ November 14, 2003: Message edited by: Michael Yuan ]
 
Loren Rosen
Ranch Hand
Posts: 156
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's unlikely that ftp directly uses ls and cp. More likely it uses the same underlying Unix system calls. Anyway, I'd try creating some other large files (e.g., via 'tar', or iterative use of 'cat'), and trying different file systems (HFS, HFS+, etc.) to see if there's some pattern.
I did try using cp on a downloaded quicktime movie on my system (still running 10.1), and the copy and the original were identical. The file was only a dozen or so megabytes, though.
 
Catch Ernie! Catch the egg! And catch this tiny ad too:
professionally read, modify and write PDF files from Java
https://products.aspose.com/pdf/java
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!