SENDFILES(1)

๐ŸŒธ SENDFILES(1) โ€” the sendfiles page, bestie edition ๐ŸŒธ

okay so this is a page from the General Commands Manual (it lives in the nmh family, iykyk) and it's literally about yeeting a whole pile of files at someone over email ๐Ÿ’Œ


โœจ NAME โœจ

sendfiles โ€” send multiple files by MIME message with nmh ๐ŸŽ€


โœจ SYNOPSIS โœจ

sendfiles [-help] [-version] [-compress bzip2 | compress | gzip | lzma |
     none]
     [-from sender]
     -to recipient -subject subject | recipient subject
     file/directory1 [file/directory2 ...]

โœจ DESCRIPTION โœจ

So. sendfiles is a shell script, and its whole job is sending a collection of files and directories via electronic mail ๐Ÿ“งโœจ

Here's the vibe: sendfiles archives the files and directories you name using the tar command, and then it mails that compressed archive off to the recipient with the given subject. That's it, that's the whole moment ๐Ÿ’…

  • -to โ€” this switch specifies the recipient ๐Ÿซถ
  • -subject โ€” this switch specifies the subject โœจ

and here's the cute part: those two required values can also just be handed over without their corresponding switch names. no switch, no problem, she'll figure it out ๐Ÿ™ˆ

  • -from โ€” can, and should, be used to specify the sender's mailbox (name and email address). alternatively, the PERSON environment variable can be used for the same purpose ๐Ÿ‘‘
  • if neither one is used, sendfiles will supply a โ€œFrom:โ€ header field using the sender's local mailbox โ€” see localmbox in mh-format(5) ๐Ÿ“ฎ
  • -compress โ€” this command line switch can be used to override the run-time determination of the compression program by sendfiles ๐Ÿ—œ๏ธ
  • -compress none (alternatively, -none) โ€” disables compression. that's it. raw archive, no zip, no thoughts, head empty ๐Ÿ“

๐ŸŒˆ Extracting the Received Files ๐ŸŒˆ

bestie when the message lands, here's what you do: invoke mhstore once for the received message.

The default is for mhstore to write the archive to a file where you can subsequently uncompress and untar it. For instance:

$ mhlist -verbose 9
 msg part  type/subtype             size description
   9       application/octet-stream 118K
             (extract with uncompress | tar xvpf -)
             type=tar
             conversions=compress
$ mhstore 9
$ uncompress < 9.tar.Z | tar xvpf -

Alternately, by using the -auto switch, mhstore will automatically do the extraction for you ๐Ÿ˜Œโœจ

$ mhlist -verbose 9
 msg part  type/subtype             size description
   9       application/octet-stream 118K
             (extract with uncompress | tar xvpf -)
             type=tar
             conversions=compress
$ mhstore -auto 9
-- tar listing appears here as files are extracted

As the second tar listing is generated, the files are extracted ๐Ÿ”ฅ

okay listen, this is the important one: a prudent user will never put -auto in the .mh_profile file. ๐Ÿšจ The correct procedure is to first use mhlist to find out what will be extracted. Then mhstore can be invoked with -auto to perform the extraction. look before you leap, fr fr ๐Ÿ’€

โœจ FILES โœจ

  • $HOME/.mh_profile โ€” The user profile ๐Ÿ 

โœจ PROFILE COMPONENTS โœจ

  • Path: โ€” To determine the user's nmh directory ๐Ÿ“
  • Current-Folder: โ€” To find the default current folder ๐Ÿ“‚

โœจ SEE ALSO โœจ

mhbuild(1), mhlist(1), mhshow(1), mhstore(1), mh-format(5) ๐Ÿซถ

Proposed Standard for Message Encapsulation (RFC 934) ๐Ÿ“œ


โœจ DEFAULTS โœจ

  • -delay 0
  • -from localmbox

โœจ CONTEXT โœจ

None. nothing. not a single one. empty. the void. ๐Ÿ•ณ๏ธ


and that's the page, bestie!! this whole thing is from nmh-1.8, dated 2012-11-14 ๐ŸŒธโœจ go forth and send your files, you absolute icon ๐Ÿ‘‘๐Ÿ’–

๐Ÿ“ฆ where this page comes from