Either "filename" is not in your path, or it is not installed.
Look for "filename" and see.
Will echo work?
However: I don't know what you mean by NS. The only NS I know of is this network simulator
. This is not an OS. So what OS are you running it on and how did you install ns.