Member Avatar

find /home/scott/xyz -name ".log" -not -name 'access.log' -not -name 'server1.log'-exec cp -i {} /home/scott/zxc/. \;

I want to run this command but It doesn't seem to work for two files.How can I achieve this?

Recommended Answers

All 2 Replies

Hi, try:

find /home/scott/xyz -name "*.log" ! \( -name "access.log" -o -name "server1.log" \)
Member Avatar

thankyou friend.
You have been a big help.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, learning, and sharing knowledge.