Why do you need ./ (dot-slash) before executable or script name to run it in bash?

前端 未结 9 1130
耶瑟儿~
耶瑟儿~ 2020-11-22 03:59

When running scripts in bash, I have to write ./ in the beginning:

$ ./manage.py syncdb

If I don\'t, I get an error message:

9条回答
  •  天命终不由人
    2020-11-22 04:36

    When the script is not in the Path its required to do so. For more info read http://www.tldp.org/LDP/Bash-Beginners-Guide/html/sect_02_01.html

提交回复
热议问题