rename

… is an easy to use and powerful tool, it can be used to replace part of file name (string1) with some other string. Something one can also do with some “sed” hack, but this tool is much easier to use, especially for beginners. You can get all information needed from “rename –help” (here from Linux Mint): rename --help 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 ';'. I did use this tool rename some files that contained the string “www”, which I had to replace with “web”, lets say there were files named like this: ...

29. April 2019 · 2 Minuten · utzer