UTREE(1L)

NAME

utree - Screen oriented filesystem browser and utility

SYNOPSIS

utree [options] [rootdirectory]

DESCRIPTION

The screen oriented filesystem browser and utility utree descends the directory hierarchy rooted in your home directory, defined in a tree list file if given, or rooted in rootdirectory if given, and displays the directory tree on the so called tree screen. On the tree screen utree lets you walk thru the tree, execute some default and user defined commands on it and change to any directory in the tree.
If you have changed to a directory utree displays all files in this directory on the so called file screen. On the file screen utree lets you walk thru the file list and execute some default and user defined commands on files.

OPTIONS

The following command line options are interpreted by utree:

-L  Follow symbolic links to directories

-S  Ignore default minimal screen size of 80 columns and 24 lines

-V  Display utree version and copyright notice

-a  Read in all directories, including those that begin with a dot (.), which are normally skipped

-b  Suppress ringing of the bell (useful for visual bells)

-c  Don't display and update a clock every second

-d var=[val]
    Set the variable var to value val or unset the variable var

-d typ:[cmd]
    Define the command cmd for the filetype typ or undefine any command for the filetype typ

-f lst
    Build directory tree from list file lst

-g  Don't use graphical characters

-h  Display usage and some help about options

-i ind
    Set the tree level indention to ind columns (3..9)

-n  Avoid scanning the tree for changes i.e. after shell escape

-l lev
    Build the tree up to level lev for quicker startup

-o  Omit saving changes in variables and filetype command definitions, command history and key bindings

-p lin
    Use lin lines for displaying filenames of the current directory on the tree screen (default: 3)

-q  Build the tree up to level 2 (like -l 2)

-r  Build the tree scanning and reading the file system instead of reading a tree list file

-s  Don't use hardware scrolling

-u  Read and update all file lists after building the tree from a tree list file

-v mod
    Set using video attributes to mode mod. mod may be 2 for all possible, 1 for bold and underline and 0 for none video attributes.

-w  Suppress warnings about unreadable directories

-x cmd
    Use and execute the string cmd as initial input at startup. The string cmd is a simple sequence of utree commands

The boolean options bcgnosw and the numerical options ipv may also be pre-set in the environment variable UTREE. E.g. if you want to suppress ringing of the bell and displaying and updating the clock and if you prefer a tree indention of 4 columns set the environment variable UTREE to 'bci4' for this reason.
Most of the options correspond to utree variables and therefore they may also be set or unset with the variable command (=). See the sections global commands and variables below.

UTREE STARTUP

If utree is called without the optional command line parameter rootdirectory or this directory is rooted in your home directory utree tries to build up the directory tree reading a file .utreelist in your home directory, which contains a list of your directory tree created by a previous utree session or by the additional shell script utree.mklist called before. If the command line option -f lst is given utree builds up the tree from this list file lst which may be created with the denoted shell script utree.mklist or a command like find. Entries in such list files have to start with the directory separator / (slash) in the first column of the line. All other entries are ignored and skipped.

If building the tree from a list file the file lists of directories are created and read in on demand only, which means when a directory becomes the current directory by moving the cursor to this directory. This speeds up the start of utree because there is no need for scanning and reading the filesystem for subdirectories what may take some time for larger filesystems.

In all others cases, if no list file is given with the command line option -f lst, rootdirectory is rooted in your home directory and the file .utreelist is not found, or the command line option -r is given utree builds up the tree by scanning and reading the filesystem recursively. You can speed up the start with the commandline option -l lev which causes utree to build the initial directory tree only up to level lev similar to the option -l of the well known find command. At runtime some commands let you expand the directory tree later and inspect directories and subtrees not visible at startup (see below).

SCREEN LAYOUT

The screen is divided into three regions. The top screen line, the so called echo line is for displaying messages and entering input. The second screen line, the so called help line is for displaying help messages and the utree default or user defined menu lines.
The rest of the screen forms a window on the directory tree on the tree screen or on the file list of the current directory on the file screen. Or he is used for displaying variable or filetype commands settings, for displaying help pages and displaying command outputs.

