|
Home > Archive > Unix Programming > June 2005 > Large File from Unix to PC
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Large File from Unix to PC
|
|
| mas@XXXXXX.net 2005-06-15, 6:10 pm |
|
We're using quit an old system with motorola Unix V/88. I have a
customer that I have to send a large (several 100mb) file. As it turns
out, we both have 8mm tapedrives. The big difference is that they use
their's in a Windows PC environment.
We only use our 8mm (an Eliant 820) for backups, and the process is
automated using cpio.
So, I need to get an ASCII text file onto an 8mm tape in such a way
that our customer can read it. Because of this, I figure cpio and tar
are out.
Can it be this simple?
dd if= file.txt of=/dev/rmt/m328_105
This is the device name of the TD. If it is this simple, must I use
conv=ASCII( I think this the default)? Also, do I need to use the bs
(block size specification) I might have a problem with this, because
I'm creating a delimited file, where the records will have different
lengths, giving me no real functional blocksize.
I move files back and forth from our system all the time through the
attached terms, but since our max baud is 38400 (I told you it was
old), this would take a month.
Any help or feedback appreciated
Keith
| |
| Rich Teer 2005-06-15, 6:10 pm |
| On Wed, 15 Jun 2005, mas@XXXXXX.net wrote:
> Can it be this simple?
>
> dd if= file.txt of=/dev/rmt/m328_105
I don't know about that, but how about using FTP? Or does your
UNIX box predate TCP/IP?
--
Rich Teer, SCNA, SCSA, OpenSolaris CAB member
President,
Rite Online Inc.
Voice: +1 (250) 979-1638
URL: http://www.rite-group.com/rich
| |
| Phil Endecott 2005-06-15, 6:10 pm |
| mas@XXXXXX.net wrote:
> We're using quit an old system with motorola Unix V/88. I have a
> customer that I have to send a large (several 100mb) file. As it turns
> out, we both have 8mm tapedrives. The big difference is that they use
> their's in a Windows PC environment.
> Can it be this simple?
>
> dd if= file.txt of=/dev/rmt/m328_105
My very vague recollection of doing something like this long long ago is
that the PC will not understand the raw data, because the software that
they use to access the tape drive will use some special
application-specific format. I suggest that you get them to send you a
tape with a "hello world" text file on it, and read it using the
opposite sort of dd command. Look at what you get (with od) and see how
much it has besides the "hello world".
Otherwise, get them to try cygwin or mingw or a bootable-CD linux.
--Phil.
| |
| Kurtis D. Rader 2005-06-16, 2:49 am |
| On Wed, 15 Jun 2005 14:04:39 -0700, mas@XXXXXX.net wrote:
> So, I need to get an ASCII text file onto an 8mm tape in such a way that
> our customer can read it. Because of this, I figure cpio and tar are
> out.
>
> Can it be this simple?
>
> dd if= file.txt of=/dev/rmt/m328_105
Yes, assuming the recipient has a utility comparable to dd. If they have
Cygwin, MKS toolkit, or something similar installed they'll have dd or
something similar. If they don't all is probably not lost. I don't touch
MS Windows other than to run a few apps (e.g., Quicken) so I don't know if
this is possible. But if they can use the "type" command or something
similar to read directly from the tape drive and write the contents to a
file without interpretation or modification (which is basically what you
are doing with dd) then life is good.
> This is the device name of the TD. If it is this simple, must I use
> conv=ASCII( I think this the default)?
That is not the default. That option converts from EBCDIC to ASCII and is
only appropriate if your "file.txt" is in the EBCDIC character set.
> Also, do I need to use the bs (block size specification) I might have a
> problem with this, because I'm creating a delimited file, where the
> records will have different lengths, giving me no real functional
> blocksize.
The "bs" option specifies the size of each read and write. The only reason
to specify it in this context is to improve performance. You will,
however, want to massage the file before writing it to the tape. UNIX
systems use a simple newline (i.e., line-feed) character to mark the end
of a text line. MS Windows systems use a carriage-return line-feed pair.
Your system may have a unix2dos(1) command to accomplish that. If it
doesn't it's a trivial matter to write a program to read its input,
convert every "\n" to a "\r\n", and write the modified output.
| |
| Villy Kruse 2005-06-16, 7:52 am |
| On Wed, 15 Jun 2005 21:23:51 GMT,
Rich Teer <rich.teer@rite-group.com> wrote:
> On Wed, 15 Jun 2005, mas@XXXXXX.net wrote:
>
>
> I don't know about that, but how about using FTP? Or does your
> UNIX box predate TCP/IP?
>
TCP/IP was bought and installed separately on motorola boxes. The way
I would do it is to read the tape back on a linux system and burn a CD.
Villy
| |
| Nicole Hamilton 2005-06-16, 5:52 pm |
| mas@XXXXXX.net wrote:
> We're using quit an old system with motorola Unix V/88. I have a
> customer that I have to send a large (several 100mb) file. As it
> turns out, we both have 8mm tapedrives. The big difference is that
> they use their's in a Windows PC environment.
> We only use our 8mm (an Eliant 820) for backups, and the process is
> automated using cpio.
> So, I need to get an ASCII text file onto an 8mm tape in such a way
> that our customer can read it. Because of this, I figure cpio and tar
> are out.
No, you could use either tar or cpio formats, but your customer will
need software that read those formats from tape under Windows.
The one product I can speak for (because I wrote it) that will do that
is Hamilton C shell. It's commercial, not free, but if this is a one-
time use situation, you can do everything you need with the free demo
version. For more information, please see
http://www.hamiltonlabs.com/cshell.htm.
If you have questions or if I can help in any other way, please let
me know.
Regards,
Nicole Hamilton
Hamilton Laboratories
|
|
|
|
|