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...
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.