.\" Copyright (c) 2021 Omar Polo .\" .\" Permission to use, copy, modify, and distribute this software for any .\" purpose with or without fee is hereby granted, provided that the above .\" copyright notice and this permission notice appear in all copies. .\" .\" THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES .\" WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF .\" MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR .\" ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES .\" WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN .\" ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF .\" OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. .\" .Dd $Mdocdate: October 7 2022 $ .Dt KAMIFTP 1 .Os .Sh NAME .Nm kamiftp .Nd 9p client .Sh SYNOPSIS .Nm .Op Fl c .Op Fl C Ar cert .Op Fl K Ar key .Oo Ar user Ns @ Oc Ns Ar host Ns Op : Ns Ar port .Op Ar path .Sh DESCRIPTION .Nm is a .Xr 9p 7 client. .Pp The options are as follows: .Bl -tag -width Ds .It Fl c Use TLS for the connection. If used, .Fl C is mandatory. .It Fl C Ar certificate Specify the path to the client .Ar certificate to be use during the TLS handsahke. Implies .Fl c . .It Fl K Ar key Specify the path to the client certificate .Ar key to be used during the TLS handshake. If not given, the file passed to .Fl C will be used. Implies .Fl c . .El .Pp The following commands are recognized by .Nm : .Bl -tag -width Ds .It Ic bell Oo Cm on | off Oc Request terminal to sound a bell after each command. Without arguments toggle the current state. .It Ic bye Terminate the session. Synomym of .Ic quit . .It Ic cd Ar remote-path Change the working directory on the remote machine to .Ar remote-path . .It Ic edit Ar remote-path Download .Ar remote-path and open it with the preferred editor .Po .Ev VISUAL or .Ev EDITOR with .Xr ed 1 as fallback .Pc then attempt to re-upload it. .It Ic get Ar remote-file Op Ar local-file Fetch .Ar remote-file and save it locally as .Ar local-file . If .Ar local-file is not given, use the file name from .Ar remote-file . .It Ic hexdump Oo Cm on | off Oc Print the packets sent from/to the server. Without arguments, toggle the current state. .It Ic lcd Op Ar local-directory Change the local current working directory to .Ar local-directory or the .Ev HOME if not given. .It Ic lpwd Print the local working directory. .It Ic ls List the file in the remote current working directory. .It Ic page Ar remote-file Download .Ar remote-file and open it with the .Ev PAGER .Pq Xr less 1 by default . .It Ic pipe Ar remote-file Ar cmd Op Ar args... Fetch .Ar remote-file and pass it as standard input for .Ar cmd (with optional .Ar args Ns ). .It Ic put Ar local-file Op Ar remote-file Upload .Ar local-file to .Ar remote-file . If .Ar remote-file is not given, use the file name from .Ar local-file . .It Ic quit Terminate the session. Synomym of .Ic bye . .It Ic rename Ar remote-file Ar new-remote-name Renames .Ar remote-file to .Ar new-remote-name on the remote server. .It Ic verbose Oo Cm on | off Oc Print verbose information. Without arguments toggle the current state. .El .Sh ENVIRONMENT The following environment variables are inspected: .Bl -tag -width Ds .It Ev HOME The user login directory. .It Ev PAGER The pager to use, .Xr less 1 by default. .It Ev VISUAL , Ev EDITOR The program used to edit files. .Ev VISUAL is inspected first, .Ev EDITOR as a fallback. If both are undefined, .Xr ed 1 is given some love. .It Ev USER Default login, used if no .Ar user is given on the command line. .El .Sh SEE ALSO .Xr 9p 7 , .Xr kamid 8 .Sh AUTHORS The .Nm utility was written by .An Omar Polo Aq Mt op@omarpolo.com .