uit(1)

NAME
uit - UNIX Interactive Tools version 4.3.1

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

NOTE
The main configuration file of the UIT 4.3.1 package is .uitrc.TERM where TERM is the value of the environment variable 'TERM' e.g for Linux console your environment contains something like 'TERM=console' so the configuration file name is .uitrc.console. You can (and should) have a configuration file for each terminal type you use.

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. Running uitps it is self explanatory. Use the arrows, PageUp, PageDown, Home, End, ^Y, ^B, ^Ku, ^Kv to move in the list, ^R to refresh it and F10 or ^C to leave. You can change these keys, just read the sections [UITPS-Setup], [UITPS-Color], [UITPS-Monochrome] and [UITPS-Keys] in the configuration file .uitrc.TERM. See also CONFIGURATION FILES. uitview is an hex/ascii file viewer. Too simple to need a separate manual page. Use the arrows, PageUp, PageDown, Home, End, ^Y, ^B, ^Ku, ^Kv to move in the file, ^R to refresh the screen and F10 or ^C to leave. You can change those keys, just read the sections [UITVIEW-Setup], [UITVIEW-Color], [UITVIEW-Monochrome] and [UITVIEW-Keys] in the configuration file .uitrc.TERM. See also CONFIGURATION FILES.

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 512 commands in the history list. UIT uses the GNU history library for that. See also BUILT-IN COMMANDS.

WARNINGS AND ERRORS REPORTING
Under the command line there is a status bar. 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 is one configuration file per terminal type in uit/uitps/uitview. The configuration file(s) resides in the user's home directory or (the default versions) in the directory $(prefix)/lib (usually /usr/local/lib). The generic name is .uitrc.TERM. UIT 4.3.1 allows each terminal type to have its own configuration file (TERM is the value of the 'TERM' environment variable (e.g vt102). For the Linux console the configuration file is .uitrc.console). If you have compiled the UIT package with USE_TERMCAP and your system has a huge termcap database (/etc/termcap), you can copy the termcap definition(s) of your terminal(s) in a file ($HOME/.termcap e.g.). After that, set your TERMCAP environment variable to point to it. You should add something like this to your .profile: TERMCAP=/home/mike/.termcap uit/uitps/uitview can run without such a file, but on systems with huge termcap databases, copying the definitions of the most used terminals in a local .termcap will result in uit/uitps/uitview starting faster. uit/uitps/uitview doesn't use termcap key definitions. You must define the keys you want directly in the .uit.TERM file in [UITxxx-Keys] sections. If you have compiled the UIT package with USE_TERMINFO, or on your system the termcap database is emulated using the terminfo library (like in the HP-UX system), don't bother about speed. See also the sections [UITxxx-Keys]. The configuration file .uitrc.TERM is the file searched by uit/uitps/uitview each time they are started, in order to configure themselves. .uitrc.TERM it is first searched in the home directory then, if not found, in the directory $(prefix)/lib (usually /usr/local/lib). 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 '#' are ignored and if you comment a section name, the whole section is ignored. The default configuration file .uitrc.TERM 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. 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. AnsiColorSequences
 - this variable should be set to ON if the terminal supports standard ANSI color sequences. Otherwise it should be OFF. If AnsiColorSequences is ON, [UITxxx-Color] sections will be used in the configuration files .uitrc.TERM. Otherwise, uit/uitps/uitview will use the [UITxxx-Monochrome] sections. 2. [UIT-Setup] In this section the variables have only one field. a. StartupFileDisplayMode
 - this variable specifies the file specific information 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. StartupFileSortMethod
 - this variable specifies the startup sort method. It can be any of Name , Extension , Size , Date , Mode , OwnerId , GroupId , OwnerName or GroupName.
 - this value initially affects both panels but it can be changed separately afterwards. c. StartupLeftPanelPath
d. StartupRightPanelPath
 - those variables specifies the startup path for each panel. e. HistoryFile
 - this variable specifies the history file name. The default value is ~/.uithistory. f. NormalModeHelp
g. CommandLineModeHelp
 - those variables describe the status bar contents for each uit mode when no errors occurred (uit is idle). uit can display on the status bar a help string and/or some system information (system type, hostname, machine type and the current date) using escape characters (s, h, m or d preceded by backslash):
