0
votes

I am using Red Hat Enterprise Linux Server. I have files

file1.encrypted.decrypted, myfile.encrypted.decrypted, demo.encrypted.decrypted.

I want to write a command such that in output both extentions are removed.

Output = file1, myfile, demo

I tried

rename 's/\.encrypted\.decrypted//' *.encrypted.decrypted

But it does not produce the desired result (Please note this exact command works on ubuntu 18)

I am not sure why rename 's/\.encrypted\.decrypted//' *.encrypted.decrypted is not working in my case ?

I am using NAME="Red Hat Enterprise Linux Server" VERSION="7.4 (Maipo) ID_LIKE="fedora"

1
There are two (incompatible) programs, both called rename.melpomene
I did not understand please elaborateAjinkya
$ whereis rename rename: /usr/bin/rename /usr/share/man/man1/rename.1.gz I got these should I remove one of them ?Ajinkya

1 Answers

0
votes

this worked: rename .encrypted.decrypted "" *