Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Andrzejek on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

upload a resource file on a ftp server

Status
Not open for further replies.

adrstan1

Programmer
Apr 16, 2004
38
GB
Hi,

I'm not a MAC user, sorry if the questions looks stupid.
I'm trying to upload a rsrc resource file on a ftp server using the shell (terminal). I'm using MAC OSX 10, the ftp server is hosted on a Solaris 2.8 machine. The problem is the uploaded file has 0 bytes size (I understood because is using data fork).
The same result also if I use curl. I don't want to use any graphical interface, because, in the future I want to transfer files automatically using perl scripts. How can I transfer the file from command line ? Also, seems the shell commands used to copy / move files are affected from the same problem.
Is the shell working fine on this system ? How can I use it, I'm used to work in command line and don't like working with MAC GUI

Thanks and Regards,
Adrian
 
OS X does not support resource forks from the command line very well and, as you noticed, other Unixes don't support them at all.

The problem goes all the way back to a decision made by the very first Mac designers - in the original Mac file system, files are not linear lists of data, they are actually two chains of data represented by a single entry in the file table. The main part of the file is the data itself, and the second "fork" contains zero or more "resources" such as icons, etc.. Resource files are files that have a resource fork and a zero length data fork.

The problem, of course, is that Unix-type systems and tools have a fundamental assumption that files are linear.

There are two commandline tools that are bundled with the XCode developer's tools, SplitForks and FixupResourceForks that may help.

Another possibility is to try the "zip" command to compress the file, then unzip it at the destination. My reading of the man page is that the zip included with OS-X is "resource aware".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top