UTREE SCREENS AND MENUS

Utree knows the following screens and menus:

tree screen
    This is the initial screen displayed when utree is started and has built up the directory tree. The tree screen forms a window on the directory tree. The current directory on which most commands are working is highlighted and the last screen lines are used to display the first files of the file list of the current directory. You may move the window over the directory tree, enlarge or shrink the directory tree window or walk thru the directory tree and execute default and user defined commands on directories and subtrees. On the help line the most important commands available for directories or subtrees on the tree screen are shown in the default tree menu. The tree menu shows the names of the the tree screen commands, the keystrokes to invoke a command are marked with uppercase letters. You may switch the menu to a user defined menu line displaying user defined commands for the tree screen. For further information about all tree screen commands see the sections global commands, tree screen commands and variables of this manual page.

file screen
    The file screen forms a window on all files of the current directory. The current file on which most commands are working is highlighted. Yoy may move the window over the file list or walk thru the file list and execute default and user defined commands on files. On the help line the most important commands for files available on the file screen are shown in the default file menu. The file menu displays the names of the the file screen commands, the keystrokes to invoke a command are marked with uppercase letters. You may switch the menu to a user define menu line displaying user defined commands for the file screen. For further information about all file screen commands see the sections global commands, file screen commands and variables of this manual page.

help screen
    If you have switched to the help screen with the help command (h) on the help line the help menu is displayed and you may select help about interesting topics. The help menu displays the names of all available help topics, the keystrokes to select help about a topic are marked with uppercase letters. For more information see the section help pages below.

variables screen
    If you have switched to the variables screen with the variables command (=) all variables and their settings are displayed and you may set or unset any of the variables. On the help line is shown how to set or unset a variable in a short form. All changes in variables definitions are saved to the file .utree in your home directory if the variable AUTOSAVE is set. For more information see the section variables below.

commands screen
    If you have switched to the filetype commands screen with the filetype commands command (:) all filetype commands and their settings are displayed and you may set or unset any of the filetype commands. On the help line is shown how to set or unset a filetype command in a short form. All changes in filetype command definitions are saved to the file .utree in your home directory if the variable AUTOSAVE is set. For more information see the section filetype commands below.

shell screen
    If you have switched to the shell screen with the shell command (!) for executing commands not supported directly by utree all previously entered commands saved in a so called history list are displayed on the shell screen. You may get any command from the history list into the line editor for editing and execution or enter and execute a new command. All commands up to a maximal number defined in the variable HISTSIZE are saved in the history list. Before leaving utree all saved commands in the history list are saved to a history file .utreehist in your home directory if the variable AUTOSAVE is set. At startup this file is searched for and read in if found. For more information see also the section variables below.

bindings screen
    If you have switched to the bindings screen with the bindings command (|) all currently defined key bindings and their meaning are displayed and you may bind any key to an appropriate utree command or to insert a string into the input buffer. At startup a file .utree-TERM in your home directory or a file utree-TERM in a global startup directory is read in if found containing key bindings for the terminal type defined in the environment variable TERM. All changes in key bindings you have done on the bindings screen at runtime are saved to .utree-TERM if the variable AUTOSAVE is set. For more information see also the section key bindings below.

status screen
    The status command (s) displays all information available about a file or directory on the status screen. Here you may change the ownership, group membership or access rights of a file or directory. On BSD systems not all of the denoted changes may be allowed for normal users.

KEY NAMING CONVENTIONS AND DEFAULT KEY BINDINGS

All utree commands are simple single letter commands or control sequences. The default or user defined commands therefore are invoked with a single keystroke or a combination of the <CONTROL> key with another key. The naming conventions in the following manual sections for utree commands invoked by a keystroke are:

key means hit this <key> only

C-key
    means hold down the <CONTROL>-key and hit <key>

