uit(1)

NAME
uit - UNIX Interactive Tools version 4.1c

SYNTAX
uit
uitps [ps(1) like parameters]
uitview filename
uitcmp file1 file2

DESCRIPTION
uit is a file system browser with some shell facilities which was designed to make your work much easier and much efficient. uitps is an interactive process viewer/killer. It calls internally the ps(1) utility so that's the reason why uitps parameters are in fact ps(1) ones. No more manual is provided for uitps because running it is self explanatory. Use the arrows, PageUp, PageDown, Home, End, ^y, ^b, ^ku, ^kv, + and - to move in the list, r to refresh it and F10 or ^C to leave. uitview is a hex/ascii file viewer. Too simple to need a manual page. Use the arrows, PageUp, PageDown, Home, End, ^y, ^b, ^ku, ^kv, + and - to move in the file, r to refresh the screen and F10 or ^C to leave. uitcmp is a file compare utility. It outputs to stderr, uit catching its error messages this way. uitcmp was designed to be used in $HOME/.uitrc (uit configuration file) and should not be used as a stand alone program.

FILE-SYSTEM BROWSER
uit is made of two panels. The left one and the right one. Each one contains a file system directory. You can browse the directory tree with the usual cursor keys and pressing ENTER when you want to enter or leave a directory. You may change the panels by pressing TAB. See also BUILT-IN COMMANDS.

COMMAND LINE
Under the two panels there is a shell like command line which you can use to type normal shell commands. The command line supports up to 256 characters and 32 commands in the history list. See also BUILT-IN COMMANDS.

WARNINGS AND ERRORS REPORTING
There is a status bar under the command line. You can see there the status of the currently executed command, the warnings and errors and you will be prompted if a decision has to be taken.

CONFIGURATION FILES
There are two configuration files in uit/uitps : .uitrc and .uittermcap. Their place is in the user's HOME directory, but uit (and uitps) can work without them (except if you are connected to a Linux system with a serial b/w tty; see BUGS below). I don't recommend working without the .uitrc configuration file since it contains very useful key definitions.
The .uittermcap is a local termcap database, which allows uit/uitps to find very fast the termcap description of the terminal specified in the TERM environment variable. You can copy your terminal description from /etc/termcap and put it in the .uittermcap because /etc/termcap is ussualy a very large and hard to search file. uit uses .uittermcap to find a terminal description *BEFORE* trying to read /etc/termcap. If .uittermcap is found in the user's HOME directory, /etc/termcap will be ignored. The main advantage of the .uittermcap file is that it allows faster access and can be modified without special permission. You can use only one of .uittermcap and /etc/termcap at a time. Take care: if you are using .uittermcap and your terminal description can't be found there, uit will fail because the /etc/termcap database won't be searched. See also BUGS. The configuration file .uitrc is the file uit searches each time it is started, trying to configure itself reading it. uit searches it in the home directory and the current directory. If this file can't be found, uit will use the defaults. The configuration file is structured on sections, each section containing variables in the following format:
variable_name = first_field;second_field; ...
After the variable_name at least one space or tab is required. All characters after a '#' will be ignored and if you comment a section name, the whole section will be ignored. The configuration file contains the following sections: 1. [Setup] In this section the variables have only one field. a. TempDirectory
 - this variable specifies the location of the temporary files created by uit. b. LinuxConsole
 - this variable should be set to ON on Linux systems if you are working on a Linux virtual tty. If you are connected to a Linux system with a serial b/w tty, you should set this to OFF. LinuxConsole is meaningless if uit was compiled without 'HAVE_LINUX'. c. ColorMonitor
 - this variable should be set to ON on Linux systems if you are working on a Linux virtual tty and you have a color monitor. If your monitor is monochrome, you should set this to OFF. ColorMonitor is meaningless if uit was compiled without 'HAVE_LINUX' or LinuxConsole is OFF. If LinuxConsole and ColorMonitor are both ON, [UITxxx-Color] sections will be used in the configuration file .uitrc. Otherwise, uit will use the [UITxxx-Monochrome] sections. The discussion above applies to both uit and uitps utilities. 2. [UIT-Setup] In this section the variables have only one field. a. StartupFileDisplayMode
 - this variable specifies the file specific information that will be displayed at startup. It can be any of OwnerGroup , DateTime , Size , Mode or FullName.
 - this value initially affects both panels but it can be changed separately afterwards. b. StartupLeftPanelPath
