]> Cypherpunks.ru repositories - nncp.git/blob - doc/cmd/nncp-file.texi
Skip non-regular files in nncp-file
[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,
22 pax archive} will be created on the fly with directory contents and
23 destination filename @file{.tar} appended. It @strong{won't} contain any
24 entities metainformation, except for modification time with the names.
25 UID/GID are set to zero. Directories have 777 permissions, files have
26 666, for being friendly with @command{umask}. Everything except
27 directories and regulars files is skipped. Also each entity will have
28 comment like @verb{|Autogenerated by NNCP version X.Y.Z built with goXXX|}.
29 For more precise metainformation and various file objects storage use
30 external @command{tar} command piped in.
31
32 If @option{-chunked} is specified, then source file will be split
33 @ref{Chunked, on chunks}. @option{INT} is the desired chunk size in
34 KiBs. This mode is more CPU hungry. Pay attention that chunk is saved in
35 spool directory immediately and it is not deleted if any error occurs.
36 @option{-minsize} option is applied per each chunk. Do not forget about
37 @ref{ChunkedZFS, possible} ZFS deduplication issues. Zero
38 @option{-chunked} disables chunked transmission.
39
40 If @ref{CfgNotify, notification} is enabled on the remote side for
41 file transmissions, then it will sent simple letter after successful
42 file receiving.
43
44 If you use @option{area:AREA} instead of @option{NODE}, then
45 @ref{Multicast, multicast} packet will be sent to specified area. That
46 creates outgoing packet to the @strong{self} node, so you have to run
47 @ref{nncp-toss, tossing} to create outgoing packets to required subscribers.