viruses and operating systems

You always hear that Macs aren't as prone to virus and malware attacks as PC's, why? I just finished dealing with some nasty viruses, trojans and such, and think Iv'e got them licked (fingers crossed). As an example, lets say I'm running a windows based machine, and download an mp3 file, and attached with it is a trogan that wreaks havock with your web browser, hijacking it, not being able to get to certain sites, and so on. If you were to open the same file on a Mac OS, or Linux based machine, would the virus that is attached just go into oblivion? or would it just be there as an inert piece of code, not being able to do anything? Is it something about the instruction set of the virus, or trogan that isn't recognisable within the other OS's? Thanks.
Well, viruses are only able to execute code—but the operating system needs to be able to understand that code. Since Microsoft® Windows® and Mac OS each execute unique types of code (one only executes Windows code, of course, and one only executes Mac OS code), only one or the other can execute the code used by the virus. If a virus attempts to execute Windows code on a Mac OS system, it would result most probably result in nothing happening, or an error message, or results entirely unexpected.
I've always looked at from the stand point that if some pinhead is going to write a viruses and trojan horses, why would he not attack as many computers with it as possible. Macs take up less than 10% of the computers out there so why target them. Attacking PCs gives them the biggest bang for their buck.

On the other hand though, every time I hear that some clown has finally written a virus for the Mac, nothing ever happens. I'm not sure if Mac is on top of the situation or that it is all propaganda because in 14 years of being on line and not running any anti virus programs, I have never had any problems with malware.
The majority of viruses nowadays are written for financial purposes, often targeted advertisings. The userbase of OSX and Linux are too small for it to be a good investment of time.

Similar Threads

Trojan viruses on CanCon?
by EagleSmack | Sep 6th, 2009
Sudden spate of viruses
by #juan | Jan 20th, 2007
Methods you can try to remove viruses
by snooker | Dec 30th, 2004