c. StartupRightPanelPath
 - those variables specifies the startup path for each panel. d. NormalModeHelp
e. CommandLineModeHelp
 - those variables describe the status bar contents for each uit mode when no errors occurred. See also <ShowTty>. f. InfoDisplay
 - if this variable is OFF, auxiliary file informations will not be displayed. This can be useful if you are using a very slow terminal. g. FrameDisplay
 - if this variable is OFF, the uit frame will not be displayed. This can be useful if you are using a very slow terminal. 2. [UITxxx-Color] / [UITxxx-Monochrome] In this sections the variables have only one field. These sections permits you to customize the colors of uit and uitps. Reading the .uitrc configuration file should be self explanatory. See also the [Setup] section. 3. [Keys] This section describes the actions uit takes when a specified key is pressed. In this section a variable could have up to 6 fields separated by ';'. Each line in this section will look like: key_name = command_name;formatted_command;new_dir;
save_screen;pause;hide WARNING : you can't continue the variable fields description on the next line. a. key_name
 - key_name is the name of the key associated with the given command. Only the keys listed in the configuration file can be used. b. command_name
 - command_name is a command generic name. Even if it is not always used, the command_name must be present (if a command is associated with key_name). If it is not, no action will be taken when pressing key_name. There are two types of commands in uit : built-in commands and user defined commands. Built-in commands are specified between <> (<Copy>, <RenameMove>, <MkDir> etc) and if the command_name section contains a built-in command specification, the other fields are ignored. The BUILT-IN COMMANDS are: <Copy>
 - copies files from one panel to another. <RenameMove>
 - moves files from one panel to another. <MkDir>
 - makes directories. <Delete>
 - deletes files and empty directories. <Exit>
 - exits uit. <HistoryBack>
 - copies to the command line the previous command in the history list. <ShowTty>
 - switches between the two uit modes (starting with Linux 0.99.12 this option is completely used only if you are super user because normal users can't do a screen dump). <Refresh>
 - refreshes the contents of the current panel. <GotoRoot>
 - changes the current directory to root. <SwitchPanels>
 - switches the left panel with the right one. <HistoryNext>
 - copies the next command in the history list to the command line. <FileDisplayMode>
 - changes the file display mode. <DeleteCmdLn>
 - deletes the command line contents. <FileSelect>
 - selects/unselects files. All the files can be selected by pressing '+' (and ENTER) or unselected by pressing '-'. By pressing '*' selected files becomes unselected and unselected files becomes selected. <CopyFileToCmdLn>
 - copies to the command line the current file name . <Home>
 - puts the cursor onto the first entry in the current directory list. <End>
 - puts the cursor onto the last entry in the current directory list. <PageUp>
 - puts the cursor up one page in the current directory file list. <PageDown>
 - puts the cursor down one page in the current directory file list. <CursorLeft>
 - acts like <PageUp>. <CursorRight>
 - acts like <PageDown>. <CursorUp>
 - puts the cursor up one entry in the current directory file list. <CursorDown>
 - puts the cursor down one entry in the current directory file list. <ChangePanel>
 - puts the cursor in the other panel. c. formatted_command
 - formatted_command is a shell command which can contain some scanf like format specifiers. With their help you can get the current directory entry name (the directory entry under the cursor), owner, group and mode. These are the available format specifiers:
 - %s{question,default_answer}
When uit encounters a %s in the formatted_command asks the user the question 'question' whose default answer is 'default_answer' and replaces the %s{ , } with the user answer. Both 'question' and 'default_answer' could contain any other format specifiers except %s. WARNING : no spaces between %s and '{'.
 - %f
uit will replace %f with the current directory entry name only if it is a file (not a directory).
 - %d
uit will replace %d with the current directory entry name only if it is a directory (not a file).
 - %l
uit will replace %l with the current directory entry name only if it is a symbolic link.
 - %t
uit will replace %t with the current directory entry name only if it is a named pipe.
 - %z
uit will replace %z with the current directory entry name only if it is a socket.
 - %a
uit will always replace %a with the current directory entry name.
 - %m
uit will always replace %m in the formatted_command with the current file mode.
 - %g
uit will always replace %g in the formatted_command with the current file group.
 - %o
uit will always replace %o in the formatted_command with the current file owner.
 - %p
uit will always replace %p in the formatted_command with the current panel path.
 - %b
uit will always replace %b in the formatted_command with the current panel directory name.
Using uppercase format specifiers you will be able to access the other panel path, file and directory names. d. new_dir
 - if the formatted_command successfully exits (exit code = 0) and this field is present then new_dir will become the current panel directory. e. save_screen
 - this field is an integer (usually 0 or 1) who tells uit to save (1) or not to save (0) the terminal screen after executing the formatted_command. Saving the screen is not necessary while editing or viewing a file because the information left after the editor or the viewer exits is not important. Saving the screen means that that screen will be restored before the execution of the next command. This field is used only if you are super user under Linux and you are working on a virtual console. By default this field is 1. f. pause
 - for some commands you may wish to read their results    before
repainting the panels. If this field is present uit will wait for a key to be pressed before restoring the panels. By default this field is 0. g. hide
 - there are some commands that aren't displaying any useful information if successfully complete their execution: mount, chmod, chown, chgrp, sync ... and if an error occurs then a line or two are sended to
stderr.    If this option is 1, the stdout and stderr
will be redirected to some files (stdout.pid and stderr.pid , where pid is uit pid) and only if the command exit code is not 0, the stderr.pid file will be displayed, line by line, onto the status bar. This way the panels will not be deleted and then repainted and the command appears to be built-in. stdout.pid and stderr.pid are created in the TempDirectory specified in the [Setup] section. By default this field is 0. The default configuration file $HOME/.uitrc supports most of the usual commands. To find out more about them please read it. uit allows you to change both the utility used to perform a particular operation (using compress instead of gzip :-) ) and the key associated with it. There is also possible to remove/add new commands.

