I want to compress files individually with the particular pattern. For example, I have directory as below :
/log/log1 -/1/log2/file.1 -/1/log2/file123 -/1/log2/file2.1 /log/log2 -/2/log2/file4.1 -/2/log2/file345 -/2/log2/file3.1
I want to compress all the files having extension .1 inside /log recursively.
The result will look like
/log/log1 -/1/log2/file.gz -/1/log2/file123 -/1/log2/file2.gz /log/log2 -/2/log2/file4.gz -/2/log2/file345 -/2/log2/file3.gz