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

Hi, try:

find /home/scott/xyz -name "*.log" ! \( -name "access.log" -o -name "server1.log" \)
Jump to Post

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 1.21 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.