CANCELING OPERATIONS
Built-in cyclic operations can be stopped by pressing ^C.
uit can be suspended by pressing ^Z.

MOUSE SUPPORT
uit doesn't use the mouse, but, if you are running Linux, you can use the selection utility to get characters form screen and insert them in the terminal keyboard queue.

MINUSES
1. Files can't be moved from a file system to another. You have to copy then delete them instead. Before trying to make a link from the destination file to the source file, uit deletes the destination file (if existent), so take care not to lose some data trying to move files in a wrong way. 2. Background execution is not fully supported. That means you may specify an & terminated command line in the configuration file but the result of the background executed command (stdout and stderr redirection, as explained before) will be overwritten by the result of newer commands and, if an error occurs, you will not see it. 3. No command line editing is provided. You can only modify the contents of the command line by appending new characters or deleting them with backspace. 4. When uit is compiled for Linux, the default built-in color descriptions are for color monitors, so you can't (decently) run uit on a b/w monitor without the .uitrc file. .uitrc should be configured with ColorMonitor = OFF. If you are working on a serial b/w tty, LinuxConsole should be OFF too. 5. Only POSIX terminals are supported. 6. No terminfo support is provided. No problems, you can use the .uittermcap file to get termcap support.

BUGS
1. ku, kd, kr and kl terminal capabilities for vt100 family sends ESC ] A , ESC ] B , ESC ] C and ESC ] D (normal mode). Every /etc/termcap I saw defines these capabilities as ESC O A , ESC O B , ESC O C and ESC O D (application mode). This is not a very big problem because you can copy the vt100 termcap description in the .uittermcap file and modify it to suit your terminal key codes. 2. Only the ANSI 'cm' terminal capability is supported. So, if your cm capability is not ESC [%i%d;%dH, uit won't work. In order to make uit work with a different cm definition a small modification is required in tty.c ( tty_cursormove(int, int)) to suit your 'cm' definition. Please send bug reports to tudor@ulise.cs.pub.ro

SEE ALSO
termcap(5) ps(1)

FILES
/usr/bin/uit
/usr/bin/uitps
/usr/bin/uitview
/usr/bin/uitcmp
/usr/man/man1/uit.1
$HOME/.uitrc
$HOME/.uittermcap

AUTHORS
Tudor Hulubei
Andrei Pitis
Politechnic University of Bucharest
Romania