Recursively rename all the files without changing their extensions?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
How to recursively rename all the files in several layers of subdirectories without changing their extensions?
Below's a toned down version (to save room) of what I've got.
For argument's sake, I want all the files to have the same title, yet retain their original extension. There's never more than a single file per directory, so there's no chance of doubling up.
For simplicity, we'll just call them all foo, followed by their current extension.
So just to clarify:Asset 1.pdf, Asset 1.png, Asset 1@4x.png, Asset 1.svg
Will become:foo.pdf, foo.png, foo.png, foo.svg
And so on in that fashion.
I would typically use parameter expansion and a for loop, like:
for f in */*; do mv "$f" "$f%/*/foo.$f##*."; done
But it's not recursive. So I would prefer to use something with find..-exec or similar.
~/Desktop/Project/Graphics/
âÂÂâÂÂâ Huge
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ Asset 1.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ Asset 1.svg
âÂÂâÂÂâ Large
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 2.svg
âÂÂâÂÂâ Medium
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 3.svg
âÂÂâÂÂâ Small
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 4.svg
âÂÂâÂÂâ Tiny
âÂÂâÂÂâ PDF
âÂÂààâÂÂâÂÂâ Asset 5.pdf
âÂÂâÂÂâ PNG
âÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 5.png
âÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂâÂÂâ Asset 5@4x.png
âÂÂâÂÂâ SVG
âÂÂâÂÂâ Asset 5.svg
30 directories, 20 files
files find rename mv recursive
add a comment |Â
up vote
0
down vote
favorite
How to recursively rename all the files in several layers of subdirectories without changing their extensions?
Below's a toned down version (to save room) of what I've got.
For argument's sake, I want all the files to have the same title, yet retain their original extension. There's never more than a single file per directory, so there's no chance of doubling up.
For simplicity, we'll just call them all foo, followed by their current extension.
So just to clarify:Asset 1.pdf, Asset 1.png, Asset 1@4x.png, Asset 1.svg
Will become:foo.pdf, foo.png, foo.png, foo.svg
And so on in that fashion.
I would typically use parameter expansion and a for loop, like:
for f in */*; do mv "$f" "$f%/*/foo.$f##*."; done
But it's not recursive. So I would prefer to use something with find..-exec or similar.
~/Desktop/Project/Graphics/
âÂÂâÂÂâ Huge
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ Asset 1.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ Asset 1.svg
âÂÂâÂÂâ Large
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 2.svg
âÂÂâÂÂâ Medium
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 3.svg
âÂÂâÂÂâ Small
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 4.svg
âÂÂâÂÂâ Tiny
âÂÂâÂÂâ PDF
âÂÂààâÂÂâÂÂâ Asset 5.pdf
âÂÂâÂÂâ PNG
âÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 5.png
âÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂâÂÂâ Asset 5@4x.png
âÂÂâÂÂâ SVG
âÂÂâÂÂâ Asset 5.svg
30 directories, 20 files
files find rename mv recursive
You can use a combination offindand GNUmvlike described in this answer.
â feliks
3 hours ago
@feliks This system has mostly BSD utilities. But I think it is basically the same.
â tjt263
49 mins ago
@feliks useful link, but the challenge lies in gettingfind x -exec y ;to play nicely with"$parameter%/*/foo.$expansion##*.", etc.
â tjt263
31 mins ago
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
How to recursively rename all the files in several layers of subdirectories without changing their extensions?
Below's a toned down version (to save room) of what I've got.
For argument's sake, I want all the files to have the same title, yet retain their original extension. There's never more than a single file per directory, so there's no chance of doubling up.
For simplicity, we'll just call them all foo, followed by their current extension.
So just to clarify:Asset 1.pdf, Asset 1.png, Asset 1@4x.png, Asset 1.svg
Will become:foo.pdf, foo.png, foo.png, foo.svg
And so on in that fashion.
I would typically use parameter expansion and a for loop, like:
for f in */*; do mv "$f" "$f%/*/foo.$f##*."; done
But it's not recursive. So I would prefer to use something with find..-exec or similar.
~/Desktop/Project/Graphics/
âÂÂâÂÂâ Huge
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ Asset 1.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ Asset 1.svg
âÂÂâÂÂâ Large
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 2.svg
âÂÂâÂÂâ Medium
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 3.svg
âÂÂâÂÂâ Small
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 4.svg
âÂÂâÂÂâ Tiny
âÂÂâÂÂâ PDF
âÂÂààâÂÂâÂÂâ Asset 5.pdf
âÂÂâÂÂâ PNG
âÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 5.png
âÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂâÂÂâ Asset 5@4x.png
âÂÂâÂÂâ SVG
âÂÂâÂÂâ Asset 5.svg
30 directories, 20 files
files find rename mv recursive
How to recursively rename all the files in several layers of subdirectories without changing their extensions?
Below's a toned down version (to save room) of what I've got.
For argument's sake, I want all the files to have the same title, yet retain their original extension. There's never more than a single file per directory, so there's no chance of doubling up.
For simplicity, we'll just call them all foo, followed by their current extension.
So just to clarify:Asset 1.pdf, Asset 1.png, Asset 1@4x.png, Asset 1.svg
Will become:foo.pdf, foo.png, foo.png, foo.svg
And so on in that fashion.
I would typically use parameter expansion and a for loop, like:
for f in */*; do mv "$f" "$f%/*/foo.$f##*."; done
But it's not recursive. So I would prefer to use something with find..-exec or similar.
~/Desktop/Project/Graphics/
âÂÂâÂÂâ Huge
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ Asset 1.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 1@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ Asset 1.svg
âÂÂâÂÂâ Large
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 2@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 2.svg
âÂÂâÂÂâ Medium
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 3@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 3.svg
âÂÂâÂÂâ Small
âÂÂààâÂÂâÂÂâ PDF
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.pdf
âÂÂààâÂÂâÂÂâ PNG
âÂÂààâÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4.png
âÂÂààâÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂààâÂÂâÂÂâ ProjectAsset 4@4x.png
âÂÂààâÂÂâÂÂâ SVG
âÂÂààâÂÂâÂÂâ ProjectAsset 4.svg
âÂÂâÂÂâ Tiny
âÂÂâÂÂâ PDF
âÂÂààâÂÂâÂÂâ Asset 5.pdf
âÂÂâÂÂâ PNG
âÂÂààâÂÂâÂÂâ 1x
âÂÂààâÂÂààâÂÂâÂÂâ Asset 5.png
âÂÂààâÂÂâÂÂâ 4x
âÂÂààâÂÂâÂÂâ Asset 5@4x.png
âÂÂâÂÂâ SVG
âÂÂâÂÂâ Asset 5.svg
30 directories, 20 files
files find rename mv recursive
files find rename mv recursive
edited 4 mins ago
don_crissti
48k15126156
48k15126156
asked 8 hours ago
tjt263
5101420
5101420
You can use a combination offindand GNUmvlike described in this answer.
â feliks
3 hours ago
@feliks This system has mostly BSD utilities. But I think it is basically the same.
â tjt263
49 mins ago
@feliks useful link, but the challenge lies in gettingfind x -exec y ;to play nicely with"$parameter%/*/foo.$expansion##*.", etc.
â tjt263
31 mins ago
add a comment |Â
You can use a combination offindand GNUmvlike described in this answer.
â feliks
3 hours ago
@feliks This system has mostly BSD utilities. But I think it is basically the same.
â tjt263
49 mins ago
@feliks useful link, but the challenge lies in gettingfind x -exec y ;to play nicely with"$parameter%/*/foo.$expansion##*.", etc.
â tjt263
31 mins ago
You can use a combination of
find and GNU mv like described in this answer.â feliks
3 hours ago
You can use a combination of
find and GNU mv like described in this answer.â feliks
3 hours ago
@feliks This system has mostly BSD utilities. But I think it is basically the same.
â tjt263
49 mins ago
@feliks This system has mostly BSD utilities. But I think it is basically the same.
â tjt263
49 mins ago
@feliks useful link, but the challenge lies in getting
find x -exec y ; to play nicely with "$parameter%/*/foo.$expansion##*.", etc.â tjt263
31 mins ago
@feliks useful link, but the challenge lies in getting
find x -exec y ; to play nicely with "$parameter%/*/foo.$expansion##*.", etc.â tjt263
31 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
Maybe I'm oversimplifying, but, if you know the max depth of the directory hierarchy (here: 3), why not
for f in */* */*/* */*/*/*; do ... ; done
adding some error checking?
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Not yet. Wouldn't it just be*/*/*though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporatefindtoo, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.
â tjt263
51 mins ago
add a comment |Â
up vote
0
down vote
It's very similar with find...-exec: invoke a shell so that you can use parameter expansion, extract the PARENT directory and the EXTENSION so that you can construct the new filename as PARENT/NAME.EXTENSION and then move/rename:
find target_dir -type f -exec sh -c '
h=$1%/*; mv "$1" "$h/NAME.$1##*."' sh ;
If you want to dry-run the above, insert an echo before the mv...
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Maybe I'm oversimplifying, but, if you know the max depth of the directory hierarchy (here: 3), why not
for f in */* */*/* */*/*/*; do ... ; done
adding some error checking?
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Not yet. Wouldn't it just be*/*/*though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporatefindtoo, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.
â tjt263
51 mins ago
add a comment |Â
up vote
0
down vote
Maybe I'm oversimplifying, but, if you know the max depth of the directory hierarchy (here: 3), why not
for f in */* */*/* */*/*/*; do ... ; done
adding some error checking?
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Not yet. Wouldn't it just be*/*/*though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporatefindtoo, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.
â tjt263
51 mins ago
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Maybe I'm oversimplifying, but, if you know the max depth of the directory hierarchy (here: 3), why not
for f in */* */*/* */*/*/*; do ... ; done
adding some error checking?
Maybe I'm oversimplifying, but, if you know the max depth of the directory hierarchy (here: 3), why not
for f in */* */*/* */*/*/*; do ... ; done
adding some error checking?
answered 4 hours ago
RudiC
2,276110
2,276110
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Not yet. Wouldn't it just be*/*/*though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporatefindtoo, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.
â tjt263
51 mins ago
add a comment |Â
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Not yet. Wouldn't it just be*/*/*though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporatefindtoo, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.
â tjt263
51 mins ago
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
I don't think it works like that, does it?I think I'm missing something
â tjt263
4 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Did you give it a try? Worked for me, going through all the subdirectory levels.
â RudiC
3 hours ago
Not yet. Wouldn't it just be
*/*/* though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporate find too, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.â tjt263
51 mins ago
Not yet. Wouldn't it just be
*/*/* though? Also, you omitted a significant chunk of the command line. Ideally, I would incorporate find too, so it could be scripted regardless of recursion depth. But thanks, I appreciate your input.â tjt263
51 mins ago
add a comment |Â
up vote
0
down vote
It's very similar with find...-exec: invoke a shell so that you can use parameter expansion, extract the PARENT directory and the EXTENSION so that you can construct the new filename as PARENT/NAME.EXTENSION and then move/rename:
find target_dir -type f -exec sh -c '
h=$1%/*; mv "$1" "$h/NAME.$1##*."' sh ;
If you want to dry-run the above, insert an echo before the mv...
add a comment |Â
up vote
0
down vote
It's very similar with find...-exec: invoke a shell so that you can use parameter expansion, extract the PARENT directory and the EXTENSION so that you can construct the new filename as PARENT/NAME.EXTENSION and then move/rename:
find target_dir -type f -exec sh -c '
h=$1%/*; mv "$1" "$h/NAME.$1##*."' sh ;
If you want to dry-run the above, insert an echo before the mv...
add a comment |Â
up vote
0
down vote
up vote
0
down vote
It's very similar with find...-exec: invoke a shell so that you can use parameter expansion, extract the PARENT directory and the EXTENSION so that you can construct the new filename as PARENT/NAME.EXTENSION and then move/rename:
find target_dir -type f -exec sh -c '
h=$1%/*; mv "$1" "$h/NAME.$1##*."' sh ;
If you want to dry-run the above, insert an echo before the mv...
It's very similar with find...-exec: invoke a shell so that you can use parameter expansion, extract the PARENT directory and the EXTENSION so that you can construct the new filename as PARENT/NAME.EXTENSION and then move/rename:
find target_dir -type f -exec sh -c '
h=$1%/*; mv "$1" "$h/NAME.$1##*."' sh ;
If you want to dry-run the above, insert an echo before the mv...
answered 6 mins ago
don_crissti
48k15126156
48k15126156
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476694%2frecursively-rename-all-the-files-without-changing-their-extensions%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
You can use a combination of
findand GNUmvlike described in this answer.â feliks
3 hours ago
@feliks This system has mostly BSD utilities. But I think it is basically the same.
â tjt263
49 mins ago
@feliks useful link, but the challenge lies in getting
find x -exec y ;to play nicely with"$parameter%/*/foo.$expansion##*.", etc.â tjt263
31 mins ago