Rename

Introduction

  • A command on ubuntu to deal with files.

Description

Usage:
    rename [ -h|-m|-V ] [ -v ] [ -n ] [ -f ] [ -e|-E perlexpr]*|perlexpr
    [ files ]

Options:
    -v, -verbose
            Verbose: print names of files successfully renamed.

    -n, -nono
            No action: print names of files to be renamed, but don't rename.

    -f, -force
            Over write: allow existing files to be over-written.

    -h, -help
            Help: print SYNOPSIS and OPTIONS.

    -m, -man
            Manual: print manual page.

    -V, -version
            Version: show version number.

    -e      Expression: code to act on files name.

            May be repeated to build up code (like "perl -e"). If no -e, the
            first argument is used as code.

    -E      Statement: code to act on files name, as -e but terminated by
            ';'.

Example

-> ls   1.txt 2.txt 3.txt
rename 's/\.txt/\.m/' *       # replace the postfix with another
rename 's/^/prefix-/' *		  # add a prefix to the filename
rename 's/$/\.postfix/' *      # add a postfix to the filename   
rename 's/\.txt//' *          # delete the postfix
rename 's/[]//g' *         # delete the space on the filename
rename 's/[()]//g' *         # delete the parentheses on the filename
rename 'y/A-Z/a-z/' *        # translate the capital letter to the lowercase letter
recent article

Emacs on Debian

Introduction A txt editor for debian system.Commandsudo apt-get install software-properties-commonsudo apt-get update sudo apt-get install gnupg2 # gnupg, gnupg1, gnupg2wget -q http://emacs.ganneff.de/apt.key -O- | sudo apt-key addsudo add-a...…

tools emacs debian blogread
previous article

Language Tools

Introduction A language tool for TexSutdio.Software AddressTexStudioJavaEnglish DictionaryLanguage ToolsEnvironment– Java installjava -versionjavac -version– LanguageTools installjava -jar languagetool.jarclick ‘Text Checking’ -> options ->...…

tool spell grammar blogread