mac 常用路径



apache 文件目录
配置文件 /etc/apache2/httpd.conf

sudo /usr/local/mysql/support-files/mysql.server start


#!/usr/bin/python 告诉操作系统,运行该脚本时,调用/usr/bin/下面的python解释器
#!/usr/bin/env python 防止用户没有将python装在默认的/usr/bin/路径下。系统检测这一行,env在系统目录PATH中查找python安装路径

#!/usr/bin/python 相当于写死了路径


If you have several versions of Python installed, /usr/bin/env will ensure the interpreter used is the first one on your environment’s $PATH. The alternative would be to hardcode something like #!/usr/bin/python; that’s ok, but less flexible.

In Unix, an executable file that’s meant to be interpreted can indicate what interpreter to use by having a #! at the start of the first line, followed by the interpreter (and any flags it may need).

If you’re talking about other platforms, of course, this rule does not apply (but that “shebang line” does no harm, and will help if you ever copy that script to a platform with a Unix base, such as Linux, Mac, etc).

One thought on “mac 常用路径


电子邮件地址不会被公开。 必填项已用*标注