This is yafc.info, produced by makeinfo version 6.7 from yafc.texi.

INFO-DIR-SECTION Internet

START-INFO-DIR-ENTRY
* Yafc: (yafc).  Yet Another FTP Client
END-INFO-DIR-ENTRY
   This file documents Yafc version 1.3.7

   Copyright (C) 1999-2000 Martin Hedenfalk

   Permission is granted to make and distribute verbatim copies of this
manual provided the copyright notice and this permission notice are
preserved on all copies.

   Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided that the
entire resulting derived work is distributed under the terms of a
permission notice identical to this one.

   Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for modified
versions, except that this permission notice may be stated in a
translation approved by the copyright holder.


File: yafc.info,  Node: Top,  Next: Overview,  Up: (dir)

This document describes YAFC, an interactive interface to the FTP
protocol.  This document applies to version 1.3.7.

* Menu:

* Overview::                    Introduction to Yafc
* Invoking Yafc::               How to start Yafc
* The shell::
* Configuration::               How to configure Yafc
* Bookmarks::
* Kerberos::                    How Yafc uses Kerberos


File: yafc.info,  Node: Overview,  Next: Invoking Yafc,  Prev: Top,  Up: Top

1 Overview
**********

This manual documents YAFC.  YAFC is quite a powerful ftp client.  It is
a console interface to the ftp protocol.  If you're looking for a nice
GUI client, Yafc is not for you.  If you, however, use ftp often and
want a fast, powerful, friendly client Yafc is here for you...

   Some of the features are recursive transfers, nohup transfers,
colored ls, cached directory listings, autologin and bookmarks, powerful
aliases and extensive tab completion.  It has also support for Kerberos
authentication.

   This manual is incomplete, and possibly out of date.  If you would
like to improve this manual, please add a pull request or issue on the
GitHub repository located at <https://github.com/sebastinas/yafc>.

* Menu:

* Bugs::                Reporting bugs and requests
* Obtaining Yafc::      Where to get Yafc
* Motivation::          Why Yafc was written


File: yafc.info,  Node: Bugs,  Next: Obtaining Yafc,  Up: Overview

1.1 Bugs
========

Please report bugs at <https://github.com/sebastinas/yafc>.  Before
reporting a bug, please verify you're using the latest version (check
the ftp site.)  You can get the version number of your copy of yafc with
the command 'yafc --version'.

   When reporting bugs, please include information on what machine and
operating system, including versions, you are running, an example for me
to reproduce (use the '--trace' option) and a patch if you have one.


File: yafc.info,  Node: Obtaining Yafc,  Next: Motivation,  Prev: Bugs,  Up: Overview

1.2 Obtaining Yafc
==================

Yafc homepage
     <http://www.yafc-ftp.com/>

Yafc GitHub Project Page
     <https://github.com/sebastinas/yafc>


File: yafc.info,  Node: Motivation,  Prev: Obtaining Yafc,  Up: Overview

1.3 Motivation
==============

Yafc was created because I needed a good ftp client.  The standard BSD
ftp client lacks tab completion, something I've become used to and can't
live without.  Of course, both Lftp and NcFtp has tab completion, but
not good enough for me :-).  Also, I needed a client that understood
Kerberos4 authentication, because that's the security system used a KTH
(The Royal Institute of Technology in Sweden, where I am studying.)

   But perhaps most important, I needed a fun project to work on :-)


File: yafc.info,  Node: Invoking Yafc,  Next: The shell,  Prev: Overview,  Up: Top

2 Invoking Yafc
***************

