That depends on how you define a virus. Worms have to self-replicate, but many people do not consider that functionality necessary for viruses (including the authors of many security-focused books). All a virus really is is a process that runs without the user's approval or knowledge. Besides, code like this would have no problems replicating if you bind it to another executable and start seeding it. So maybe this would be considered more of a trojan than a virus (while it could be considered both), but it doesn't make too much difference in this case.
Also, there's a big difference between those commands. Sure, they're just delete commands; in reality, what are viruses and malware in general? Just a collection of "just <whatever>" commands that are intended to be run unknowingly written by authors with malicious intent. The windows command can be bound to anything, so something simple like just opening a picture could erase your hard drive. On linux, a command like that cannot operate unless you first chmod it and then enter your administrator password. If it's run in a terminal, they'd be able to see the command and either not enter the password or ctrl-c it, and if not, you'd want to use gksudo, not sudo... which would also raise red flags since the average linux user tends to be more aware of how his OS works than the average windows user, and he'd know that if he hadn't entered any commands needing super user privilege there's no reason the system would need his password. There's no point in trying to classify something as a virus if it has no chance of ever being run.