s -> the system type
h -> the host name
m -> the machine type
d -> the current date
See also <ShowTty>. h. InfoDisplay
 - if this variable is OFF, auxiliary file informations are not displayed. This can be useful if you are using a very slow terminal. i. FrameDisplay
 - if this variable is OFF, the uit frame is not displayed. This can be useful if you are using a very slow terminal. j. LeadingDotMatch
 - if this variable is OFF, when matching files for <FilePatternSelect> / <FilePatternUnselect> then the leading '.' in the file name is matched only explicitly. 3. [UITPS-Setup] In this section the variables have only one field. a. UitPsModeHelp
 - this variable describe the uitps status bar contents. 4. [UITVIEW-Setup] In this section the variables have only one field. a. UitViewModeHelp
 - this variable describe the uitview status bar contents. 5. [UITxxx-Color] / [UITxxx-Monochrome] In this sections the variables have only one field. These sections permits you to customize the colors of uit, uitps and uitview. Reading the .uitrc.TERM configuration file should be self explanatory. See also the [Setup] section. 6. [UIT-Keys] This section describes the actions uit takes when a specified key is pressed. In this section a variable can have up to 6 fields separated by ';'. Each line in this section looks like: key_sequence = 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_sequence
 - key_sequence is the key sequence associated with the given command. You can use any key sequence wich doesn't start with an ascii character (0x20 to 0x7e). You can specify the ESC character as ^[ , the ^ character as ^^ and space as ^@ . Ascii characters are used by the command line. 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_sequence). If it is not, no action will be taken when pressing key_sequence. 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. <FileDisplayNextMode>
 - switches to the next file display mode. <FileDisplayOwnerGroup>
 - displays the file owner & group. <FileDisplayDateTime>
 - displays the file date & time. <FileDisplaySize>
 - displays the file size. <FileDisplayMode>
 - displays the file mode. <FileDisplayFullName>
 - displays the full file name (if possible). <FileSortNextMethod>
 - switches to the next sort method. <FileSortByName>
 - sorts the files by extension. <FileSortByExtension>
 - sorts the files by name. <FileSortBySize>
 - sorts the files by size. <FileSortByDate>
 - sorts the files by date. <FileSortByMode>
 - sorts the files by mode. <FileSortByOwnerId>
 - sorts the files by owner id. <FileSortByGroupId>
 - sorts the files by group id. <FileSortByOwnerName>
 - sorts the files by owner name. <FileSortByGroupName>
 - sorts the files by group name. <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. <ChangeDir>
 - changes the current directory to a user specified directory. <HardRefresh>
 - forces a screen refresh. <FilePatternSelect>
 - selects files matching a given pattern. <FilePatternUnselect>
 - unselects files matching a given pattern. <DeleteCmdLnWord>
 - deletes the last command line word. <ConformCurrentDir>
 - the other panel current directory will become the current directory of the current panel. <ConformOtherDir>
 - the current directory of the current panel will become the current directory of the other panel. <CopyPathToCmdLn>
 - copy the other panel path to the command line. <CopySelectedFilesToCmdLn>
 - copy all the current panel selected file names to the command line. 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' can 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.
 - %i
uit will always replace %i in the formatted_command with all the current panel selected file names.
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. The character ~ used at the begining of the new_dir field is replaced by the user's home directory. e. save_screen
 - this field is an character (usually 'y' or 'n') who tells uit to save ('y') or not to save ('n') 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 'y'. 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 'n'. 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 'y', 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 'n'. The default configuration file $HOME/.uitrc.TERM 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. 7. [UITPS-Keys] This section describes the actions uitps takes when a specified key is pressed. In this sections the variables have only one field. Only built-in operations are available in uitps. Each line in this section looks like: key_sequence = built_in_command_name a. key_sequence
 - key_sequence is the key sequence associated with the given command. You can use any key sequence wich doesn't start with an ascii character (0x20 to 0x7e). You can specify the ESC character as ^[ , the ^ character as ^^ and space as ^@ . b. built_in_command_name
 - built_in_command_name is the name of the built-in operation to run when key_sequence is pressed. The built-in operations are: - <CursorUp> - moves to the previous process in the processes list