Usage:
     yafc [options] [proto://][USER[:PASSWORD]@]HOSTNAME[:PORT][/DIRECTORY]

   The 'proto' keyword can be either 'ftp' for ordinary FTP protocol, or
'ssh' for SSH2 protocol (sftp).

   Options:

'-a'
'--anon'
     Try an anonymous login, ie login as "anonymous" with your email
     address as password.  Your email address is first looked for in the
     config file (*note Keywords::), then in the $EMAIL environment
     variable.  If it's not found, a guess is made from your user- and
     hostname.

'-d'
'--debug'
     Print all messages sent to/from server.

'-D'
'--dump-rc'
     Prints the default configuration file to standard output.

'-m'
'--mechanism=MECH'
     Try security mechanism MECH when logging in to the host specified
     on the command line.  This will override any 'mech' options in
     'yafcrc' or 'bookmarks'.  MECH is a colon-separated string,
     supported values are "krb4", "krb5" and "none".  The mechanisms are
     tried in the order specified.

'-n'
'--norc'
     Do not read the users configuration file.  This will cause yafc to
     use its default settings.

'-p'
'--noproxy'
     Do not connect via the proxy.  This should be used if connecting to
     a host on the local network.

'-q'
'--quiet'
     Do not print the welcome message with copyright information when
     starting Yafc.

'-r FILE'
'--rcfile=FILE'
     Read another configuration file.

'-t FILE'
'--trace[=FILE]'
     Enable creation of trace file.  Trace files are mainly for
     debugging and includes every response and command Yafc
     receives/sends.  If FILE is specified, use that file instead of the
     default trace file ('~/.yafc/trace/trace.pid', where pid is the
     process id number of Yafc.)  Trace files can grow quite large and
     can safely be deleted.

'-u'
'--noauto'
     Do not login automagically to the host specified on the command
     line.  You can still use bookmark aliases, though.

'-U'
'--noalias'
     As --noauto, but bookmark aliases is disabled.

'-v'
'--verbose'
     Print all responses received (without response code.)

'-w'
'--wait=TIME'
     Use a different time to wait between connection attempts, in
     seconds.  This overrides the value set by 'connect_wait_time' in
     the configuration file.

'-W'
'--workdir=DIR'
     Use a different working directory for configuration files and
     temporary files.  Default is '~/.yafc'.

'-V'
'--version'
     Print version information on stdout and exit successfully.

'-h'
'--help'
     Print a short help description on stdout and exit successfully.


File: yafc.info,  Node: The shell,  Next: Configuration,  Prev: Invoking Yafc,  Up: Top

3 The shell
***********

Yafc presents the user with an internal shell.

* Menu:

* Yafc commands::               all yafc internal commands
* Command redirection::
* Nohup transfers::


File: yafc.info,  Node: Yafc commands,  Next: Command redirection,  Prev: The shell,  Up: The shell

3.1 Yafc commands
=================

All commands follow the usual GNU command line syntax, with long options
starting with two dashes ('--').

   Most commands have an option '--help' that shows a short syntax
description.

* Menu:

* !::                           execute shell command
* afslog::                      obtain remote AFS tokens
* alias::                       create an alias
* bookmark::                    create a bookmark
* cache::                       control directory cache
* cat::                         view a text file
* cd::                          change working directory
* cdup::                        change to parent directory
* chmod::                       change access mode (permissions) of files
* close::                       close connection
* copyright::                   show copyright notice
* filetime::                    print file modification time
* flush::                       flush replies
* fxp::                         transfer files between hosts
* get::                         get files
* help::                        don't panic
* idle::                        modify idle time
* lcd::                         change local working directory
* list::                        show raw directory listing
* lpwd::                        print local working directory
* ls::                          show directory listing
* ltag::                        tag local files
* luntag::                      remove files from local taglist
* mkdir::                       create directory
* mv::                          move files
* nlist::                       show filename list
* nop::                         do nothing
* open::                        open a connection
* prot::                        change Kerberos data protection level
* put::                         put files
* pwd::                         print working directory
* quit::                        quit Yafc
* quote::                       send arbitrary FTP command
* reopen::                      reopen active connection
* rhelp::                       remote help
* rm::                          remove files
* rmdir::                       remove empty directory
* rstatus::                     show status
* set::                         show and set variables
* shell::                       execute local shell
* site::                        issue a site specific FTP command
* source::                      read a configuration file
* status::                      show local status
* switch::                      switch between open connections
* system::                      show type of system
* tag::                         tag files
* unalias::                     remove an alias
* untag::                       remove files from taglist
* url::                         print the current FTP url
* user::                        send new user information
* version::                     show Yafc version
* warranty::                    show lack of warranty


File: yafc.info,  Node: !,  Next: afslog,  Up: Yafc commands

3.1.1 '!'
---------

This is a synonym for the shell (*note shell::) command.


File: yafc.info,  Node: afslog,  Next: alias,  Prev: !,  Up: Yafc commands

3.1.2 'afslog'
--------------

Obtain remote AFS tokens.


File: yafc.info,  Node: alias,  Next: bookmark,  Prev: afslog,  Up: Yafc commands

3.1.3 'alias'
-------------

Define an alias.

   You normally set up aliases in your config.

   For more information, see *note Aliases::.


File: yafc.info,  Node: bookmark,  Next: cache,  Prev: alias,  Up: Yafc commands

3.1.4 'bookmark'
----------------

Handle bookmarks.  If no options are given, the default action is to
create a bookmark for the current open connection.  If no bookmark name
is given on the command line, the bookmark will be given an alias based
upon the hostname.

   Usage:
     bookmark [options] [bookmark name ...]

   Options:

'-s[FILE]'
'--save[=FILE]'
     Save bookmarks in memory to file.  If the optional parameter FILE
     is omitted, save to default bookmarks file 'WORKDIR/bookmarks'.

'-e'
'--edit'
     Start editor (found in $EDITOR environment variable) with your
     bookmarks file.

'-r[FILE]'
'--read[=FILE]'
     Read bookmarks from bookmarks file, or file given by optional
     parameter FILE.

'-d'
'--delete'
     Delete bookmarks given as arguments to 'bookmark'.  The bookmarks
     file will be rewritten.

'-l'
'--list'
     List bookmarks in memory.

'-u'
'--noupdate'
     Toggle the noupdate flag.  If no bookmarks are specified on the
     command line, only the current bookmark is affected.  The bookmarks
     file will be rewritten.

'-h'
'--help'
     Show short syntax description.


File: yafc.info,  Node: cache,  Next: cat,  Prev: bookmark,  Up: Yafc commands

3.1.5 'cache'
-------------

Control the directory cache.

   Usage:
     cache [options] [directory ...]

   Options:

'-c'
'--clear'
     Clear the whole directory cache.

'-l'
'--list'
     List the contents of the directory cache.

'-t'
'--touch'
     Remove the specified directories from the cache.  If no directories
     are given as arguments, the current directory is removed from the
     cache.

'-h'
'--help'
     Show a short help description.


File: yafc.info,  Node: cat,  Next: cd,  Prev: cache,  Up: Yafc commands

3.1.6 'cat'
-----------

Print file(s) on standard output.  By default, the files are transferred
in ascii mode (rewriting newlines).  If you want to view binary files
through a filter (eg viewing a README.gz through gzip) you have to use
option '--type=binary'.

   Usage:
     cat [options] file ...

   Options:

'-t TYPE'
'--type=TYPE'
     Set transfer type.  Valid values for TYPE is ASCII or BINARY.

'-h'
'--help'
     Show a short help description


File: yafc.info,  Node: cd,  Next: cdup,  Prev: cat,  Up: Yafc commands

3.1.7 'cd'
----------

Change remote working directory.

   Usage:
     cd [directory]

   If no argument is given, 'cd' changes to the home directory.  The
home directory is the current directory when logged in.

   If the argument is '-', 'cd' changes to the previous working
directory.


File: yafc.info,  Node: cdup,  Next: chmod,  Prev: cd,  Up: Yafc commands

3.1.8 'cdup'
------------

Changes to parent directory.  On UN*X systems, this is the same as 'cd
..'.


File: yafc.info,  Node: chmod,  Next: close,  Prev: cdup,  Up: Yafc commands

3.1.9 'chmod'
-------------

Change the permission mode of remote files.

   Usage:
     chmod mode file ...

   Mode must be given in octal representation (for example: 0644 is
-rw-r--r--).


File: yafc.info,  Node: close,  Next: copyright,  Prev: chmod,  Up: Yafc commands

3.1.10 'close'
--------------

Close active connection.


File: yafc.info,  Node: copyright,  Next: filetime,  Prev: close,  Up: Yafc commands

3.1.11 'copyright'
------------------

Show copyright.


File: yafc.info,  Node: filetime,  Next: flush,  Prev: copyright,  Up: Yafc commands

3.1.12 'filetime'
-----------------

documentation missing...


File: yafc.info,  Node: flush,  Next: fxp,  Prev: filetime,  Up: Yafc commands

3.1.13 'flush'
--------------

documentation missing...


File: yafc.info,  Node: fxp,  Next: get,  Prev: flush,  Up: Yafc commands

3.1.14 'fxp'
------------

Transfer files from one remote server to another remote server,
bypassing the client.  This is done by setting up a passive mode
connection on the source host and using the obtained port for an active
connection on the target host.  The source host is the current active
host, the target host must be specified using the '--target=HOST'
option.

   This will not always work with all ftp servers, either because
passive mode is not supported on the source host, or because the target
refuses the given port.  The target ftp server might refuse the port as
a security policy.  You might get the error 'Illegal PORT Command' or
'Possible port theft'.

   If the destination file already exists, and none of the options
'--append', '--force', '--newer', '--resume', '--skip-existing' or
'--unique' is given, you will be prompted what to do.

   Usage:
     fxp [options] file ...

   Options:

'-a'
'--append'
     Append if destination exists.

'-D'
'--delete-after'
     Delete remote file after successful transfer.

'--dir-mask=GLOB'
     Enter only directories matching GLOB pattern.

'--dir-rx-mask=REGEXP'
     Enter only directories matching REGEXP pattern.

'-e'
'--skip-empty'
     Skip empty files (files with a size of zero bytes).

'-f'
'--force'
     Overwrite existing destinations, never prompt.

'-H'
'--nohup'
     Transfer files in background (nohup mode), quits yafc.

'-i'
'--interactive'
     Prompt before each transfer.

'-L FILE'
'--logfile=FILE'
     Use FILE as logfile instead of '~/.yafc/nohup/nohup.<pid>'.

'-m GLOB'
'--mask=GLOB'
     Only transfer files matching GLOB pattern.

'-M REGEXP'
'--rx-mask=REGEXP'
     Only transfer files matching REGEXP pattern.

'-n'
'--newer'
     Only transfer file if remote is newer than local file.

'-o DEST'
'--output=DEST'
     Specify other destination.  If more than one file is transferred,
     or option '--recursive' is given, DEST denotes a directory.
     Otherwise (if only one file is to be transferred), DEST denotes a
     filename.

     Examples:
          fxp --target=2 foo.tar.gz -o bar.tar.gz
     will transfer the remote file 'foo.tar.gz' on the currently active
     remote server to the remote file 'bar.tar.gz' on the remote server
     specified with the '--target' option (in this case the second open
     connection).

          fxp --target=funet *.tar.gz -o foo
     will transfer all remote '*.tar.gz' files to a directory named
     'foo' on the host specified with the '--target' option (in this
     case 'funet').

          fxp -T ftp.stacken.kth.se foo -r -o bar
     will transfer the remote file 'foo' to a directory named 'bar' on
     ftp.stacken.kth.se.  If 'foo' is a directory, it will be downloaded
     recursively.

'-p'
'--preserve'
     Try to preserve file attributes.

'-P'
'--parents'
     Append source path to destination.

'-q'
'--quiet'
     Overrides '--verbose'.

'-r'
'--recursive'
     Transfer directories recursively.

'-R'
'--resume'
     Resume broken download (restart at EOF).

'-s'
'--skip-existing'
     Always skip existing files.

'-t'
'--tagged'
     Transfer tagged files.

'-T HOST'
'--target=HOST'
     This option is required and specifies which remote server is the
     target.  The HOST parameter can be a complete hostname, an alias or
     the connection number.  The connection number is 1 for the first
     open connection, 2 for the second and so on.  It might be useful to
     include that information in the prompt using the '%C' code, *Note
     Prompt codes::.

'--type=TYPE'
     Specify transfer type, 'ascii' or 'binary'.

'-u'
'--unique'
     Always store as unique target file.

'-v'
'--verbose'
     Explain what is being done.

'--help'
     Show a short syntax description.


File: yafc.info,  Node: get,  Next: help,  Prev: fxp,  Up: Yafc commands

3.1.15 'get'
------------

Transfer files from remote server to local computer.

   If the destination file already exists, and none of the options
'--append', '--force', '--newer', '--resume', '--skip-existing' or
'--unique' is given, you will be prompted what to do.

   Usage:
     get [options] file ...

   Options:

'-a'
'--append'
     Append if destination exists.

'-c PERM'
'--chmod=PERM'
     Change mode of transferred files to PERM. PERM can be permissions
     in their octal representation or a list of strings of the form
     [ugoa]*[+-=][rwxXstugo]+ separated by commas.

'--chgrp=GROUP'
     change group of transferred files to GROUP. You need to be a member
     of GROUP.

'-d'
'--no-dereference'
     Copy symbolic links as symbolic links.

'-D'
'--delete-after'
     Delete remote file after successful transfer.

'-e'
'--skip-empty'
     Skip empty files (files with a size of zero bytes).

'--dir-mask=GLOB'
     Enter only directories matching GLOB pattern.

'--dir-rx-mask=REGEXP'
     Enter only directories matching REGEXP pattern.

'-f'
'--force'
     Overwrite existing destinations, never prompt.

'-H'
'--nohup'
     Transfer files in background (nohup mode), quits yafc.

'-i'
'--interactive'
     Prompt before each transfer.

'-L FILE'
'--logfile=FILE'
     Use FILE as logfile instead of '~/.yafc/nohup/nohup.<pid>'.

'-m GLOB'
'--mask=GLOB'
     Only get files matching GLOB pattern.

'-M REGEXP'
'--rx-mask=REGEXP'
     Only get files matching REGEXP pattern.

'-n'
'--newer'
     Only get file if remote is newer than local file.

'-o DEST'
'--output=DEST'
     Specify other destination.  If more than one file is transferred,
     option '--recursive' is given, or DEST ends in a slash, then DEST
     denotes a directory.  Otherwise (if only one file is to be
     transferred), DEST denotes a filename.  However, if DEST already
     exists and is a directory, DEST denotes a directory.

     Examples:
          get README -o readme
     will transfer the remote file 'README' to the local file 'readme'
     if 'readme' is not an existing local directory.

          get README -o readme/
     will transfer the remote file 'README' to the local directory
     'readme'.

          get *.tar.gz -o foo
     will transfer all remote '*.tar.gz' files to a local directory
     named 'foo'.

          get foo -r -o bar
     will transfer the remote file 'foo' to a local directory named
     'bar'.  If 'foo' is a directory, it will be downloaded recursively.

'-p'
'--preserve'
     Try to preserve file attributes and timestamps.

'-P'
'--parents'
     Append source path to destination.

'-q'
'--quiet'
     Overrides '--verbose'.

'-r'
'--recursive'
     Get directories recursively.

'-R'
'--resume'
     Resume broken download (restart at EOF).

'-s'
'--skip-existing'
     Always skip existing files.

'-t'
'--tagged'
     Transfer tagged files.

'--type=TYPE'
     Specify transfer type, 'ascii' or 'binary'.

'-u'
'--unique'
     Always store as unique local file.

'-v'
'--verbose'
     Explain what is being done.

'--help'
     Show a short syntax description.


File: yafc.info,  Node: help,  Next: idle,  Prev: get,  Up: Yafc commands

3.1.16 'help'
-------------

Shows the available commands.


File: yafc.info,  Node: idle,  Next: lcd,  Prev: help,  Up: Yafc commands

3.1.17 'idle'
-------------

Show or set the idle timeout.


File: yafc.info,  Node: lcd,  Next: list,  Prev: idle,  Up: Yafc commands

3.1.18 'lcd'
------------

Change local working directory.

   If provided with no arguments, changes to your home directory.


File: yafc.info,  Node: list,  Next: lpwd,  Prev: lcd,  Up: Yafc commands

3.1.19 'list'
-------------

List files.


File: yafc.info,  Node: lpwd,  Next: ls,  Prev: list,  Up: Yafc commands

3.1.20 'lpwd'
-------------

Print local working directory.


File: yafc.info,  Node: ls,  Next: ltag,  Prev: lpwd,  Up: Yafc commands

3.1.21 'ls'
-----------

List files.

   Usage:
     ls [options] [files ...]

   Options:

'-a'
'--all'
     Do not hide entries starting with '.'.

'-A'
'--almost-all'
     As '--all', but do not list .  and ..

'-B'
'--ignore-backups'
     Do not list implied entries ending with ~.

'-C'
     List entries by columns.

'--color[=WHEN]'
     Control whether color is used to distinguish file types.  WHEN may
     be either NEVER, ALWAYS or AUTO.  If WHEN is not given, default is
     ALWAYS.  If the argument is AUTO, colors will be used only if
     output is bound to a tty.

'-d'
'--directory'
     List directory entries instead of contents.

'--dirs-first'
     Show directories first (last with '--reverse').

'-F'
'--classify'
     Append a character for typing each entry.

'-g'
     Ignored.

'-G'
'--no-group'
     Inhibit display of group information.

'-h'
'--human-readable'
     Print sizes in human readable format (e.g.  1K, 234M, 2G)

'-l'
     Use a long listing format.

'-N'
'--literal'
     Print raw entry names (don't treat control characters specially)

'-o'
     Use a long listing format without group info.  Same as '-lG'.

'-r'
'--reverse'
     Reverse order while sorting.

'-R'
'--recursive'
     List subdirectories recursively.

'-S'
     Sort by file size

'-t'
     Sort by modification time.

'-U'
     Do not sort; list entries in directory order.

'-x'
     List entries by lines instead of by columns.

'-X'
     Sort alphabetically by entry extension.

'-1'
     List one file per line.

'--help'
     Show a short syntax description.


File: yafc.info,  Node: ltag,  Next: luntag,  Prev: ls,  Up: Yafc commands

3.1.22 'ltag'
-------------

Tag local files.


File: yafc.info,  Node: luntag,  Next: mkdir,  Prev: ltag,  Up: Yafc commands

3.1.23 'luntag'
---------------

Untag local files.


File: yafc.info,  Node: mkdir,  Next: mv,  Prev: luntag,  Up: Yafc commands

3.1.24 'mkdir'
--------------

Creates a remote directory (requires proper permissions.)

   Usage:
     mkdir directory


File: yafc.info,  Node: mv,  Next: nlist,  Prev: mkdir,  Up: Yafc commands

3.1.25 'mv'
-----------

Moves or renames a remote file.

   Usage:
     mv foo bar


File: yafc.info,  Node: nlist,  Next: nop,  Prev: mv,  Up: Yafc commands

3.1.26 'nlist'
--------------

Documentation missing...


File: yafc.info,  Node: nop,  Next: open,  Prev: nlist,  Up: Yafc commands

3.1.27 'nop'
------------

Send a NOOP command to remote host.  This does nothing except checking
if the connection is still open.  It may be used to reset the servers
idle timeout (though some servers ignore it).


File: yafc.info,  Node: open,  Next: prot,  Prev: nop,  Up: Yafc commands

3.1.28 'open'
-------------

Opens a new connection to an FTP/SSH server.

   Usage: open [options]
[proto://][user[:password]@]hostname[:port][/directory] ...

   proto can be either 'ftp' or 'ssh' ('sftp' is an alias for 'ssh')

   Options:

'-a'
'--anon'
     Try to login anonymously.

'-u'
'--noauto'
     Disable autologin.

'-U'
'--noalias'
     Disable bookmark alias lookup and abbreviation.

'-m MECH'
'--mechanism=MECH'
     Try security mechanism MECH when logging in.  This will override
     any 'mech' options in 'yafcrc' or 'bookmarks'.  MECH is a
     colon-separated string, supported values are "krb4", "krb5" and
     "none".  The mechanisms are tried in the order specified.

'-s PATH'
'--sftp=PATH'
     Specify path to the remote sftp-server program.  SSH starts this
     program on the remote side when initiating an sftp connection.
     This option is only necessary if the remote ssh server doesn't
     understand the sftp subsystem.

     Specify '--sftp=""' to disable the sftp-server path, and use sftp
     subsystem instead.

     If you don't know the remote path to the sftp-server program, the
     default for OpenSSH is '/usr/libexec/sftp-server'.  Another common
     path is '/usr/bin/sftp-server'.

'--help'
     Show a short syntax description.


File: yafc.info,  Node: prot,  Next: put,  Prev: open,  Up: Yafc commands

3.1.29 'prot'
-------------

Changes the data protection level for data transfers.  The protection
level defines how data transfers are handled by the security mechanism.

   Usage:
     prot [options] [command | data] protlevel

   Options:

'-h'
'--help'
     Show short syntax description.

   Valid protection levels are:

'clear'
     no data protection

'safe'
     integrity check

'private'
     all data encrypted and integrity checked


File: yafc.info,  Node: put,  Next: pwd,  Prev: prot,  Up: Yafc commands

3.1.30 'put'
------------

Send files to remote computer.

   If the destination file already exists, and none of the options
'--append', '--force', '--newer', '--resume', '--skip-existing' or
'--unique' is given, you will be prompted what to do.

   Usage:
     put [options] file ...

   Options:

'-a'
'--append'
     Append if destination file exists.

'-D'
'--delete-after'
     Delete local file after successful transfer.

'--dir-mask=GLOB'
     Enter only directories matching GLOB pattern.

'--dir-rx-mask=REGEXP'
     Enter only directories matching REGEXP pattern.

'-e'
'--skip-empty'
     Skip empty files (files with a size of zero bytes).

'-f'
'--force'
     Overwrite existing destinations, never prompt.

'-H'
'--nohup'
     Transfer files in background (nohup mode), quits yafc.

'-i'
'--interactive'
     Prompt before transferring each file.

'-L FILE'
'--logfile=FILE'
     Use FILE as logfile instead of '~/.yafc/nohup/nohup.<pid>' for
     nohup transfers.

'-m GLOB'
'--mask=GLOB'
     Only put files matching GLOB pattern.

'-M REGEXP'
'--rx-mask=REGEXP'
     Only put files matching REGEXP pattern.

'-n'
'--newer'
     Only transfer file if local is newer than remote file.

'-o DEST'
'--output=DEST'
     Specify other destination.  If more than one file is transferred,
     or option '--recursive' is given, DEST denotes a directory.
     Otherwise (if only one file is to be transferred), DEST denotes a
     filename.

     Examples:
          put foo.tar.gz -o bar.tar.gz
     will transfer the local file 'foo.tar.gz' to the remote file
     'bar.tar.gz'.

          put *.tar.gz -o foo
     will transfer all local '*.tar.gz' files to a remote directory
     named 'foo'.

          put foo -r -o bar
     will transfer the local file 'foo' to a remote directory named
     'bar'.  If 'foo' is a directory, it will be uploaded recursively.

'-p'
'--preserve'
     Try to preserve file attributes (permissions).

'-P'
'--parents'
     Append source path to destination.

'-q'
'--quiet'
     Overrides '--verbose'.

'-r'
'--recursive'
     Upload directories recursively.

'-R'
'--resume'
     Resume broken transfer (restart at EOF).

'-s'
'--skip-existing'
     Always skip existing files.

'-t'
'--tagged'
     Transfer (locally) tagged files.

'--type=TYPE'
     Specify transfer type, 'ascii' or 'binary'.

'-u'
'--unique'
     Always store as unique file (if server supports the STOU command).

'-v'
'--verbose'
     Explain what is being done.

'--help'
     Show a short syntax description.


File: yafc.info,  Node: pwd,  Next: quit,  Prev: put,  Up: Yafc commands

3.1.31 'pwd'
------------

Prints the current remote working directory.

   Usage: 'pwd'


File: yafc.info,  Node: quit,  Next: quote,  Prev: pwd,  Up: Yafc commands

3.1.32 'quit'
-------------

Quit yafc.

   You can also use the alias 'exit'.

   Usage: 'quit'


File: yafc.info,  Node: quote,  Next: reopen,  Prev: quit,  Up: Yafc commands

3.1.33 'quote'
--------------

documentation missing...


File: yafc.info,  Node: reopen,  Next: rhelp,  Prev: quote,  Up: Yafc commands

3.1.34 'reopen'
---------------

Reopen a timed out connection.


File: yafc.info,  Node: rhelp,  Next: rm,  Prev: reopen,  Up: Yafc commands

3.1.35 'rhelp'
--------------

documentation missing...


File: yafc.info,  Node: rm,  Next: rmdir,  Prev: rhelp,  Up: Yafc commands

3.1.36 'rm'
-----------

Remove files on remote server.

   Usage: 'rm [options] file...'

   Options:

'-f'
'--force'
     never prompt

'-i'
'--interactive'
     prompt before any removal

'-r'
'--recursive'
     remove the contents of directories recursively.  CAREFUL!

'-t'
'--tagged'
     remove tagged files

'-v'
'--verbose'
     explain what is being done

'--help'
     display help


File: yafc.info,  Node: rmdir,  Next: rstatus,  Prev: rm,  Up: Yafc commands

3.1.37 'rmdir'
--------------

Remove a directory on the remote server

     rmdir docs

   You can also use recursive *note rm:: to achive the same result


File: yafc.info,  Node: rstatus,  Next: set,  Prev: rmdir,  Up: Yafc commands

3.1.38 'rstatus'
----------------

documentation missing...


File: yafc.info,  Node: set,  Next: shell,  Prev: rstatus,  Up: Yafc commands

3.1.39 'set'
------------

Show and set variables.

   Usage:
     set [variable] [value]

   A value can be a boolean ('1', '0', 'on', 'off', 'true', 'false',
'yes', 'no') or a string, depending on the variable.

   Variables:

'anonpass [string]'
     *Note keyword anon_password::.

'autologin [boolean]'
     *Note keyword autologin::.

'debug [boolean]'
     *Note keyword debug::.

'passive_mode [boolean]'
     *Note keyword use_passive_mode::.

'type [string]'
     String must be 'binary' or 'ascii'.  *Note keyword default_type::.

'verbose [boolean]'
     *Note keyword verbose::.

   'set' shows the values of all the variables.  'set variable' shows
the value of the variable.  'set variable value' sets the value of the
variable.  A variable can be a substring of the variable name, as long
as it is unambiguous.


File: yafc.info,  Node: shell,  Next: site,  Prev: set,  Up: Yafc commands

3.1.40 'shell'
--------------

Executes a command on the local machine.  You can also use the very
useful alias '!'.

   If provided with no arguments, drops into an interactive shell
session.

   If provided with arguments, executes the specified command and then
returns to yafc.

   Example:

     ! cat document.txt

   The shell also supports argument replacement for various yafc
variables.

   Supported variables:

'%h'
     The current hostname (e.g.  "ftp.foo.bar")

'%p'
     The current port number (e.g.  21)

'%u'
     The current username (e.g.  "fred")

'%d'
     The current remote directory (e.g.  "/home/fred/")

   At this time, substitution is only supported for a whole argument.

   Works:

     ! ssh %h

   Doesn't work:

     ! ssh %u@%h


File: yafc.info,  Node: site,  Next: source,  Prev: shell,  Up: Yafc commands

3.1.41 'site'
-------------

Send site specific command.

   Usage:

     site command

   Try 'site help' or 'rhelp site' for more information


File: yafc.info,  Node: source,  Next: status,  Prev: site,  Up: Yafc commands

3.1.42 'source'
---------------

documentation missing...


File: yafc.info,  Node: status,  Next: switch,  Prev: source,  Up: Yafc commands

3.1.43 'status'
---------------

documentation missing...


File: yafc.info,  Node: switch,  Next: system,  Prev: status,  Up: Yafc commands

3.1.44 'switch'
---------------

Switch between open connections.

   Usage:
     switch [options] [connection]

   Options:

'-h'
'--help'
     Show short syntax description.

   The connection argument specifies which connection to switch to.  It
can be specified either as the connection number or with the name
(hostname or alias).

   If no argument is given, switch to the next open connection.


File: yafc.info,  Node: system,  Next: tag,  Prev: switch,  Up: Yafc commands

3.1.45 'system'
---------------

Show the type of the remote system.


File: yafc.info,  Node: tag,  Next: unalias,  Prev: system,  Up: Yafc commands

3.1.46 'tag'
------------

Tag files for later transferring or removal.

   Usage:
     tag [options] file ...

   Options:

'-c'
'--clear'
     Clear the taglist.

'-i'
'--info'
     Show some information about the tagged files.  This includes the
     total size of all tagged file, how many files and how many
     directories are tagged.

'-l'
'--list'
     List tagged files.

'-L[FILE]'
'--load[=FILE]'
     Load saved taglist file.  If optional parameter FILE is omitted,
     the taglist for this host is loaded (from the file
     'WORKDIR/taglist.HOSTNAME').

'-s[FILE]'
'--save[=FILE]'
     Save taglist to file.  If optional parameter FILE is omitted, the
     taglist is saved in the default file 'WORKDIR/taglist.HOSTNAME'.

'-h'
'--help'
     Show short syntax description.


File: yafc.info,  Node: unalias,  Next: untag,  Prev: tag,  Up: Yafc commands

3.1.47 'unalias'
----------------

documentation missing...


File: yafc.info,  Node: untag,  Next: url,  Prev: unalias,  Up: Yafc commands

3.1.48 'untag'
--------------

documentation missing...


File: yafc.info,  Node: url,  Next: user,  Prev: untag,  Up: Yafc commands

3.1.49 'url'
------------

Show the current URL.

   Usage:
     url [options]

   Options:

'-e'
'--no-encoding'
     Don't encode the URL as RFC1738 says.

'-h'
'--help'
     Show short syntax description.


File: yafc.info,  Node: user,  Next: version,  Prev: url,  Up: Yafc commands

3.1.50 'user'
-------------

Send new user information.


File: yafc.info,  Node: version,  Next: warranty,  Prev: user,  Up: Yafc commands

3.1.51 'version'
----------------

Shows the version of yafc, and compilation information


File: yafc.info,  Node: warranty,  Prev: version,  Up: Yafc commands

3.1.52 'warranty'
-----------------

Shows the yafc warranty.


File: yafc.info,  Node: Command redirection,  Next: Nohup transfers,  Prev: Yafc commands,  Up: The shell

3.2 Command redirection
=======================

Command redirection is available, using the conventional shell syntax.
However, there are some restrictions.  Firstly, input redirection is not
supported.  Also asynchronous mode is not supported.

   Examples:

''cat foo.txt > foo''
     Will copy the remote file foo.txt to the local file foo.

''ls -l | less''
     Will list all the files in long format, paged through less.

''ls -l | emacs &''
     This won't work, you can't use asynchronous mode.

''open < login.foo''
     Input redirection is not supported.


File: yafc.info,  Node: Nohup transfers,  Prev: Command redirection,  Up: The shell

3.3 Nohup transfers
===================

Get and Put has an option '--nohup'.

   When given, Yafc will fork itself to the background and continue to
transfer the specified files, allowing you to use your shell or even
logout.  Output is redirected to the file '~/.yafc/nohup/nohup.pid', or
to file specified by option '--logfile=FILE'.

   If you have tagged any files (with the 'tag' command, see *note
tag::), add the option '--tagged' to the get command to transfer those
files too.  There is an equivalent command for local files and put,
namely 'ltag'.

   Yafc will also enter nohup mode upon receipt of 'SIGHUP'.

   Set NOHUP_MAILADDRESS in the yafcrc file to a valid mail address if
you want to receive a mail notifying you when the transfer is complete.


File: yafc.info,  Node: Configuration,  Next: Bookmarks,  Prev: The shell,  Up: Top

4 Configuration
***************

Yafc will parse a system-wide configuration file, '/etc/yafcrc' (or
whatever you set with the '--sysconfdir' option to the configure
script), first.  Then, personal settings are read from '~/.yafc/yafcrc'
(overriding the global ones).  If none of those files exists, internal
defaults will be used.

   The '--dump-rc' option of Yafc can be used to dump the default
configuration file to standard output.  You can create your own config
file with the command 'yafc --dump-rc > ~/.yafc/yafcrc'.  You can
customize it with your favourite editor, it should be quite
self-explaining if you read the comments.

   Yafc also looks for '~/.netrc', and reads autologin information from
that file.  This file is also used by the standard ftp client.

   Yafc uses the Readline library to read commands from the terminal,
and Readline can be configured via the '~/.inputrc' file.  In this file
you can put keybindings and Readline-oriented options.  You can use
'$yafc' for conditional parsing of the '~/.inputrc' file.  A sample
inputrc file is included in the distribution.

* Menu:

* Keywords::                    Configuration keywords used
* Prompt codes::                Special codes in the prompts
* Transfer codes::              Special codes in the transfer strings
* Aliases::                     Writing aliases
* Colors::                      Using colors


File: yafc.info,  Node: Keywords,  Next: Prompt codes,  Up: Configuration

4.1 Keywords
============

The configuration file consists of keywords with an argument, separated
with a space.  There are three types of arguments: strings, booleans and
integers.  Strings must be enclosed in quotes if they contains spaces.
Boolean arguments can be written as 0/1, true/false or on/off.  The
keywords are case insensitive.

   These are the supported keywords:

'anon_password'
     type: string

     This is the password used for anonymous logins.  It should be your
     email address.

'autologin'
     type: boolean

     Setting this to true will cause yafc to attempt to login
     automatically.  Information for doing this is specified by *Note
     Bookmarks::.

'autoreconnect'
     type: boolean

     If this option is true, yafc will try to reconnect the currently
     open connection if it has timed out.  The directory cache is
     retained after a successful reconnect.

'quit_on_eof'
     type: boolean

     Quits yafc on end-of-file (usually 'Ctrl-D').

'read_netrc'
     type: boolean

     Read additional autologin entries from '~/.netrc'.  *note
     Bookmarks::.

'use_passive_mode'
     type: boolean

     If true, use passive mode data connections.  You might have to do
     this if you are behind a proxy.

'reverse_dns'
     type: boolean

     If this option is true, IP addresses will be reverse looked up in
     the DNS for a hostname, which can be slow.  Set to false to skip
     this.

'waiting_dots'
     type: boolean

     If this option is true, filenames will be completed with ...  while
     waiting for the directory listing to be downloaded.

'cache_timeout'
     type: integer

     Time (in seconds) before a cached directory times out and needs to
     be reread.  Set to 0 (zero) to disable the timeout.

'verbose'
     type: boolean

     Show all replies received from remote host.

'debug'
     type: boolean

     Show exactly what is going on.  Prints all FTP commands sent to
     remote host and all replies received, including response code.

'trace'
     type: string

     Create trace files in '~/.yafc/trace/trace.<pid>'.

'ssh_options'
     type: string

     Custom options that will be passed to the SSH program.

'ssh_try_scp'
     type: boolean

     Try to use SCP to copy files before falling back to SFTP. SCP might
     give you higher transfer rates than SFTP.

'inhibit_startup_syst'
     type: boolean

     Set to true to skip query of remote system on connect.

'use_env_string'
     type: boolean

     Alter the environment strings to reflect what Yafc is doing.  This
     information can be seen with the shell command 'ps'.

'remote_completion'
     type: boolean

     Use tab to complete remote files.  Yeahh.

'auto_bookmark'
     type: yes/no/ask

     If set to 'yes', Yafc automatically creates a bookmarks for the
     site when the connection is closed.  Setting this to 'ask', makes
     yafc ask if to create the bookmark.

     The bookmark is given an appropriate default aliases name.

'auto_bookmark_update'
     type: yes/no/ask

     If set to 'yes', yafc will always update an existing bookmark when
     the connection is closed, if not the 'noupdate' flag has been set,
     see the 'noupdate' keyword in *Note Bookmark keywords::.

'auto_bookmark_save_password'
     type: boolean

     If set to 'yes', Yafc don't ask whether to save passwords in the
     bookmarks file.  Anonymous password, though, are always saved.

     Passwords in the bookmarks file are stored either as clear text or
     base64-encoded.  Be sure the file is not world readable ('chmod
     0600 bookmarks'.)

'auto_bookmark_silent'
     type: boolean

     If set to 'true', Yafc won't say anything about automatically
     created bookmarks.

'default_type'
     type: string

     Specifies the default type used for file transfers, either 'binary'
     or 'ascii'.  Setting this to 'ascii' can mess up binary files
     (ascii mode rewrites the end-of-line characters).

'default_mechanism'
     type: string

     This option specifies which security mechanisms to try, in given
     order.  It is a colon-separated string, supported values are
     "krb4", "krb5" and "none".  Example: 'default_mechanism
     "krb4:krb5"'

'ascii_transfer_mask'
     type: string

     Filenames matching any of these filemasks are always transferred in
     'ascii' mode, regardless of the value of the 'default_type'
     keyword.  This can be overridden with the '--type' option to
     get/put.

     Masks are separated by colons (eg.  '*.ext1:*.ext2:filename*') and
     are case sensitive.  This option can be specified multiple times;
     masks will be appended.

     Preferrably used with 'default_type' set to 'binary'.

'transfer_first_mask'
     type: string

     Filenames matching any of these masks are transferred before other
     files.

     Masks are separated by colons (eg.  '*.sfv:*.nfo:README*:md5sum*')
     and are case sensitive.  This option can be specified multiple
     times; masks will be appended.

'beep_after_long_command'
     type: boolean

     Beep after a long command is finished.  Use 'long_command_time' to
     specify how long a 'long' command is.

'long_command_time'
     type: integer

     Number of seconds for command to become 'long'

'command_timeout'
     type: integer

     How long (in seconds) before aborting a command without response.

'connection_timeout'
     type: integer

     How long (in seconds) before aborting a connection without
     response.

'connect_attempts'
     type: integer

     Number of times to try to re-connect if login failed (due to busy
     server.)  Use the value -1 for unlimited number of tries, and 0 to
     disable this feature.

'connect_wait_time'
     type: integer

     Number of seconds to wait between connection attempts.

'use_history'
     type: boolean

     Save and load history lines in '~/.yafc/history'.  This is a no-op
     if not compiled with Readline.

'history_max'
     type: integer

     Max number of history lines to save in the history file.  This is a
     no-op if not compiled with Readline.

'startup_local_directory'
     type: string

     Yafc will change to this (local) directory upon startup.

'nohup_mailaddress'
     type: string

     If set, Yafc sends mail to this address when nohup transfers are
     finished.  *note Nohup transfers::.

'sendmail_path'
     type: string

     Complete path to sendmail used by 'nohup_mailaddress' above.

'prompt1'
     type: string

     This prompt is printed when no connection is established.

     See *note Prompt codes::.

     You can put escape codes here, for example if you want a colored
     prompt "%{\e[01;31m%}ftp%{\e[0m%}" will be "ftp" in red, if your
     terminal supports ISO 6429 (ANSI) color codes.  *note Colors::.

'prompt2'
     type: string

     connected but not logged in.

'prompt3'
     type: string

     connected and logged in

'transfer_begin_string'
     type: string

     This string is printed before the actual transfer begins.

     These strings are printed with the '--verbose' option to get/put.

     *note Transfer codes:: for special character codes that can be used
     in this string to show dynamic information.

'transfer_string'
     type: string

     This string is printed (approx.)  every second or so during the
     transfer with a trailing carriage return.

     *note Transfer codes:: for special character codes that can be used
     in this string to show dynamic information.

'transfer_end_string'
     type: string

     This string is printed when the transfer is finished.

     *note Transfer codes:: for special character codes that can be used
     in this string to show dynamic information.

'transfer_xterm_string'
     type: string

     This string is printed at the same time 'transfer_string' is
     printed, if the current $TERM variable is defined in
     'xterm_title_terms'.  This string can be used to reflect dynamic
     information about the current transfer in the title bar of an
     Xterm.

     *note Transfer codes:: for special character codes that can be used
     in this string to show dynamic information.

'tilde'
     type: boolean

     Display ~ instead of full home directory path for various commands.

'xterm_title1'
     type: string

     Xterm window titles

     same codes as for the prompts, see *Note Prompt codes::.

     This is an excerpt from the Xterm-title mini-HOWTO:
          Many people find it useful to set the title of a terminal to
          reflect dynamic information, such as the name of the host the
          user is logged into, the current working directory, etc.

          This may be done by using XTerm escape sequences.  The
          following sequences are useful in this respect:

          'ESC]0;_string_BEL'
               Set icon name and window title to _string_

          'ESC]1;_string_BEL'
               Set icon name to _string_

          'ESC]2;_string_BEL'
               Set window title to _string_

          where 'ESC' is the _escape_ character (\033), and 'BEL' is the
          _bell_ character (\007).

          _Note_: these sequences apply to most xterm derivatives, such
          as nxterm, color-xterm and rxvt.  Other terminal types often
          use different escapes; see the appendix for examples.  For the
          full list of xterm escape sequences see the file ctlseq2.txt,
          which comes with the xterm distribution, or xterm.seq, which
          comes with the rxvt distribution.

          These escapes really need to be applied every time the prompt
          changes.  This way the string is updated with every command
          you issue and can keep track of information such as current
          working directory, username, hostname, etc.

     Example: 'xterm_title1 "\e]0;Yafc\x07"' sets the xterm window title
     and icon name to 'Yafc'.

'xterm_title2'
     type: string

     Example: 'xterm_title1 "\e]0:Yafc - %h\x07"' sets the xterm window
     title and icon name to 'Yafc - HOSTNAME'.

'xterm_title3'
     type: string

     Example: 'xterm_title1 "\e]0;Yafc - %u@%h:%~\x07"' sets the xterm
     window title and icon name to 'Yafc - USER@HOSTNAME:DIRECTORY'.

'xterm_title_terms'
     type: string

     List of $TERM's, separated with spaces, which can handle xterm
     escape sequences.


File: yafc.info,  Node: Prompt codes,  Next: Transfer codes,  Prev: Keywords,  Up: Configuration

4.2 Prompt codes
================

These codes can be used in the prompts, *note Keywords::, to reflect
dynamic information.  For all codes, there may be an optional minimum
field width.  This is an integer between the '%' and the code character.

'%u'
     username

'%h'
     remote host name (as passed to open)

'%H'
     %h up to the first '.'

'%m'
     remote machine name (as returned by gethostbyname)

'%M'
     %m up to the first '.'

'%n'
     remote IP number

'%w'
     current remote working directory

'%W'
     basename of %w

'%~'
     as %w but home directory is replaced with ~

'%l'
     current local working directory

'%L'
     basename of %l

'%c'
     Total number of connections open

'%C'
     The number of the currently active connection

'%%'
     a percent sign

'%#'
     a '#' if (local) user is root, else '$'

'%{'
     begin sequence of non-printing chars, ie escape codes

'%}'
     end sequence of non-printing chars, ie escape codes

'\e'
     an escape character (hex 0x1B)

'\n'
     a newline

'\t'
     a tab character

'\r'
     a carriage return

'\x##'
     character 0x## (hex)

   Example:

     prompt3 "(%C) %{\e[1%}myafc%{\e[0m%} %u@%h:%42~> "


File: yafc.info,  Node: Transfer codes,  Next: Aliases,  Prev: Prompt codes,  Up: Configuration

4.3 Transfer codes
==================

These codes can be used in the transfer strings.  For all codes, there
may be an optional minimum field width.  This is an integer between the
'%' and the code character.  For example will %17v be expanded to a
visual progress bar with length 17.  If the field width if negative
(start with a minus), the string is left-justified, so using %-20S will
show the total size, padded with spaces to 20 characters.

'%r'
     source filename

'%R'
     source filename w/path

'%l'
     target filename

'%L'
     target filename w/path

'%s'
     size transferred so far

'%S'
     total size (if available)

'%e'
     ETA (time left)

'%p'
     percent transferred so far

'%%'
     percent sign

'%b'
     transfer rate (Bps)

'%B'
     transfer rate (Bps) or "stalled" if stalled

'%t'
     time elapsed

'%v'
     visual progress bar

   Example:

     transfer_string "%5p%% [%{\e[32m%}%25v%{\e[0m%}] %s/%S ETA %{\e[32m%}%e%{\e[0m%} %B"


File: yafc.info,  Node: Aliases,  Next: Colors,  Prev: Transfer codes,  Up: Configuration

4.4 Aliases
===========

Just like in the shell, you can create aliases for commands you use
often, with options you like.

   Aliases can be defined in the configuration file or directly on the
command line.  Aliases defined on the command line are only valid in the
current session.  *note alias::.

   The default config (see also *note Configuration::) includes a number
of useful aliases.

   The best way to explain aliases, I think, is to look at some
examples:

* Menu:

* Alias examples::              examples on aliases


File: yafc.info,  Node: Alias examples,  Up: Aliases

4.4.1 Alias examples
--------------------

'alias ls "ls -F --color"'
     Override the command 'ls' to be expanded to 'ls -F --color'.  Any
     arguments given to the new 'ls' alias will be appended.

'alias ll "ls -l"'
     'll' will be expanded to 'ls -l', regardless if there is an alias
     for plain 'ls' like the one above.  Aliases can't be nested.

'alias ls list'
     Override the command 'ls' to be expanded to the command 'list'.
     This is fine, but will generate a warning; 'warning: alias 'ls'
     shadows a command with the same name', because the original command
     'ls' is lost and can't be referenced (except through another
     alias.)

'alias lls "! ls"'
     Provide local file listings through the command 'lls'.  This alias
     (along with a number of similar ones), is actually provided in the
     default configuration file.

'alias pls "ls %1 | less"'
     Create a new command 'pls', which lists the contents of a directory
     and pages it through the pager 'less'.  The '%1' keyword is
     replaced with the first argument to 'pls', any other arguments will
     be appended at the end (to the local 'less' command.)

'alias pls "ls %* | $PAGER"'
     Create a new command 'pls', which lists the contents of a directory
     and pages it through your favourite pager.  Any arguments given to
     'pls' will be inserted between ls and the pipe because of the '%*'
     keyword.  Using '$PAGER' is fine, it is expanded by the ordinary
     shell.

'alias rels "cache --touch %*; ls -F --color %*"'
     Create a new command 'rels', which flushes the directories from the
     cache before listing them.  Two '%*' sequences are needed to insert
     the arguments at both places.


File: yafc.info,  Node: Colors,  Prev: Aliases,  Up: Configuration

4.5 Colors
==========

Escape codes can be used to display colors in the transfer strings and
the prompts.  All escape codes must be surrounded by %{ and %} pairs for
readline to correctly wrap long lines.

   The built-in command 'ls' has an option '--color'.  You must set the
environment variable LS_COLORS (or LS_COLOURS) for this to work.  See
manpage for GNU ls(1) and *note dircolors: (fileutils)dircolors
invocation, for information how to do this.  If you don't set
LS_COLO[U]RS, you can still use the '--color' option, since Yafc
provides some default settings.

* Menu:

* ANSI attribute codes::        Escape codes for attributes


File: yafc.info,  Node: ANSI attribute codes,  Up: Colors

4.5.1 ANSI attribute codes
--------------------------

An ANSI escape sequence has the format 'ESC[X;Ym', where 'ESC' is the
escape character (octal 033).  'X' and, optionally, 'Y', is one of the
following escape codes:

   * attribute codes

        - 00 = none

        - 01 = bold

        - 04 = underscore

        - 05 = blink

        - 07 = reverse

        - 08 = concealed

   * text color codes

        - 30 = black

        - 31 = red

        - 32 = green

        - 33 = yellow

        - 34 = blue

        - 35 = magenta

        - 36 = cyan

        - 37 = white

   * background color codes

        - 40 = black

        - 41 = red

        - 42 = green

        - 43 = yellow

        - 44 = blue

        - 45 = magenta

        - 46 = cyan

        - 47 = white

   For example, the sequence 'ESC[1;32myafc rulesESC[0m' will be the
string 'yafc rules' in bright green, after which the attribute is
restored to normal.


File: yafc.info,  Node: Bookmarks,  Next: Kerberos,  Prev: Configuration,  Up: Top

5 Bookmarks
***********

Just like creating bookmarks for web pages in a browser, you can create
bookmarks for ftp sites in Yafc.  These can later be used for autologin
to that site.

   When connected to an ftp site, use the 'bookmark' command (*note
bookmark::) to create a bookmark for that site.  If you logged in with a
username and password, Yafc will ask if you want to save the password in
the bookmarks file.  If you do, be sure it isn't world readable.  By
using the 'auto_bookmark' keyword in the configuration file, Yafc can
create bookmarks automatically for new sites.

   The bookmarks are available to the 'open' command, with tab
completion.  You can also specify a bookmark name/alias on the command
line when starting yafc.  Bookmark names/aliases can be abbreviated, as
long as it isn't ambiguous.

   The autologin information is stored in much the same way as in the
'~/.netrc' file used by standard ftp(1), except that the macdef option
is not supported.

   An entry must begin with a 'machine', 'default' or 'local' keyword.

* Menu:

* Bookmark keywords::          keywords for bookmarks
* Bookmark examples::          examples


File: yafc.info,  Node: Bookmark keywords,  Next: Bookmark examples,  Up: Bookmarks

5.1 Bookmark keywords
=====================

'machine'
     Specify the hostname to connect to or a domainname.  The hostname
     can be a valid FTP URL, including username, password, etc.  In that
     case there is no need to specify the corresponding keywords.  Using
     the URL syntax is the only way to specify a non-standard port.

     Domainnames should begin with a period, as in '.kth.se'.  This will
     match any hostname on that domain, except for hostnames explicitly
     mentioned with another 'machine' keyword.  You can not specify an
     alias name for a domain entry.

     To bookmark a ssh connection, use 'ssh://hostname' or
     'sftp://hostname' (they are equivalent).

'alias'
     Specifies another (verbose) name for the bookmark, like 'ruby'
     instead of 'ftp.netlab.co.jp'.  This is the name that will be shown
     in the tab completion list.  Valid only after a 'machine'
     statement.

'local'
     If an entry begins with 'local', it specifies how to login to all
     local machines.  Local machines are unqualified hostnames (ie,
     hostnames without a period.)

     This can be overridden with an entry for a specific machine.

'default'
     The 'default' entry is used when no other 'machine' or 'local'
     keyword matched.  It can be used to login anonymously to all
     unknown sites.

'login'
     Specify the username.

'anonymous'
     Try an anonymous login, uses ANON_PASSWORD.

'password'
     Specify the password, if required.

'account'
     Specify account name.  Not fully supported, anyone using it?

'cwd'
     This keyword specifies a startup directory on the remote server.
     Yafc changes the current directory when logged in.

'prot'
     The prot keyword sets the Kerberos data protection level.  Valid
     protection levels are 'safe', 'clear' and 'private'.

     This is a no-op if not compiled with Kerberos.

'mech'
     List the preferred security mechanisms to use.  This is the same as
     'default_mechanism', except it is only used for this machine.

'passive'
     Boolean option requiring an argument (true/false).  If true, use
     passive mode in data transfers, regardless of the value of
     'use_passive_mode' in the configuration file.

'noupdate'
     If this keyword is specified, the bookmark will not be updated when
     a connection is closed.  The 'noupdate' flag can be toogled with
     the command *Note bookmark::.


File: yafc.info,  Node: Bookmark examples,  Prev: Bookmark keywords,  Up: Bookmarks

5.2 Bookmark examples
=====================

'default login anonymous'
     As default, login as 'anonymous' and prompt for password

'default anonymous'
     As default, login as 'anonymous' and automatically supply your
     email address as password.

'local login mhe'
     Login as 'mhe' on all machines on the local network (machines w/o a
     '.')

'machine .foo.bar.se login niels'
     Login as 'niels' on all hosts on .foo.bar.se domain

'machine dent.foo.bar.se login slartibartfast cwd ~/fjord'
     Login as 'slartibartfast' on dent.foo.bar.se and start in directory
     ~/fjord

'machine slartibartfast@dent.foo.bar.se/fjord'
     Identical to the example above, but using an ftp URL instead

'machine ftp.gurka.com:4711 anonymous'
     Login as 'anonymous' and automagically supply password from
     anon_password, connect on non-standard port 4711

'machine mayer.physto.se anonymous cwd /pub/yafc alias yafc'
     Login anonymously to machine mayer.physto.se with other name yafc


File: yafc.info,  Node: Kerberos,  Prev: Bookmarks,  Up: Top

6 Kerberos
**********

If Yafc is compiled with Kerberos, it tries to authenticate using
Kerberos 5 without sending the password in cleartext.  For anonymous
logins, Kerberos is never used.  The default protection level for data
connections is clear, ie no encryption on transfers.  Use the command
'prot' (*note prot::), to change the data protection level.  Valid
arguments are 'clear', 'safe', and 'private'.  Note that confidential
protection is not supported in Kerberos 4.  You can use the 'prot'
keyword (*note Bookmark keywords::) in the bookmarks file to
automagically set the protection level for a specific host.



Tag Table:
Node: Top930
Node: Overview1358
Node: Bugs2324
Node: Obtaining Yafc2869
Node: Motivation3112
Node: Invoking Yafc3713
Node: The shell6406
Node: Yafc commands6683
Node: !9797
Node: afslog9940
Node: alias10076
Node: bookmark10303
Node: cache11515
Node: cat12056
Node: cd12590
Node: cdup12955
Node: chmod13136
Node: close13408
Node: copyright13550
Node: filetime13694
Node: flush13845
Node: fxp13984
Node: get17828
Node: help21023
Node: idle21160
Node: lcd21297
Node: list21501
Node: lpwd21620
Node: ls21757
Node: ltag23413
Node: luntag23538
Node: mkdir23672
Node: mv23873
Node: nlist24036
Node: nop24169
Node: open24462
Node: prot25828
Node: put26351
Node: pwd28961
Node: quit29127
Node: quote29303
Node: reopen29441
Node: rhelp29588
Node: rm29724
Node: rmdir30196
Node: rstatus30433
Node: set30575
Node: shell31484
Node: site32327
Node: source32553
Node: status32694
Node: switch32837
Node: system33323
Node: tag33474
Node: unalias34346
Node: untag34488
Node: url34626
Node: user34913
Node: version35050
Node: warranty35226
Node: Command redirection35361
Node: Nohup transfers36038
Node: Configuration36891
Node: Keywords38372
Ref: keyword anon_password38830
Ref: keyword autologin38958
Ref: keyword use_passive_mode39559
Ref: keyword verbose40226
Ref: keyword debug40306
Ref: keyword default_type42193
Node: Prompt codes48823
Node: Transfer codes50120
Node: Aliases51196
Node: Alias examples51821
Node: Colors53600
Node: ANSI attribute codes54313
Node: Bookmarks55316
Node: Bookmark keywords56557
Node: Bookmark examples59070
Node: Kerberos60158

End Tag Table


Local Variables:
coding: utf-8
End:
