To find files whose name contains a certain string , we can use find
as follows:
Sample file:
1429331804.H568641P9577.xxxx.example.com, S = 17846: 2,
Command to find by xxxx.example.com
:
find . -type f -name "*xxxx.example.com*"
And this will only return the files containing the specified string .
Question
How to rename the returned files by replacing the key portion with another value?
1429331804.H568641P9577. xxxx.example.com , S = 17846: 2,
Go to:
1429331804.H568641P9577. yyyy.superbubu.pt , S = 17846: 2,