SENDFILE(1)
π 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 asendfilealias (see below), e.g.:framstaguser@hostβ an user on a remote host, e.g.:framstag@bofh.belwue.desaft://host/userβ like above, but in URL-syntax, e.g.:saft://bofh.belwue.de/framstagsaft://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,sendfilewill 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.sendfileis not doing your homework.-gβ Send in guessed mode:sendfiletries 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 asendfiledwhich 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 (gziporbzip2). 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/msglognotification = 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β Thesendfilealias 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
- debian bookworm: sendfile 2.1b.20080616-10
- ubuntu jammy: sendfile 2.1b.20080616-9
- ubuntu noble: sendfile 2.1b.20080616-10build2
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms