
15 Nov
2019
15 Nov
'19
1:51 a.m.
Hi there, I have a bunch of files that I want to rename: 123.someword.doc > 123.doc 456.someword.pdf > 456.pdf The "someword" is consistent in all the files and they need to be renamed recursively. Something like this but with a different regex: # This is for a completely different file name structure find . -name '123*.txt' -type f -exec bash -c 'mv "$1" "${1/\/123_//}"' -- {} \; ...sorry regex is a shortfall of mine. Thanks in advance. Cheers Piers