Unix TAR file to Windows

I work on a UNIX box but don’t get into system level details much anymore. I need to take a file that is just a little too large for my email system to handle and send it over to a Windows machine and read it into an app. It’s a 11meg iges file and I beleive that if I can tar it up and email it over that winzip will open it. Problem is I don’t quite remember how the format of the tar file would go and I don’t have enough time to dig out the books right now. Any UNIX experts out there? :slight_smile:

Thanks in advance! :cool:

I have opened tar files with winzip but I don’t quite get your question. What do you mean “how the format of the tar file would go”? When you open with winzip, you get a window in winzip giving a list of the files contained in the tar file, then you just extract them however you want. A tar file maintains the directory structure and winzip can deal with that nicely.

What may be an issue is that Unix and Windows use different end-of-line sequences so ASCII files may not come over exactly as you expect.

tar -cfv file.tar <list of files>

will create your tar file

remember - tar files are not compressed - it is a tape archive. You will also need to compress the files - use gzip or bzip. Your tar utility may be able to do this with a -x option - check out man tar.

Si

For the “format”, do you maybe mean the command syntax?

tar -cvf tarfile.tar file1 file2 file3…

-c : Compress into a tar (“x” is used to untar)
-v: verbose output (tells you what’s being added, not required, but I use it out of habit)
-f: Create the tar as a file (as opposed to sending the output to a tape device)
tarfile.tar: the tar file to create
file1 file2 file3…: The list of files to add to the tar.

As another point, “tar” doesn’t compress the files. It just takes a set of files / directories and combines them into one large file. So you could take a directory of (say) 10 files totalling 11 megs, and tar them up into a single file but it would still be 11 megs. There are UNIX “zip” utilities that do actual compression. I usually use “gzip” (which creates a .gz file, readable by winzip).

Another thing you might try is to ftp from your Windows machine to the UNIX box (using your normal UNIX login / password) and bypass the email limitation completely. Depending on how the UNIX machine was set up, it may or may not accept an ftp connection. If it works, it should put you into your home directory, and you can cd to wherever the files are contained, then do a “get” on each one (or an “mget” and specify all the files). With ftp you can switch between “ascii” mode (which is usually the default) to automatically convert end-of-line characters, or “bin” mode to keep the files as-is (recommended for non text files). Just type in “ascii” or “bin” at the ftp command line to switch between modes.

:smack: :smack: :smack:
Damm it - not -x (extract, of course), try -j (bzip), -z(gzip) or -Z(compress) for compression options.

Si

No need to beat yourself over this. You did remind me of the ever helpful “man command” feature in UNIX and I was able to figure it out. Afterall, I was a UNIX system admin at one point in my life. :rolleyes: :wink:

Thanks again everybody.