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?
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?
Hi, try:
find /home/scott/xyz -name "*.log" ! \( -name "access.log" -o -name "server1.log" \)
thankyou friend.
You have been a big help.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.