To permit rebinding of pre-defined keys or binding functions keys to utree commands all control sequences have special names. All key or functions names and their default bindings are list in the table below

SELECT
    CR, NL

FORWARD
    C-f

BACKWARD
    C-b

NEXT
    C-n

PREVIOUS
    C-p

NEXTPAGE
    C-v

PREVPAGE
    C-w

BEGIN
    C-a

END C-e

UP  C-u

DOWN
    C-d

INSERT
    C-o

DELETE
    BS

KILL
    C-k

SETMARK
    C-@

GOTOMARK
    C-g

GOTOTAG
    C-t,TAB

HELP
    C-r

REFRESH
    C-l

CANCEL
    C-x

BREAK
    C-c,C-y

EXIT
    C-z

In the following sections of this manual page the default key bindings are used instead of the names or functions.

Some function keys are supported by utree, i.e. the four arrow or cursor keys, and are bound to appropriate functions. See the sections key bindings and function keys below for more details.

HELP PAGES

If the utree help pages contained in the file utree.help are accessible in a directory defined at compile time or defined in the environment variable UTLIB you can get help on all screens or from within the line editor with the help command (h or ?) or the help key (C-r). After displaying help about your current context, i.e. help about tree commands if you are on the tree screen, you can switch to the help menu and select help about all topics with a single keystroke. All help screen commmands and the menu items of the help menu displayed on the help line are:

h   (Help) About the help pages and the help menu

a   (About) Information about utree and key naming conventions

u   (Usage) Description of utree usage and commandline options

g   (Global) Global commands common for the tree and the file screen

t   (Tree) Commands for the tree screen

f   (File) Commands for the file screen

e   (Edit) Commands of the builtin line editor

v   (Vars) Utree variables and variable definition

c   (Cmds) Filetype commands and filetype command definition

l   (Line) Line format for user defined tree, file and filetype commands.

k   (Keys) Function keys used by utree

p   (Patterns) File pattern matching, filename, modification time and file size patterns

q   (Quit) Leave help screen

The help pages contain in short form most information given in the sections of this manual page.

GLOBAL COMMANDS

The following commands are common for the tree and file screen They can be given in lowercase or uppercase letters:

C-z Exit utree from all screens

C-c,C-y
    Cancel or break current command or input

C-l Redisplay the current screen or the input line

TAB,C-t
    Move to the next tagged file or the next directory containing tagged files

h,?,C-r
    Display help pages and switch to the help screen and the help menu

@,C-@
    Mark the current directory or file

#,C-g
    Goto to a previously marked directory or file

a   Display utree version and copyright notice

d   Display current date and time

j   Move to the next directory or file (for vi fans)

k   Move to the previous directory or file (for vi fans)

n   Change sort criteria from lexical order to modification time order or vice versa and resort files in the file list

t   Tag files matching a file pattern for further processing

u   Untag files

w   Display full pathname of the current directory

z   Zoom files from filelist matching a file pattern

=   Switch to the variables screen, display and set or unset variables

:   Switch to the commands screen, display and set or unset filetype commands

|   Switch to the bindings screen, display all key bindings and bind or rebind keys

!   Switch to the shell screen, display all commands from the shell command history list, enter and execute commands not supported directly from utree. Before a given command is executed the command line is searched for some sprintf like format characters lead in by a percent sign (%) which are expanded. See the section line formats for more information

$   Escape to an interactive shell

TREE SCREEN COMMANDS

All commands on the tree screen can be given in lowercase or uppercase letters with the meaning denoted below. Commands given in lowercase letters affect the current directory only. Commands given in uppercase letters indicated by an uppercase letter in the table below affect the subtree rooted in the current directory or all tagged files in the subtree rooted in the current directory. The tree screen commmands and the menu items of the default tree menu displayed on the help line are:

>,CR,NL,SP,>
    Change to the file screen of the current directory

<   Change to the file screen of the parent directory

C-n Move to the next directory

C-p Move to the previous directory

C-f Move to the next directory on same level as the current directory

