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