How to find a file which are not ends with ".zip" and which are ends with "*.log*" or "*.out*"?

I am new to bash/shell scripting.
I want to find all the files in directory and subdirectories, which are not ends with �.zip� and which are contains in the file name �*.log� or �*.out�.

I know below command to get the files which ends with �.log�; but I need which are not ends with this extension

 
find /tmp/mallik5/ -iname "*.log"

I know below command for which are not ends with �*.zip�

 
find /tmp/mallik5/ '!' -iname "*.zip"

Please help me.
Thanking you in advance
Mallik

Hello,

I have used following command and it works for me.

find . -name "*.logs"

I have made 2 dummy files and then got the same files in output.

./singh_chumma.logs
./singh1_chumma.logs

Thanks,
R. Singh

find /tmp/mallik5 -type f ! -name "*.zip" \( -name "*.log*" -o -name "*.out*" \)
1 Like

Thanks a lot CarolM. It works perfectly.

It worked perfectly.

 
 
find /tmp/mallik5 -type f ! -name "*.zip" \( -name "*.log*" -o -name "*.out*" \)