C-b Move to the previous directory on same level as the current directory

C-v Move one page forward

C-w Move one page backward

C-a Move to the beginning of the directory tree

C-e Move to the end of the directory tree

TAB,C-t
    Move to next the directory containing tagged files

C-u Scroll up one line the directory tree

C-d Scroll down one line the directory tree

@,C-@
    Mark the current directory

#,C-g
    Move to a previously marked directory

h,? (Help) Help about tree screen commands

b,B (Backup) Backup the current directory or tree or backup all tagged files in the subtree

c,C (Chdir) Move to a directory or copy all tagged files in the subtree. Before you move to a directory you are requested for the name of this directory before. Instead entering a name you can select a directory from the tree with C-n and C-p. Instead of entering a name of a directory where to copy the tagged files you can select a directory from the tree with C-n and C-p or directly from tree screen using CR.

f,F (Find) Find files in the current directory or subtree matching a file pattern you have to enter before. If a file matching the given pattern is found you may tag this file, change to the directory containing the found file or continue find

g,G (Grep) Search for pattern in files in the current directory or subtree. You are requested for a file and a search pattern. If a file matching the search pattern is found you may tag this file, change to the directory containing the found file or continue search

i   (Info) Display some short information about the current directory. Displayed are access rights, modification time and the disk usage of the current directory or subtree

l,L (List) List files in the current directory or subtree matching a file pattern you are requested before or list all tagged files in the subtree

m,M (Mkdir) Create a new directory rooted in the current directory or move all tagged files to a destination directory. Instead of entering the directory name you can select this name from the directory tree with C-n and C-p or directly from tree screen using CR.

n,N Change the sort criteria from lexical order to modification time order or vice versa and resort the file list of the current directory or subtree

o   (Out) Write a list of directories, files, tagged files, files matching a file pattern or a formatted tree list to a list file. A formatted tree list file can later be displayed on the screen or send to a printer using the additional filter command utree.prlist

q   (Quit) Leave the tree screen and exit utree

r,R (Rmdir) Remove the current directory or all tagged files in the subtree. A directory to be removed may not contain any subdirectories.

s   (Stat) Switch to the status screen, display all status information of the current directory and change owner, group and access rights of the current directory

t,T (Tag) Tag files in the current directory or subtree matching a file pattern you are requested before

u,U (Untag) Untag files in the current directory or subtree

z,Z Zoom files matching a file pattern in the current directory or subtree. Zooming means that only those files mating the file pattern are displayed and visible for further processing.

+   Enlarge the tree window, shrink the file window one line

-   Shrink the tree window, enlage the file window one line

/   Scan the current directory or tree and rebuild directories if they need rebuilding (i.e. if they are not yet read in or have changed)

\   Scan the current directory for subdirectories and build up and insert the subtree into the directory tree. You are requested for the maximal tree level to build up before

0   Switch the tree menuline from the default to the user defined tree commands or vice versa

1..9
    Execute the user defined tree command 1 .. 9

For further information about file patterns for the commands find, grep, list, tag and untag see the section file patterns below. For user defined tree commands see the section variables.

FILE SCREEN COMMANDS

All commands on the file screen can be given in lowercase or uppercase letters with the meaning denoted below. Commands given in lowercase letters affect the current file only. Commands given in uppercase letters indicated by an uppercase letter in the table below affect all tagged (selected) files if files are tagged or the current file if no files are tagged. The file screen commmands and the menu items of the default file menu displayed on the help line are:

q,CR,NL,SP
    (Quit) Leave the file screen and change back to the tree screen

C-f Move to the next file

C-b Move to the previous file

C-n Move to the file on the next line

C-p Move to the file on the previous line

C-v Move one page forward

C-w Move one page backward

C-a Move to the beginning of the file list

C-e Move to the end of the file list

TAB,C-t
    Move to the next tagged file

C-u Scroll up one line the file screen

C-d Scroll down one line the file screen

@,C-@
    Mark the current file

#,C-g
    Move to a previously marked file