- <CursorDown> - moves to the next process in the processes list
- <PageUp> - moves one page up in the processes list
- <PageDown> - moves one page down in the processes list
- <Home> - moves to the first process in the processes list
- <End> - moves to the last process in the processes list
- <NextSignal> - sets the next signal in the signals list as the current signal
- <SIGHUP>
- <SIGINT>
- <SIGQUIT>
- <SIGILL>
- <SIGFPE>
- <SIGKILL>
- <SIGUSR1>
- <SIGSEGV>
- <SIGUSR2>
- <SIGPIPE>
- <SIGALRM>
- <SIGTERM>
- <SIGCHLD>
- <SIGCONT> - sets the SIG... signal as the current signal
- <KillProcess> - sends the current signal to the current process
- <Refresh> - refresh the processes list by re-calling ps(1)
- <HardRefresh> - force the screen refresh the screen by re-calling ps(1) and invalidating the terminal cache.
- <Exit> - exits 8. [UITVIEW-Keys] This section describes the actions uitview takes when a specified key is pressed. In this sections the variables have only one field. Only built-in operations are available in uitview. Each line in this section looks like: key_sequence = built_in_command_name a. key_sequence
 - key_sequence is the key sequence associated with the given command. You can use any key sequence wich doesn't start with an ascii character (0x20 to 0x7e). You can specify the ESC character as ^[ , the ^ character as ^^ and space as ^@ . b. built_in_command_name
 - built_in_command_name is the name of the built-in operation to run when key_sequence is pressed. The built-in operations are: - <CursorUp> - moves to the previous line (16 bytes) in the file
- <CursorDown> - moves to the next line (16 bytes) in the file
- <PageUp> - moves one page up (0x100 bytes) in the file
- <PageDown> - moves one page down (0x100 bytes) in the file
- <Home> - moves to the beginning of the file
- <End> - moves to the end of the file
- <Refresh> - refresh the screen by re-reading the file
- <HardRefresh> - force the screen refresh the screen by re-reading the file and invalidating the terminal cache.
- <Exit> - exits

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

LIMITATIONS
1. 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. 2. No command line editing is provided. You can only modify the contents of the command line by appending new characters, deleting them with backspace or ^H , or deleting the last word with the key sequence associated with <DeleteCmdLnWord>. You can also insert the current file name into the command line using the key sequence associated with <CopyFileToCmdLn> and the other panel path using the key sequence associated with <CopyPathToCmdLn>. 3. 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.TERM file correctly configured. .uitrc.TERM should be configured with ColorMonitor = OFF. If you are working on a serial b/w tty, LinuxConsole should be OFF too. 4. Only POSIX terminals are supported. 5. Job support is implemented only in uit. 6. Due to the fact that the ';' character is used as a field separator in the configuration files, you can't write something like that in the .uitrc.TERM files: ^AAA = SHOW-USERS-AND-GROUPS; more /etc/passwd; more /etc/group because 'more /etc/group' will be considered as a directory to switch to. You must write a small script instead: #!/bin/sh
more /etc/passwd; more /etc/group Supposing the script name is 'show_ug' , the .uitrc.TERM line will be like that: ^AAA = SHOW-USERS-AND-GROUPS; show_ug

BUGS
None so far. :-) Please send bug reports to tudor@ulise.cs.pub.ro or to tudor@habarnam.cs.pub.ro.

SEE ALSO
termcap(5) terminfo(5) sh(1) ps(1) mount(8) umount(8) uitaction(1) uitmount(1) uitmatch(1) uitcmp(1) uitkeys(1)

FILES
/usr/local/bin/uit
/usr/local/bin/uitps
/usr/local/bin/uitview
/usr/local/man/man1/uit.1
/usr/local/man/man1/uitps.1
/usr/local/man/man1/uitview.1
/usr/local/info/uit.info
/usr/local/lib/.uitrc.console
/usr/local/lib/.uitrc.xterm
/usr/local/lib/.uitrc.vt100
/usr/local/lib/.uitrc.vt102
$HOME/.uitrc.console
$HOME/.uitrc.xterm
$HOME/.uitrc.vt100
$HOME/.uitrc.vt102

AUTHORS
Tudor Hulubei
- tudor@ulise.cs.pub.ro, tudor@habarnam.cs.pub.ro
Andrei Pitis
- pink@ulise.cs.pub.ro, pink@habarnam.cs.pub.ro
Politechnic University of Bucharest
Romania