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/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- ant指令碼呼叫.bat檔案指令碼BAT
- 指令碼檔案命名指令碼
- hadoop_批量命令指令碼&同步檔案指令碼Hadoop指令碼
- Shell指令碼 | 抓取log檔案指令碼
- 分析alert檔案的指令碼指令碼
- 【Memcache】初始化cache指令碼指令碼
- OGG之 各種資料泵初始化指令碼指令碼
- 定期刪除歸檔檔案的指令碼指令碼
- 定時刪除檔案指令碼指令碼
- 9、在Shell指令碼中呼叫其他指令碼指令碼
- FastScripts for Mac(指令碼呼叫工具)ASTMac指令碼
- 呼叫Frame中的指令碼指令碼
- java中呼叫groovy指令碼Java指令碼
- 利用SCHEDULER呼叫shell指令碼指令碼
- 一個centos初始化指令碼CentOS指令碼
- Dubbo原始碼解析之客戶端初始化及服務呼叫原始碼客戶端
- Linux/Unix shell 指令碼中呼叫SQL,RMAN指令碼Linux指令碼SQL
- Class檔案結構&位元組碼指令
- CMD 執行大檔案SQL指令碼SQL指令碼
- 使用shell指令碼巧妙統計檔案指令碼
- 如何用Shell指令碼生成XML檔案指令碼XML
- 使用expect指令碼SCP拷貝檔案指令碼
- oracle11gR2在RedHat5上前期安裝配置指令碼OracleRedhat指令碼
- CRONTAB呼叫的備份指令碼指令碼
- 在Watir中呼叫JavaScript指令碼JavaScript指令碼
- 系統初始化SHELL指令碼薦指令碼
- Linux系統初始化*引數初始化(指令碼)Linux指令碼
- 簡單介紹Shell指令碼之檔案批次建立與修改的方法指令碼
- java呼叫exe檔案Java
- 共享一個iptables的shell指令碼檔案指令碼
- 動態引用外部的Javascript指令碼檔案JavaScript指令碼
- Shell指令碼逐行處理文字檔案技巧指令碼
- shell 備份檔案指令碼+自動清理指令碼
- 【shell 】求兩個檔案相加的指令碼指令碼
- 一個確定trace檔案的指令碼指令碼
- DC-7-Drupal-指令碼檔案提權指令碼
- Linux/Unix shell 指令碼清除歸檔日誌檔案Linux指令碼
- JAVA開發之(二) :配置開啟工程檔案路徑指令碼(MAC版)Java指令碼Mac