Inside the /tmp I want to find files older than 180 day, but I also want to exclude some folders from the search like ./vboxdrv-Module.symvers. How can I perform the task with find?
This syntax will do what you want:
find -not -newermt 2016-11-10 -not -path "./vboxdrv-Module.symvers/*"
Change with whatever settings you want.
Add as many
-not -path you want after each other. Ie.
find -not -newermt 2016-11-10 -not -path "./folder1/*" -not -path "./folder2/*"
Or if you want to do it from another folder:
find /tmp/ -not -newermt 2016-11-10 -not -path "/tmp/folder1/*" -not -path "/tmp/folder2/*"