h,? (Help) Help about file screen commands and switch to the help screen

c,C (Copy) Copy the current file or tagged files. You are requested for a destination file or directory where to copy the file or tagged files. Instead of entering a directory name you can select a destination directory using C-n and C-p or select directly on the tree screen with CR

e,E (Edit) Edit the current file or tagged files

f   (Find) Find files matching a file pattern you are requested before

g,G (Grep) Search for a pattern in the current file or tagged files. Before search you are requested for a file pattern and the search pattern to search for

i,I Display some short information about the current file or tagged files. Displayed are the access rights, the size and the modification time of the current file or tagged files

l,L (List) List files matching a file pattern you are requested before or all tagged files

m,M (Move) Move or rename the current file or tagged files. You are requested for the new file name or a destination directory where to move the current file or tagged files Instead of entering the name of a destination directory you can select a directory using C-n and C-p or directly on the tree screen with CR

n   Change the sort criteria from lexical order to modification time order or vice versa and resort the file list

p,P (Print) Print out the current file or tagged files

r,R (Remove) Remove the current file or tagged files. Before removing you are asked if you really want to remove the current file or tagged files

s,S (Stat) Switch to the status screen display all status information of the current or tagged files and change owner, group and access rights of the current file or tagged files

t,T (Tag) Tag the current file or files matching a file pattern you are requested before for further processing

u,U (Untag) Untag the current file or files matching a file pattern you are requested before

v,V (View) View the current file or tagged files

x,X Execute the current file or tagged files. If a filetype command is defined for this file you can execute this filetype command, otherwise you are requested for a command or for parameters to execute

z   Zoom files matching a file pattern

>   If the current file is a directory change to the file screen of this directory

<   Change back to the file screen of the parent directory

/   Rebuild the file list (i.e. after shell escape)

0   Switch the menuline from the default to the user defined file commands or vice versa

1..9
    Execute the user defined file commands 1 .. 9

For further information about file patterns for the commands find, grep, list, tag and untag see the section file patterns below. For user defined file commands see the section variables. For filetype command execution invoked with the command x see the section filetype commands below.

LINE EDITOR COMMANDS

Many utree commands need some user input for further processing which is done with a builtin simple line editor. Many commands pre-set the input buffer with a default input line if this default is known. For some commands you can use the keys C-n and C-p to scroll in already existing input lists and select an input line for editing or processing without entering the line completely. The line editor knows about the following functions:

CR,NL
    Accept and send the input line

C-c,C-y
    Cancel input and leave the line editor

C-o Switch from overwrite-mode to insert-mode or vice versa

C-l Redisplay the input line

C-f Move the cursor one character forward

C-b Move the cursor one character backward

C-a Move the cursor to the beginning of the input line

C-e Move the cursor to the end of the input line

C-v Scroll horizontally forward the input line

C-w Scroll horizontally backward the input line

C-d Delete one character under the cursor

C-h,DEL
    Delete one character left from the cursor

C-x Delete the input line completely

C-k Delete the input line from the cursor position to the end

C-t Transpose two characters under and left from the cursor

C-r Display help pages and switch to the help screen

C-@ Set a mark at the current cursor position

C-g Move the cursor to the previously marked position

C-n Get the next entry into the line editor

C-p Get the previous entry into the line editor

All other printable characters are appended at the end of input line, inserted in insert-mode or overwrite the character under the cursor in overwrite-mode. The current mode is displayed at the end of the help line. Most line editor commands are also available with function keys, see the section function keys below.

VARIABLES

Utree knows about and uses the following variables which may be set or unset at startup in the startupfile $HOME/.utree, with some commandline options (see options above), or the variables command (=) on the variables screen:

BELL
    or BL: Allow ringing of the bell if set

CLOCK
    or CL: Show and update clock every second if set

GRAPHCHARS
    or GC: Use the graphical character set if set. Not all terminal database termcap or terminfo definitions of the graphical character set are correct

