Skip to main content

Questions tagged [rename]

The rename tag refers to the action of giving a different name to either an existing file or to a copy of a file as part of some other operations (.e.g. remote copy, backup). Use this tag as well for questions related to the (perl) rename command.

4 votes
3 answers
539 views

In this answer, the command rename -n 'our $i; s/_.*/sprintf("_%03d.png", $i++)/e' *.png is used to rename the files abc_128390.png abc_138493.png abc_159084.png ... to abc_001.png abc_002....
Andrei's user avatar
  • 51
6 votes
2 answers
329 views

I have hundreds of folders in the following format Foldername45_12345 I'd like to recursively rename them so they are in this format Foldername45 I've been manually doing this over sftp but would ...
Jaryn Clouatre's user avatar
3 votes
2 answers
313 views

I need to rename a part of a Java JAR file and I need to keep the version numbers in the filename: Original file: hello-service-0.1.0.jar Expected file: hello-my-service-0.1.0.jar The following ...
zappee's user avatar
  • 333
1 vote
0 answers
108 views

The other day something started going wrong with the perl rename terminal command that was pre-installed on my system; which is Ubuntu 22.04.5 LTS. When I try to use any version of the rename command ...
Danae Stephens's user avatar
0 votes
5 answers
226 views

In Linux in a directory there are files, ls -1 shows me this output : file1.1-rvr file1.2-rvr file1.3 file1.4-rvr file1.5 file1.6-rvr file2.1 file2.2 file3.1 file3.10 file3.2-rvr file3.3-rvr file3.4 ...
Banana's user avatar
  • 241
0 votes
1 answer
59 views

I'm using ubuntu linux and have huge folders of .pdf or .odt even sometimes .zip (or sometimes other formats however the first two are the most common). To access them through the command shell easily ...
Alberto's user avatar
5 votes
6 answers
2k views

Try to run this mv -- "foldername...__" "foldername..." This will move folder foldername...__ under the folder foldername... instead of renaming it. Why? Note that foldername... ...
Estatistics's user avatar
8 votes
4 answers
2k views

Here is a script to fix broken Cyrillic filenames if the files were moved to Mac from Windows (based on an answer to Revert filenames after they were garbled by using different encoding) #!/bin/zsh # ...
jsx97's user avatar
  • 1,397
1 vote
3 answers
116 views

Is there some simple way to duplicate both .cpp and .h files (or any multitude of extensions) simultaneously in bash, instead of: cp foo.cpp bar.cpp cp foo.h bar.h I'm not looking for shell script ...
BrandonL's user avatar
  • 180
0 votes
1 answer
85 views

Imagine I want to move (rename) a directory tree /var/lib/postgres/data to /var/lib/postgres/data.old: /var/lib/postgres └── data ├── base │   ├── 16390 │   │   └── <...> │   └── ...
intelfx's user avatar
  • 5,759
0 votes
0 answers
72 views

Before my last system upgrade, I enjoyed the functionality of renaming multiple files in the system GUI file manager (I use Marco in MATE). This is also called "bulk rename", e.g. here. ...
Fabio's user avatar
  • 565
3 votes
1 answer
285 views

I'm standardizing the name of several files at once, so I wrote a regex for perl-rename: perl-rename 'y/A-Z/a-z/; s/ã|á|â/a/g; s/é|ê/e/g; s/í/i/g; s/õ|ó/o/g; s/ú/u/g; s/ç/c/g; s/(?<=\d-)*\s/_/g; s/...
Alex Braga's user avatar
0 votes
0 answers
114 views

I accidentally renamed ld-linux-aarch64.so.1. Now I cannot connect my target machine with SSH. How can I rename it back? I will not consider to reflash my target machine.
M. Preacher's user avatar
1 vote
1 answer
116 views

Trying to figure out how to include several rename commands in one shell script that I will save as a cron job. What I would like to accomplish is renaming different words and also suppress error ...
user642904's user avatar
0 votes
2 answers
384 views

Is it possible to batch rename files in Fish so that the spaces will be replaced with underscores? I tried to figure it out myself, but haven't succeeded yet: https://fishshell.com/docs/current/cmds/...
jsx97's user avatar
  • 1,397

15 30 50 per page
1
2 3 4 5
83