Funky behavior that im noticing

I was just messing around on my test system,
Is sending a file to the /dev/null i.e. mv testfile /dev/null
is this the same as erasing the file, because I've been noticing some weird behavior since I did this. like the following when i execute commands...

sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create
sh: /dev/null: cannot create

Uh, nope. Your command mv testfile /dev/null copied testfile OVER /dev/null. I'm not sure what effect that would have as I've never done it, but it can't be good . . . .

/dev/null is a system device which is "nothing". I'm not thinking of an easy way to explain it. Basically it is an empty file that always stays empty. You use it to throw away output from a script by redirecting the output (error messages, etc.) to /dev/null for example. By replacing it with your testfile that system device is now screwed up.

I imagine you're wondering what to do to fix it. Unfortunately I don't know.

First, do an 'ls -ld /dev/null' to see if /dev/null exists, is corrupt, whatever. It should look like this:

crw-rw-rw-  1 root root 1, 3 Sep  9 18:12 /dev/null

If it does not look like this, or have these permissions, make a new /dev/null by using the "mknod" command (as root):

mknod /dev/null c 1 3

Don't forget to set the permissions to 666 to allow everyone to read and write from/to it.

See this link from sysunconfig.net

http://sysunconfig.net/unixtips/solaris.html\#null

Well guys, why here /dev/null is corrupted cant I use the command

# > /dev/null

Will that not work pls help..