redhat5之初始化指令碼檔案呼叫次序.bash_profile_.bashrc_bashrc
---root家目錄
[root@rhel5 ~]# pwd
/root
----檢視所有檔案
[root@rhel5 ~]# ls -la
total 128
drwxr-x--- 2 root root 4096 Jun 4 04:08 .
drwxr-xr-x 28 root root 4096 Jun 5 02:24 ..
-rw------- 1 root root 1041 Jun 3 08:46 anaconda-ks.cfg
-rw------- 1 root root 3443 Jun 4 08:54 .bash_history
-rw-r--r-- 1 root root 24 Jul 13 2006 .bash_logout
-rw-r--r-- 1 root root 191 Jul 13 2006 .bash_profile
-rw-r--r-- 1 root root 176 Jul 13 2006 .bashrc
-rw-r--r-- 1 root root 0 Jun 4 04:08 c1
-rw-r--r-- 1 root root 0 Jun 4 04:08 c2
-rw-r--r-- 1 root root 100 Jul 13 2006 .cshrc
-rw-r--r-- 1 root root 29623 Jun 3 08:46 install.log
-rw-r--r-- 1 root root 0 Jun 3 08:37 install.log.syslog
-rw------- 1 root root 35 Jun 5 02:07 .lesshst
-rw-r--r-- 1 root root 129 Jul 13 2006 .tcshrc
--.bash_profile會呼叫.bashrc
[root@rhel5 ~]# more .bash_profile
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
PATH=$PATH:$HOME/bin
export PATH
unset USERNAME
---.bashrc會呼叫/etc/bashrc
[root@rhel5 ~]# more .bashrc
# .bashrc
# User specific aliases and functions
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
[root@rhel5 ~]#
小結:1,如果你要在重啟或啟動執行一些任務,可以直接在.bash_profile新增對應的指令碼即可
2,/etc/bashrc最好不要改.除非你明白裡面的含義
3,家目錄有檔案:.bashrc和.bash_profile,而/etc目錄有bashrc
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/9240380/viewspace-763029/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- shell指令碼之批次清空檔案指令碼
- hadoop_批量命令指令碼&同步檔案指令碼Hadoop指令碼
- Shell指令碼 | 抓取log檔案指令碼
- shell指令碼之刪除固定天數之前的檔案指令碼
- OGG之 各種資料泵初始化指令碼指令碼
- FastScripts for Mac(指令碼呼叫工具)ASTMac指令碼
- Class檔案結構&位元組碼指令
- shell指令碼技巧—建立和清空檔案指令碼
- CMD 執行大檔案SQL指令碼SQL指令碼
- 一個centos初始化指令碼CentOS指令碼
- Dubbo原始碼解析之客戶端初始化及服務呼叫原始碼客戶端
- 簡單介紹Shell指令碼之檔案批次建立與修改的方法指令碼
- DC-7-Drupal-指令碼檔案提權指令碼
- 共享一個iptables的shell指令碼檔案指令碼
- PowerDesigner: 利用sql指令碼檔案逆生成模型SQL指令碼模型
- 第22篇 生成proto檔案bat指令碼BAT指令碼
- shell 備份檔案指令碼+自動清理指令碼
- 動態引用外部的Javascript指令碼檔案JavaScript指令碼
- Shell指令碼逐行處理文字檔案技巧指令碼
- pyc檔案花指令
- 10 Windows批處理之呼叫例程和bat檔案WindowsBAT
- 將Python指令碼打包成可執行檔案Python指令碼
- Java動態指令碼Groovy讀取配置檔案Java指令碼
- 如何在Shell指令碼中逐行讀取檔案指令碼
- 檔案格式引起的指令碼執行錯誤指令碼
- 程式碼安全之檔案包含
- 呼叫中心資料入庫指令碼指令碼
- 如何呼叫python中的shell指令碼?Python指令碼
- Yii2 init 初始化指令碼分析指令碼
- 2.6.1 關於初始化檔案
- 使用node構建檔案重新命名指令碼工具指令碼
- 如何讓shell指令碼變成可執行檔案指令碼
- [ Shell ] 通過 Shell 指令碼匯出 GDSII/OASIS 檔案指令碼
- 如何使用python指令碼定時清空檔案內容?Python指令碼
- Nodejs 呼叫 R 指令碼 / Nodejs Call R ScriptNodeJS指令碼
- 原生JS動態載入JS、CSS檔案及程式碼指令碼JSCSS指令碼
- 精盡MyBatis原始碼分析 - MyBatis初始化(二)之載入 Mapper 介面與 XML 對映檔案MyBatis原始碼APPXML
- django的初始化檔案說明Django
- 2.6.1.1 初始化引數檔案示例