mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-12 11:10:07 +00:00
d32deab17b
Suggested by G. Brandon Robinson.
135 lines
2.2 KiB
Groff
135 lines
2.2 KiB
Groff
.TH NETFILES 1
|
|
.SH NAME
|
|
Netfiles, netfileget, netfileput, netfilestat \- network file access inside acme
|
|
.SH SYNOPSIS
|
|
.B Netfiles
|
|
.PP
|
|
.B netfileget
|
|
[
|
|
.B -d
|
|
]
|
|
.I system
|
|
.I path
|
|
.PP
|
|
.B netfileput
|
|
.I system
|
|
.I path
|
|
.PP
|
|
.B netfilestat
|
|
.I system
|
|
.I path
|
|
.SH DESCRIPTION
|
|
.B Netfiles
|
|
presents remote file systems in
|
|
.MR acme (4)
|
|
windows.
|
|
Each window is named
|
|
.BI /n/ system / path
|
|
and displays the contents of
|
|
.I path
|
|
on
|
|
.IR system .
|
|
.PP
|
|
.I Netfiles
|
|
reads names of windows to create from the
|
|
plumbing channel
|
|
.B netfileedit
|
|
(see
|
|
.MR plumber (4)
|
|
and the example section below).
|
|
In a
|
|
.IR netfiles -controlled
|
|
window,
|
|
.BR Get ,
|
|
.BR Put ,
|
|
and
|
|
button 3 loads work as in normal acme windows.
|
|
External commands executed with button 2
|
|
run in the directory in which
|
|
.I acme
|
|
was started.
|
|
.PP
|
|
.I Netfiles
|
|
uses the helper programs
|
|
.IR netfileget ,
|
|
.IR netfileput ,
|
|
and
|
|
.I netfilestat
|
|
to access the remote file systems.
|
|
The three first check to see if
|
|
.I system
|
|
is a service in the current name space
|
|
(see
|
|
.MR intro (4) ).
|
|
If so, they use
|
|
.MR 9p (1)
|
|
to access it.
|
|
Otherwise, they assume that the system is a network name
|
|
and use
|
|
.MR ssh (1) 's
|
|
.I sftp
|
|
to access it.
|
|
.PP
|
|
.I Netfileget
|
|
prints the contents of the named
|
|
.I path
|
|
to standard output.
|
|
If the
|
|
.B -d
|
|
option is given, then
|
|
.I netfileget
|
|
prints a single-column listing of
|
|
.IR path ,
|
|
which must be a directory.
|
|
Directories in the listing have
|
|
.L /
|
|
appended to their names.
|
|
.PP
|
|
.I Netfileput
|
|
writes its standard input to the named
|
|
.IR path .
|
|
.PP
|
|
.I Netfilestat
|
|
prints the file type of
|
|
.IR path ,
|
|
one of
|
|
.BR nonexistent ,
|
|
.BR directory ,
|
|
or
|
|
.BR file .
|
|
.SH EXAMPLES
|
|
The following plumbing rule
|
|
(see
|
|
.MR plumb (7) )
|
|
passes
|
|
.B /n/
|
|
paths to
|
|
.IR Netfiles ,
|
|
starting it if necessary.
|
|
.IP
|
|
.EX
|
|
# /n/ paths go to simulator in acme
|
|
kind is text
|
|
data matches '[a-zA-Z0-9_\e-./]+('$addr')?'
|
|
data matches '(/n/[a-zA-Z0-9_\e-./]+)('$addr')?'
|
|
plumb to netfileedit
|
|
plumb client Netfiles
|
|
.EE
|
|
.SH SOURCE
|
|
.B \*9/src/cmd/netfiles
|
|
.SH SEE ALSO
|
|
.MR 9p (1) ,
|
|
.MR ssh (1) ,
|
|
.MR ssh-agent (1) ,
|
|
.MR intro (4) ,
|
|
.MR acme (4) ,
|
|
.MR factotum (4) ,
|
|
.HR http://v9fs.sf.net
|
|
.SH BUGS
|
|
.I Netfiles
|
|
depends on
|
|
.MR sftpcache (1) ,
|
|
which only works with OpenSSH versions 4.3 and earlier;
|
|
later versions do not print the
|
|
.B sftp>
|
|
prompt frequently enough.
|