SENDFILE(1)

πŸ“¦ version 2.1b.20080616, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’Œ SENDFILE β€” the sendfile(1) glow-up πŸ’Œ

okay bestie, listen up, because this one is a General Commands Manual banger and it's about to be your new favorite way to yeet files across the internet πŸ¦‹


✨ NAME ✨

sendfile β€” send file(s) via Internet. that's it. that's the whole vibe. no cap πŸ’…


✨ SYNOPSIS ✨

sendfile [ -stMgduzvolSPiqQV ] [ -c=" comment" ] [ -C=program ] [
-ps=[my_ID] ] [ -pe=[to_user] ] [ -m LIMIT ] file [...]  user[@host]

sendfile -a="archive" [ -uviqQ ] [ -c=" comment" ] [ -C=program ] [
-ps[=my_ID] ] [ -pe[=to_user] ] file_or_directory [...]  recipient

like… look at those flags. iconic. we stan a command with options πŸŽ€


✨ DESCRIPTION ✨

so sendfile sends files to the specified recipient. main character behavior, honestly.

on the receiving side there must be a SAFT-server (Simple Asynchronous File Transfer) installed, like sendfiled, and it stores incoming files into the recipient's spool-directory. no SAFT server, no slay. simple as.

SAFT knows about 4 file types, and you're gonna learn them all:

  • BINARY β€” byte-stream file which will not be modified. untouched. pristine. a legend πŸ’–
  • SOURCE β€” record oriented program source file. only EOL will be translated.
  • TEXT β€” human readable text files. EOL and the character set (like German umlauts) will be translated.
  • MIME β€” Multipurpose Internet Mail Extension file as defined by RFC 2045-2049.

files can be sent compressed or pgp-encrypted and/or pgp-signed. and as an extension to SAFT, sendfile is able to send multiple binary files in one archive file. multitasking queen πŸ‘‘

default mode for sendfile is sending compressed binary files. compression will be disabled for hosts which are inside your LAN and for files which cannot be compressed β€” the program is smart enough to not waste the effort, love that for it.

with the helper program sfconf you can easily configure sendfile. bestie-coded utility fr fr 🫢


✨ ARGUMENTS ✨

you have to specify at least one file name and the recipient's address. both. you can't skip either, sorry angel.

an address can be specified as:

  • user β€” a local user or a sendfile alias (see below), e.g.: framstag
  • user@host β€” an user on a remote host, e.g.: framstag@bofh.belwue.de
  • saft://host/user β€” like above, but in URL-syntax, e.g.: saft://bofh.belwue.de/framstag
  • saft://host:port/user β€” like above, but with alternate SAFT-port, e.g.: saft://bofh.belwue.de:4870/framstag

four ways to say "send it to this person" and honestly all of them eat πŸ’…


✨ OPTIONS ✨

