Unix and Linux Discussions Tagged with rename |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
3 |
4,261 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
3,353 |
UNIX for Beginners Questions & Answers |
|
|
|
7 |
106,553 |
Shell Programming and Scripting |
|
|
|
7 |
9,594 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
16,797 |
Shell Programming and Scripting |
|
|
|
11 |
6,617 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
3,955 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
5,473 |
Shell Programming and Scripting |
|
|
|
1 |
18,698 |
Shell Programming and Scripting |
|
|
|
3 |
9,282 |
Shell Programming and Scripting |
|
|
|
14 |
10,181 |
Shell Programming and Scripting |
|
|
|
1 |
2,566 |
Shell Programming and Scripting |
|
|
|
10 |
5,044 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
2,091 |
Shell Programming and Scripting |
|
|
|
3 |
1,949 |
Shell Programming and Scripting |
|
|
|
3 |
2,750 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
4,020 |
Shell Programming and Scripting |
|
|
|
4 |
2,357 |
Programming |
|
|
|
4 |
2,149 |
Shell Programming and Scripting |
|
|
|
6 |
2,298 |
Shell Programming and Scripting |
|
|
|
4 |
6,978 |
Shell Programming and Scripting |
|
|
|
12 |
6,831 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,485 |
Shell Programming and Scripting |
|
|
|
5 |
3,881 |
Shell Programming and Scripting |
|
|
|
17 |
5,014 |
Shell Programming and Scripting |
|
|
|
7 |
2,777 |
Shell Programming and Scripting |
|
|
|
8 |
9,227 |
Shell Programming and Scripting |
|
|
|
1 |
7,403 |
Shell Programming and Scripting |
|
|
|
15 |
26,749 |
Shell Programming and Scripting |
|
|
|
4 |
8,110 |
UNIX for Dummies Questions & Answers |
|
|
|
1 |
2,224 |
UNIX for Dummies Questions & Answers |
|
|
|
5 |
7,228 |
UNIX for Dummies Questions & Answers |
|
|
|
2 |
27,561 |
UNIX for Dummies Questions & Answers |
|
|
|
7 |
11,648 |
UNIX for Dummies Questions & Answers |
|
|
|
8 |
5,926 |
Shell Programming and Scripting |
|
|
|
2 |
4,948 |
Shell Programming and Scripting |
|
|
|
4 |
5,792 |
UNIX for Dummies Questions & Answers |
|
|
|
3 |
13,166 |
Shell Programming and Scripting |
|
|
|
0 |
2,818 |
UNIX for Dummies Questions & Answers |
|
|
|
4 |
5,105 |
UNIX for Dummies Questions & Answers |
RENAME(1) User Commands RENAME(1)
NAME
rename - rename files
SYNOPSIS
rename [options] expression replacement file...
DESCRIPTION
rename will rename the specified files by replacing the first occurrence of expression in their name by replacement.
OPTIONS
-v, --verbose
Give visual feedback which files where renamed, if any.
-V, --version
Display version information and exit.
-s, --symlink
Peform rename on symlink target
-h, --help
Display help text and exit.
EXAMPLES
Given the files foo1, ..., foo9, foo10, ..., foo278, the commands
rename foo foo0 foo?
rename foo foo0 foo??
will turn them into foo001, ..., foo009, foo010, ..., foo278. And
rename .htm .html *.htm
will fix the extension of your html files.
WARNING
The renaming has no safeguards. If the user has permission to rewrite file names, the command will perform the action without any ques-
tions. For example, the result can be quite drastic when the command is run as root in the /lib directory. Always make a backup before
running the command, unless you truly know what you are doing.
SEE ALSO
mmv(1), mv(1)
AVAILABILITY
The rename command is part of the util-linux package and is available from ftp://ftp.kernel.org/pub/linux/utils/util-linux/.
util-linux June 2011 RENAME(1)