Tuesday, October 18, 2011

Unix interview questions

Q. How to enable a script to be invoked by simply typing “scriptname [ENTER]” from the command-line, by staying anywhere in directory structure?
Ans.
(i ) Move it to move it to /usr/local/bin
or
(ii) Include the current directory (./) - $PWD in a user's $PATH environment variable

No comments:

Post a Comment