TERMSCROLL
    or TS: Use hardware terminal scrolling if set. On some terminals (i.e. on the X terminal emulator xterm) redrawing the screen may be faster than scrolling

SCANTREE
    or ST: Allow scanning the tree for changes if set. Many commands scan the directory tree after execution what may take some time. Prohibiting tree scanning therefore may speed up utree a little bit

WARNDIRS
    or WD: Allow warnings and requests about unreadable directories if set

LEXSORT
    or LS: Sort filenames in lexical order if set, in order of modification times if not set.

AUTOSAVE
    or AS: Save changes in variables or filetype commands definitions, key bindings and history list to appropriate files in the home directory

TREEINDENT
    or TI: Set the tree level indention column (3 .. 9) if possible. Normally the tree level indention column is calculated dependent on the number of screen columns and the maximal filesystem depth automatically

VIDEOMODE
    or VM: Set using of video attributes. 2 means use all possible attributes and their combinations. 1 means use the attributes reverse and underline only. 0 means don't use any video attribute.

FILELINES
    or FL: Number of lines of the file window on the tree screen (1 .. 9, default 3)

HISTSIZE
    or HS: Maximal number of shell commands which are hold in the shell commands history list (6 .. 99, default: 22)

EDITOR
    or ED: Program for editing files. When redefining the editor variable don't forget to check and set or unset the editopts variable for editor options

EDITOPTS
    or EO: File editor options

PAGER
    or PG: Program for viewing files. When redefining the pager variable don't forget to check and set or unset the pageopts variable for pager options

PAGEOPTS
    or PO: File pager options

XDUMPER
    or XD: Program for hexdumping files. When redefining the hexdumper variable don't forget to check and set or unset the xdumpopts variable for hexdumper options

XDUMPOPTS
    or XO: File hexdumper options

LPRINTER
    or LP: Program for printing files or sending files to the printer spooling system. When redefining the lineprinter variable don't forget to check and set or unset the lprintopts variable for lineprinter options

LPRINTOPTS
    or LO: Printer options

BACKUP
    or BK: Program or shell script for backing up a directory or tree

BACKUPOPTS
    or BO: Backup options

SHELL
    or SH: Interactive shell for shell escape

TREECMD1..9
    or T1..9: User defined tree screen commands 1 .. 9

FILECMD1..9
    or F1..9: User defined file screen commands 1 .. 9

