On Wed, Nov 24, 2004 at 06:21:50PM -0000, Tanney, Austin wrote:
>> In this case.. I want to change the name to
find -type f | xargs rename 's/^\.\/(.*)_\d\d\d\d-\d\d-\d\d\.(...)$/.\/x$1.$2/'
> Basically.. I want to remove the characters "_2004-03-30"
> Now.. these are not set characters and change for each file.
> I'm happy enough to run this as 4 processes.. i.e., one for each file type.
I'm assuming yyyy-mm-dd and 3 letter extensions. I haven't tested that
with a large number of files but it worked with 2. Alter the regex to
suit your tastes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 185 bytes
Desc: not available
Url : http://mail.linux.ie/pipermail/ilug/attachments/20041124/5f5d685b/attachment.pgp
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!