linux - how to run/execute a file in the command line without the ./ -
let's file 'foo.sh' has permissions , want run file in current directory:
#> ./foo.sh
what/where change in order execute file (any file permissions) typing name:
#>foo.sh
the idea way (in current directory). in case ./file.sh
valid way execute file, file.sh
work too. not intended run file.sh
globally.
if want execute file specific local user create ~/bin
directory put file inside of , append path $path
env. ':' separator check following link.
http://www.cyberciti.biz/faq/unix-linux-adding-path/
but if want access globally. place file in /usr/bin or /usr/local/bin , check these paths registered in $path
then. add permissions. open new terminal try call file.
Comments
Post a Comment