so many flags, so little time. let's get into it:

  • -4, -6 β€” Explicitly force IPv4 or IPv6 connections. By default, the program will try to resolve the name given, and choose the appropriate protocol automatically. If resolving a host name returns both IPv4 and IPv6 addresses, sendfile will try to use the adresses in the order they are returned by the resolver. (yes, "adresses" β€” that's how the original spells it, and I'm not gonna gaslight you about it πŸ’€)
  • -s β€” Send in source mode (not needed if sending to a unix host).
  • -t β€” Send in text mode (not needed if sending to a unix host).
  • -M β€” Send MIME file (must be external composed before!). like, YOU have to compose it first. sendfile is not doing your homework.
  • -g β€” Send in guessed mode: sendfile tries to guess the correct mode (source, text or binary). > This will not work in every case and not on all platforms! so… lowkey risky, highkey convenient πŸ™ˆ
  • -i β€” Print more transaction information. the tea β˜•
  • -v β€” Verbose mode: show SAFT protocol messages. for the nosy besties (me, it's me).
  • -V β€” Show version information and exit. quick lil check-in πŸ‘‹
  • -u β€” Send uncompressed.
  • -z β€” Send compressed.
  • -a β€” Send files or whole directories as one archive (binary mode only). You have to specify an archive name. no name, no archive, periodt.
  • -d β€” Delete previous sent file. No wildcards allowed. don't get cute with the *, it will not work.
  • -o β€” Overwrite already sent file(s) with same name.
  • -P β€” Read file from stdin. You must specify a file name, too.
  • -S β€” Spool file into outgoing queue for later processing. You must run a sendfiled which supports this mode. no supporting daemon, no spooling, sad!
  • -l β€” List files in the outgoing spool.
  • -q β€” Quiet mode 1: print no transfer messages.
  • -Q β€” Quiet mode 2: print no transfer, information or warning messages. absolute silence. stealth mode. ninja behavior πŸ₯·
  • -c β€” Add a short comment to a single file. a single file, bestie, don't push it.
  • -C β€” Force usage of specified compression program (gzip or bzip2). those two. only those two. don't try anything else.
  • -pc β€” Encrypt file(s) with pgp (IDEA symmetric).
  • -pe β€” Encrypt file(s) with pgp (public key).
  • -ps β€” Add pgp signature(s) to the file(s).
  • -m β€” Limit the maximum thruput (in KB/s).

✨ ARGUMENTS ✨ (yes, again, they really did that πŸ’€)

  • user β€” Recipient user name. Can be an alias, too. See below.
  • file β€” File name to be sent. Only when using the -a="archive" option you may specify any file or directory.

like… only with -a="archive" can you send any file or directory. any other time? just a file. rules are rules πŸŽ€


✨ EXAMPLES ✨

here's how the cool kids do it:

sendfile -t project.txt chief@bigvax.somewhere.net
sendfile -a=jokes -c 'from Gary Larson' *.gif framstag

first one: text mode, one file, off to the chief. second one: archive named jokes, with a comment from Gary Larson, all your *.gifs, straight to framstag. obsessed. no notes. 🌈


✨ FILES ✨

  • /etc/sendfile.deny β€” Users which are not allowed to receive files or messages (set by root). root said no, so it's a no. 🚫
  • /var/spool/sendfile/$USER/config/config β€” Your configuration file. Valid entries are (the | symbol means "or"):
    • bell = on|off β€” add a bell when a file or message arrives.
    • deleting = on|off β€” allow remote users to delete their files after transmission.
    • msglog = on|off β€” log incoming messages in /var/spool/sendfile/$USER/msglog
    • notification = none|both|mail [user@host]|message [user@host] β€” send a notification when a file has been arrived via mail or message or none or both mechanism.
    • forward = user@host β€” set a forward address.
  • /var/spool/sendfile/$USER/config/restrictions β€” List of addresses from where you don't want messages or files. The format is:
user@host [mfb]

m stands for messages, f for files and b for both. Wildcards * and ? are allowed. Examples:

gates@microsoft.com b
*aol.com m

You may also specify the addresses in URL-syntax.

  • /var/spool/sendfile/$USER/config/aliases β€” The sendfile alias file. Format:
alias address [sendfile-options]

Example:

chief grmblfz@bigvax.somewhere.net
ccc chaoscomputerclub@saft.ccc.de -pe -ps

You may also specify the addresses in URL-syntax.

aliases are literally just nicknames with extra powers and that is the most Gen Z thing in this entire manual πŸ’…


✨ SEE ALSO ✨

sfconf receive(1) sendmsg(1) fetchfile(1)

the whole friend group 🫢


✨ AUTHOR ✨

Ulli Horlacher β€” framstag@rus.uni-stuttgart.de πŸ‘‘


and that's the page, bestie! this one came from the 3rd Berkeley Distribution, it's filed under SENDFILE(1) in the General Commands Manual, and honestly? it ate. now go send somebody a file. mwah πŸ’–βœ¨

πŸ“¦ where this page comes from