SHRINK

Section: User Commands (1)
Updated: Edinburgh University
Index Return to Main Contents
 

NAME

shrink - generate short filenames from extended ones  

SYNOPSIS

shrink [ -vnSm ] [ -sseparators ] [ -n ] filename ...  

DESCRIPTION

Shrink converts a filename to a shrunken form, suitable for transportation to another system with less generous filename length limits. It takes each filename given, and applies certain rules to shorten it, if necessary. In particular, it tries to leave suffixes unchanged, and, to a less extent, to keep the initial component as close to the original as possible. Of course, very long suffixes do have to be truncated.

The following options are recognized:

-v
Verbose mode. Normally shrink does its work silently, but under the verbose option it chats about what decisions its making.
-n
Normally the new filename is generated so as to not clash with an existing file, to prevent several long-named files folding into the same shortened form. This behaviour can be revoked by use of the -n option.
-s
Normally the new filename is printed on the standard output. The -s option causes shrink to be silent. This is useful only in conjunction with the -m option.
-m
This causes the files to be physically renamed; normally, just the ``suggested'' change is printed but nothing actually done.
-s separators
This can be used to change the set of separators that shrink recognizes. These are the characters that are used to delimit filename components. Shrink operates by shrinking characters out of each component (though it is loath to modify the first or last components unless it has no choice), while leaving the delimiters unchanged. However, if a filename contains a vast number of delimiter characters (such as this_file_contains_quite_a_lot_of_stuff_and_useful_stuff_at_that ), then some components (and their associated delimiters) will have to be deleted totally. The default delimiter set is +, -, ., _, ~ and ,.
-n
A numerical flag n may be given to specify a maximum length that the resultant filename is allowed to be. The default is 14 (which is the maximum file length under all unix systems without the Berkeley modified filesystem).
 

DIAGNOSTICS

Under the -v option, lots of diagnostics can be produced. Those preceded by the word ``warning:'' can probably be ignored.

Under certain circumstances, shrink may refuse totally to deal with some filenames, though this is not very likely to occur unless a very small maximum length flag is specified.  

BUGS

If the file begins with a delimiter character, then shrink sometimes causes the shortened filename to be shorter than it need be. This is not too serious a bug.  

AUTHOR

Simon Brown.


 

Index

NAME
SYNOPSIS
DESCRIPTION
DIAGNOSTICS
BUGS
AUTHOR

This document was created by man2html, using the manual pages.
Time: 06:29:04 GMT, December 12, 2024