TraceLife

真正的幸福,在于对平淡生活的热爱……

导航

2012年4月27日

摘要: 下面列举一下各种 shell 对应的配置文件:Bourne Shell (sh) ----- .profileKorn Shell (ksh) -----.profile (兼容 sh)C Shell (csh)----- .loginBourne Again Shell (bash) -----bash被设计成兼容sh,ksh,并有csh的特征, 所以会在用户的主目录下依次查找.bash_profile,.bash_login,.profile文件,并用找到的第一个作为自己的配置文件; When you start a login shell, bash consults the follo 阅读全文

posted @ 2012-04-27 16:56 hallo 阅读(567) 评论(0) 推荐(0) 编辑

摘要: source command命令的格式有两种source .bashrc. .bashrc下面的方式更简洁,但后续的脚本如果要解析可能就稍微要复杂些。对应的文档:. filename [arguments] source filename [arguments] Read and execute commands from filename in the current shell environment and return the exit status of the last command exe- cuted f... 阅读全文

posted @ 2012-04-27 16:02 hallo 阅读(508) 评论(0) 推荐(0) 编辑

摘要: 在 Unix* Like 环境下工作时,不免会遇到 bash 环境变量的配置。而每次面对 $HOME 目录下的一些 .bash* 文件时,总会暂时性的忘记该修改那个好。实际中在那个文件中添加配置信息都没有问题,都可以正常工作。那为什么要设置两个配置文件呢?它们的区别是什么?查找 bash 的帮助文档。可以找到下面的描述。 ~/.bash_profile The personal initialization file, executed for login shells ~/.bashrc The individual per-i... 阅读全文

posted @ 2012-04-27 15:51 hallo 阅读(699) 评论(0) 推荐(0) 编辑