Execution time of files such as bashrc and profile
Source: Internet
Author: User
Bashrc, profile, and other files are executed in bashrc in the/etc,/home/username Directory. add the following code to the profile File: Shell code echo 'date' & gt; /home/zhennn/priorityecho & quot ;/... when bashrc and profile files are executed, add the following code to the bashrc and profile files in the/etc,/home/username directory, shell code echo 'date'>/home/zhennn/priority echo "/home/zhennn /. bashrc ">/home/zhennn/priority echo>/home/zhennn/priority to check their execution sequence. Perform two operations: 1) open a terminal and 2) log on to the user (su-zhennn) Vim code at 00:32:56 CST/etc/bash on Thursday, July 18, 2013. bashrc, Thursday, July 18, 2013 00:32:56 CST/home/zhennn /. bashrc, Thursday, July 18, 2013 00:33:29 CST/etc/bash. bashrc Thursday July 18, 2013 00:33:29 CST/etc/profile Thursday July 18, 2013 00:33:29 CST/home/zhennn /. bashrc, Thursday, July 18, 2013 00:33:29 CST/home/zhennn /. profile. Therefore, when a user enters a terminal, bashrc is executed and/etc is prior to/home/username. When a user logs on, the profile is also executed, and bashrc in the same directory is prior to profile.
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.