]> Cypherpunks.ru repositories - nncp.git/blob - doc/cmd/nncp-file.texi
Streamed NNCPE format
[nncp.git] / doc / cmd / nncp-file.texi
1 @node nncp-file
2 @section nncp-file
3
4 @example
5 $ nncp-file [options] [-chunked INT] SRC      NODE:[DST]
6 $ nncp-file [options] [-chunked INT] SRC area:AREA:[DST]
7 @end example
8
9 Send @file{SRC} file to remote @option{NODE}. @file{DST} specifies
10 destination file name in remote's @ref{CfgIncoming, incoming}
11 directory. If this file already exists there, then counter will be
12 appended to it.
13
14 This command queues file in @ref{Spool, spool} directory immediately --
15 so pay attention that sending 2 GiB file will create 2 GiB outbound
16 encrypted packet.
17
18 If @file{SRC} equals to @file{-}, to data is read from @code{stdin}.
19
20 If @file{SRC} points to directory, then
21 @url{https://pubs.opengroup.org/onlinepubs/9699919799/utilities/pax.html#tag_20_92_13_01, pax archive}
22 will be created on the fly with directory contents and destination
23 filename @file{.tar} appended. It @strong{won't} contain any entities
24 metainformation, but modification time with the names. UID/GID are set
25 to zero. Directories have 777 permissions, files have 666, for being
26 friendly with @command{umask}. Also each entity will have comment like
27 @verb{|Autogenerated by NNCP version X.Y.Z built with goXXX|}.
28
29 If @option{-chunked} is specified, then source file will be split
30 @ref{Chunked, on chunks}. @option{INT} is the desired chunk size in
31 KiBs. This mode is more CPU hungry. Pay attention that chunk is saved in
32 spool directory immediately and it is not deleted if any error occurs.
33 @option{-minsize} option is applied per each chunk. Do not forget about
34 @ref{ChunkedZFS, possible} ZFS deduplication issues. Zero
35 @option{-chunked} disables chunked transmission.
36
37 If @ref{CfgNotify, notification} is enabled on the remote side for
38 file transmissions, then it will sent simple letter after successful
39 file receiving.
40
41 If you use @option{area:AREA} instead of @option{NODE}, then
42 @ref{Multicast, multicast} packet will be sent to specified area. That
43 creates outgoing packet to the @strong{self} node, so you have to run
44 @ref{nncp-toss, tossing} to create outgoing packets to required subscribers.