A few weeks ago i wrote a code (found a tutorial on the web) in the terminal window for 3D Maya Batch rendering, and since then i can't empty the trash (the only terminal command i know) with: sudo rm -rf ~/.Trash/*.
You say that
sudo rm -rf ~/.Trash/*
command does not work...
What does it do, then? Do you get an error?
That command should ask for your password. Does it?
The command as you are showing it here, appears correct.
Lets make sure which part of that command is not found.
Type rm in the terminal (nothing else) and press enter. You should get a couple of lines showing the optional arguments for rm, like this:
Ah, no "command not found" this time!
Good - now try the command again, only with sudo, and see what happens this time.
I suspect you may have mistyped that command when you tried before, so type carefully.
Maybe your "text file" is also mistyped. Has it ever worked for you?
Maybe you are picking up an extra space when you copy/paste.
Try typing it manually, it's short...
sudo(space)rm(space)-rf(space)~/.Trash/*