Annotated edit history of
rename(1) version 1, including all changes.
View license author blame.
Rev |
Author |
# |
Line |
1 |
perry |
1 |
RENAME |
|
|
2 |
!!!RENAME |
|
|
3 |
NAME |
|
|
4 |
SYNOPSIS |
|
|
5 |
DESCRIPTION |
|
|
6 |
OPTIONS |
|
|
7 |
ENVIRONMENT |
|
|
8 |
AUTHOR |
|
|
9 |
SEE ALSO |
|
|
10 |
DIAGNOSTICS |
|
|
11 |
BUGS |
|
|
12 |
---- |
|
|
13 |
!!NAME |
|
|
14 |
|
|
|
15 |
|
|
|
16 |
rename - renames multiple files |
|
|
17 |
!!SYNOPSIS |
|
|
18 |
|
|
|
19 |
|
|
|
20 |
__rename__ [[ __-v__ ] ''perlexpr'' [[ ''files'' |
|
|
21 |
] |
|
|
22 |
!!DESCRIPTION |
|
|
23 |
|
|
|
24 |
|
|
|
25 |
rename renames the filenames supplied according to |
|
|
26 |
the rule specified as the first argument. The |
|
|
27 |
''perlexpr'' argument is a Perl expression which is |
|
|
28 |
expected to modify the $_ string in Perl for at |
|
|
29 |
least some of the filenames specified. If a given filename |
|
|
30 |
is not modified by the expression, it will not be renamed. |
|
|
31 |
If no filenames are given on the command line, filenames |
|
|
32 |
will be read via standard input. |
|
|
33 |
|
|
|
34 |
|
|
|
35 |
For example, to rename all files matching *.bak to |
|
|
36 |
strip the extension, you might say |
|
|
37 |
|
|
|
38 |
|
|
|
39 |
rename 's/e.bak$//' *.bak |
|
|
40 |
To translate uppercase names to lower, you'd use |
|
|
41 |
|
|
|
42 |
|
|
|
43 |
rename 'y/A-Z/a-z/' * |
|
|
44 |
!!OPTIONS |
|
|
45 |
|
|
|
46 |
|
|
|
47 |
__-v__ |
|
|
48 |
|
|
|
49 |
|
|
|
50 |
Verbose: print names of files successfully |
|
|
51 |
renamed. |
|
|
52 |
!!ENVIRONMENT |
|
|
53 |
|
|
|
54 |
|
|
|
55 |
No environment variables are used. |
|
|
56 |
!!AUTHOR |
|
|
57 |
|
|
|
58 |
|
|
|
59 |
Larry Wall |
|
|
60 |
!!SEE ALSO |
|
|
61 |
|
|
|
62 |
|
|
|
63 |
mv(1), perl(1) |
|
|
64 |
!!DIAGNOSTICS |
|
|
65 |
|
|
|
66 |
|
|
|
67 |
If you give an invalid Perl expression you'll get a syntax |
|
|
68 |
error. |
|
|
69 |
!!BUGS |
|
|
70 |
|
|
|
71 |
|
|
|
72 |
The original rename did not check for the existence |
|
|
73 |
of target filenames, so had to be used with care. I hope |
|
|
74 |
I've fixed that (Robin Barker). |
|
|
75 |
---- |
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.