I have some text file like this
access-2018-08-21.log.1-20180906
access-2018-08-22.log.1-20180906
I want to remove the -20180906 part wo the result would be
access-2018-08-21.log
access-2018-08-22.log
I tried rename -- "s/\-20180906//g" * but it didn't work.
What's the command line i need to achieve my goal?
renameutility? See Why is the rename utility on Debian/Ubuntu different than the one on other distributions, like CentOS? and check whatrename --versionsays. – ilkkachu Sep 06 '18 at 08:26rename "s/\.1-20180906//g" *– Sparhawk Sep 06 '18 at 08:26rename --version? – Sparhawk Sep 06 '18 at 08:33