On Sat, 24 Feb 2018 09:03:09 -0500 bruce <badouglas@xxxxxxxxx> wrote: > Hi. > > Have a bunch of files with the basic naming of: > ztcloud_nfs_parseztaa_1__WGS_7500_001__parse.dat > ztcloud_nfs_parseztaa_1__WGS_7500_002__parse.dat > etc.. > > I'd like to simply remove the 1st part ztcloud_nfs_parsezt from the > files, renaming the files to the rest of the filename.. > > Thought it should be simple using rename > > rename 's/ztcloud_nfs_parseztaa/aa/' zt*.dat > > However, this didn't work... so.. hmm.. > > How would you guys solve this? > > SO has a bunch of different solns as well. > > thanks... This worked here with the F26 version of 'rename': it seems part of the util-linux package here: First a cold-run on the files you want to change with the "-n" switch. Without changing anything: % rename -nv 'ztcloud_nfs_parseztaa_1__' '' * If rename shows what it will do, and you're fine with it, the real thing. So leave away "-n": % rename -v 'ztcloud_nfs_parseztaa_1__' '' * I like this little tool, and sometimes I fight with it to do even more time-saving things with it. But I think the fight it needs is worth the time it takes. Oh yes: and sometimes 'rename' wins ... ;) Good luck -- Wolfgang Pfeiffer _______________________________________________ users mailing list -- users@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to users-leave@xxxxxxxxxxxxxxxxxxxxxxx