"Fossies" - the Fresh Open Source Software Archive

Member "rename-1.3/README" (6 May 2002, 2095 Bytes) of package /linux/privat/old/rename-1.3.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 
    2 Rename 1.2
    3 ----------
    4 
    5 Rename is a file rename tool. It can upcase, lowcase filenames and can
    6 substitute substrings in filenames. Rename is written in C so it's quicker
    7 than most other renamers written in script, especially when changing large 
    8 numbers of filenames. Rename supports regular expression for matching and
    9 replacing substrings. Its power depends on the user's familiarity of it.
   10 But that's never mind if you know little about regular expression. Even
   11 the simplest string substitution works very well. As an additional function,
   12 rename can handle subdirectories recursive and change file's owner, the 
   13 latter could individually use.
   14 
   15 
   16 Install
   17 ------
   18 
   19 Download rename distribution then unpack it with tar -zxf:
   20 
   21     ./configure
   22     make
   23     make install
   24 
   25 
   26 BUGS reporting
   27 --------------
   28 
   29 Please report bugs to <xuming@bigfoot.com>
   30 
   31 
   32 Examples
   33 --------
   34 
   35 rename foo food
   36   Change file 'foo' to 'food', just like mv(1) does.
   37 
   38 rename -lR *
   39   To lowcase all filenames, directories and filenames and directories
   40   under subdirectories.
   41 
   42 rename -s/abc/xyz/gi *.c
   43   Substitute all 'abc' substrings appeared in C  sources  files  with
   44   'xyz', ignoring case.
   45 
   46 rename -vs/.c/.cpp/s *.c
   47   Change  C sources suffix to C++ sources suffix, with verbose information.
   48 
   49 rename -s/abc/12345/bi *
   50   Find the last occurrence of 'abc'  and  replace  it  with  '12345',
   51   ignoring case.
   52 
   53 rename -o guest -R /home/custom
   54   change the owner of the file '/home/custom' to 'guest'. The 'guest' should
   55   be an effective user in the current system. If '/home/custom' is a directory,
   56   all files in this directory tree will hand to 'guest'.
   57 
   58 rename -s/^[A-Z].*file/nofile/r *
   59   The target substring starts with a capital letter, and ends with string 
   60   'file'. There are 0 or any numbers of characters between the capital letter
   61   and 'file'. The substring, if encountered in filenames, will be replaced
   62   with 'nofile'.
   63   
   64 rename -s/^[A-Z].+file/nofile/eg *
   65   Similar to last example, except it uses extended regular expression, such as
   66   the '+' metacharacter, and replaces all matching strings with 'nofile'.
   67 
   68