Variables are set with a line 'variable=value' or 'shorthand=value' (i.e. 'treecmd1=ps -ef' or 't1=ps -ef') and unset with a line 'variable=' or 'shorthand=' (i.e. 't1='). When defining user tree or file commands some sprintf like format characters lead in by a percent sign (%) have a special meaning and are expanded before the command is executed. For further information about the command line format see the section line formats below.
The last sharp sign (#) in a variable definition is used as leadin for a menu item of the defined user file or tree command. Example: the variable definition 'fc1=wc -l %F #Count' for the user defined file command 1 is expanded to 'wc -l filename' and in the user command file menu 'Count' is displayed behind menu item 1.

FILETYPE COMMANDS

On file screen you can execute a file or a command on it with the utree execute command (x). You are requested for parameters if the current file is executable, for a command to execute on the current file if it is not executable. For a type of file you can define so called filetype commands which are called if the current file matches a given file pattern.
Filetype commands can be set and unset at startup in the startupfile $HOME/.utree, with the commandline option -d or the filetype command (:) similar to setting and unsetting variables. Filetype commands are set with a line like 'filetype:command' (i.e. '*.c:cc -c -O'). The command (i.e. 'cc -c -O') is then executed if the current file matches the given file pattern (i.e. '*.c' for a C source file ending with '.c'). Filetype commands are unset with a line 'filetype:' (i.e. '*.c:').
When defining filetype commands some sprintf like format characters lead in by a percent sign (%) have a special meaning and are expanded before the command is executed. For further information about file patterns and the format line characters and her meaning see the sections file patterns and line formats below.

LINE FORMATS

When defining a user tree or file command or a filetype command some sprintf like format line characters are known and expanded before the command is executed. These format line characters and their meaning are:

%B or %b
    is expanded to the basename (filename without extension) of the current file or directory

%D or %d
    is expanded to the full pathname of the current directory

%F or %f
    is expanded to the filename of the current file or directory

%H or %h
    is expanded to the pathname of your home directory

%P or %p
    is expanded to the full pathname of the current file or directory

%R or %r
    is expanded to the pathname of the root directory from where utree was started

%S or %s
    is expanded to additional parameter(s) for a command which are requested before the command is executed

The command line 'command %s %f >%b.out' i.e. is expanded before execution to 'command parameters filename >basename.out' with filename of the current file or directory (%f), basename.out of the current file or directory (%b.out) and additional parameters (%s) which are requested before command execution.
For further information about tree, file and filetype commands see the sections variables and filetype commands.

FILE PATTERNS

Some commands (list, find, grep, tag or untag) require file patterns for matching files using some special (or meta) characters.
Shell like filename pattern matching interprets the following meta characters:

*   matches all characters in a filename

?   matches one character in a filename

[class]
    matches one character from a character class. A character class includes all characters enclosed between the opening and closing brackets ([ and ]). If in a class definition a minus sign (-) is found between two other characters this means the range from the character before and the character behind the minus sign. If the first character of a class definition is a exclamation mark (!) this means matching of all characters excluded those defined in the class, i.e.

[abc]
    matches the characters 'a', 'b' and 'c'

[a-z_]
    matches the characters from 'a' to 'z' and '_'

[!a-z_]
    matches all characters except 'a' to 'z' and '_'

File size pattern matching interprets the following meta characters:

=size
    matches all files of size size

!size
    matches all files not of size size

>size
    matches all files larger than size

<size
    matches all files smaller than size

Size may be specified in bytes (b, default), kilo bytes (k) or mega bytes (m), i.e. '>2k' matches all files larger than 2 kilo bytes or 2048 bytes.

The additional file time pattern matching interprets the following meta characters:

)time
    matches all files modified within time

