[comp.unix.questions] How can I send a file through MAIL?

hobbit@shum.UUCP (yoav gonen) (11/25/90)

How can I send a file through MAIL?

n8735053@unicorn.cc.wwu.edu (Iain "Niai" Davidson) (11/26/90)

hobbit@shum.UUCP (yoav gonen) writes:
>How can I send a file through MAIL?

Now let's see if I can do this off the top of my head...
(see uuencode and other man pages for further info)

$ uuencode file.txt file.txt | mail hobbit@shum.uucp

or a better way for a group of files in the current directory...

$ tar cf file.tar .
$ compress file.tar
$ uuencode filt.tar.Z file.tar.Z | mail hobbit@shum.uucp

and on the other end (after saving the mail message)

$ uudecode file.tar.Z.uue
$ uncompress file.tar.Z
$ tar xf file.tar 


I'm sure I'm going to get flamed if wrong... :-)

-- 
I.Davidson, A)BITS@wwu.edu B)uw-beaver!wwu.edu!IAIN C)n8735053@unicorn.wwu.edu

gwyn@smoke.brl.mil (Doug Gwyn) (11/27/90)

In article <hobbit.659539924@shum> hobbit@shum.UUCP (yoav gonen) writes:
>How can I send a file through MAIL?

mail whoever < file

weimer@ssd.kodak.com (Gary Weimer) (11/27/90)

In article <14578@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>In article <hobbit.659539924@shum> hobbit@shum.UUCP (yoav gonen) writes:
>>How can I send a file through MAIL?
>
>mail whoever < file

This will only work for limitted sized non-binary files (i.e. small text
files).

Many mailers are confused by control characters. These can be removed by
uuencode'ing the file (uudecode replaces the control characters).

Also, some mailers truncate or garble large files (over 64K?). There is
a program called split which will break large files into smaller ones.

See man pages if you didn't already know this stuff (I don't have any
more info).

gwyn@smoke.brl.mil (Doug Gwyn) (11/28/90)

In article <1990Nov27.140554.5318@ssd.kodak.com> weimer@ssd.kodak.com (Gary Weimer) writes:
-In article <14578@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
->In article <hobbit.659539924@shum> hobbit@shum.UUCP (yoav gonen) writes:
->>How can I send a file through MAIL?
->mail whoever < file
-This will only work for limitted sized non-binary files (i.e. small text
-files).

But it OUGHT to work, if your mail system is worth a damn (many aren't).

zonker@rimfaxe.diku.dk (Claus Engdahl) (11/28/90)

gwyn@smoke.brl.mil (Doug Gwyn) writes:

>In article <1990Nov27.140554.5318@ssd.kodak.com> weimer@ssd.kodak.com (Gary Weimer) writes:
>-In article <14578@smoke.brl.mil> gwyn@smoke.brl.mil (Doug Gwyn) writes:
>->In article <hobbit.659539924@shum> hobbit@shum.UUCP (yoav gonen) writes:
>->>How can I send a file through MAIL?
>->mail whoever < file
>-This will only work for limitted sized non-binary files (i.e. small text
>-files).

>But it OUGHT to work, if your mail system is worth a damn (many aren't).

Many mailsystems resides in the Real-World (Tm), where you have to
deal with lowspeed noisy serial links. 
I think the size currently supported by the eunet backbones is 100.000
characters, but they might have increased it?

Claus Engdahl (zonker@diku.dk, postmaster@diku.dk, staff@diku.dk,,,,,)
----------------------------------------------------------------------
My motto is: Honi soit qui pense  ;-)