(time
    matches all files not modified within time

Time may be specified in minutes (m), hours (h, default), days (d) or weeks (w), i.e. ')2d' matches all files modified within last 2 days.

To combine shell like filename patterns and/or additional file size and modification time patterns use

&   for ANDing of patterns

|   for ORing of patterns

If a character is preceeded by a backslash or enclosed in quotes his interpretation is suppressed and he is used as he is.

KEY BINDINGS

All defaults key bindings are listed in the section key naming conventions and default key bindings above. All supported function keys if defined in the termcap or terminfo terminal database and their default bindings are listed in the next section. Rebindings of default keys or additional bindings of other keys may be done in terminal dependent startupfiles utree-TERM in a global directory containing utree startupfiles or in files .utree-TERM in your home directory where TERM denotes the terminal type as defined in the environment variable TERM. These startup files are built from lines like 'key_sequence=utree_key' or 'key_sequence="string"'. Key_sequence describes the function key string, utree_key the utree key or function name, a string enclosed in braces a string to insert into the input buffer. A comment lead in by a sharp sign (#) should contain the name of the bound key. For defining key sequences of function keys control keys are defined with a leading caret (^, i.e. ^x, ^? means DEL) and some other special characters may be defined lead in by a backslash (\). These escaped characters and their meaning are: b backspace (^h), f formfeed (^l), n newline (^j), r return (^m), t tab (^i), e or E escape (^[ or ESC) and s space. If a backslash is followed from up to three digits this defines an octal given character. I.e. the definition '\e^O\003=END' binds the keystring <ESCAPE> <CONTROL-O> <ASCII-3> to the utree key or function END.

The simplest way to define keys is to switch to the bindings screen and there to do all bindings. You have only to hit the key to bind and terminate the key sequence with CR or NL. Therefore CR or NL or key sequences containing CR or NL cannot be bound on the bindings screen. Then you have to enter the utree name where the key is to bind to. You can use C-n and C-p to select the wanted name. At last you should give a short comment to the bound key(i.e. the key name) for documentation. If you want to bind a key for insertion of a string (and so to bind function keys to simple letter commands) you have to enter the string enclosed in braces. I.e. the binding '\eh="h"' binds the key <ESCAPE> <h> to the string <h> and the so called help. Any bindings you have done on the bindings screen are saved to a file .utree-TERM into your home directory if the variable AUTOSAVE is set.

FUNCTION KEYS

The following function keys are supported by utree and pre-bound at startup to appropriate functions if they are defined in your system's termcap or terminfo database:

CursorRight
    Move forward (FORWARD, C-f)

CursorLeft
    Move backward (BACKWARD, C-b)

CursorUp
    Move up (PREVIOUS, C-p)

CursorDown
    Move down (NEXT, C-n)

Home/Begin
    Move to beginning (BEGIN, C-a)

End Move to end (END, C-e)

NextPage/PageDown
    Move one page down (NEXTPAGE, C-v)

PrevPage/PageUp
    Move one page up (PREVPAGE, C-w)

ScrollUp
    Scroll one line up (UP, C-u)

ScrollDown
    Scroll one line down or delecte character (DOWN, C-d)

Insert
    Change to directory (>) or switch insert/overwrite mode (INSERT, C-o)

Delete
    Change to parent directory (<) or delete character under cursor like (DELETE, C-h)

Clear
    Refresh screen or input line (REFRESH, C-l)

Help
    Call the help menu (HELP, C-r)

Select
    Select and/or accept (SELECT, CR,NL)

Do/Command
    Select and/or accept (SELECT, CR,NL)

Mark
    Set a mark (SETMARK, C-@)

Enter
    Select and/or accept (SELECT, CR,NL)

This function keys may be rebound or other function keys may be bound on the bindings screen. For more information about key bindings see the section key bindings above.

ENVIRONMENT

UTREE
    Some boolean and numerical settings for utree

UTLIB
    Directory for utree help pages and startup files

HOME
    User's home directory

TERM
    Terminal type

EDITOR
    File editor

PAGER
    File pager/viewer

SHELL
    Interactive shell for shell escape

FILES

HOME/.utreelist
    Tree list file of user's filesystem

HOME/.utreehist
    History list of shell commands

HOME/.utree
    User's utree startup file containing variables and filetype commands definitions

UTLIB/utree
    Global utree startup file containing variables and filetype commands definitions

UTLIB/utree-TERM
    Global key bindings for terminal type TERM

HOME/.utree-TERM
    User's key bindings for terminal type TERM

UTLIB/utree.help
    Utree help pages

BIN/utree.backup
    Backup shell script or program

BIN/utree.mklist
    Create directory tree list shell script

BIN/utree.prlist
    Display or print a formatted tree list file

UTLIB can be a system default directory containing library files (i.e. /usr/local/lib) defined at compile time or a directory defined in the environment variable UTLIB. BIN is a public directory containing executable files (i.e. /usr/local/bin) and should be included in the command search path environment variable PATH.

SEE ALSO

utree.prlist(1L)
cp(1) grep(1) ls(1) mv(1) rm(1)
du(1) mkdir(1) rmdir(1)
find(1) sh(1)

BUGS

Changes in filesystem after shell escape or editor session are not always detected.
Directory tree depth >32 may be confusing.
Screen sizes smaller than 80x24 may be confusing.
Symbolic links to directories may be confusing.
On most BSD systems changing owner and/or group of files for normal users is not allowed.

AUTHOR

Peter Klingebiel

COPYRIGHT

© 1991/1992 Peter Klingebiel & UNIX Magazin Munich

Permission is granted to copy and distribute utree in modified or unmodified form, for noncommercial use, provided (a) this copyright notice is preserved, (b) no attempt is made to restrict redistribution of this file, and (c) this file is not distributed as part of any collection whose redistribution is restricted by a compilation copyright.