linux. (dot) command

Under Linux,. (Dot) + (space) + executable file is equivalent to source + (space) + executable file , which means that the following command or script is executed in the current shell environment, and the default is to open a new shell without dots. .
Such as:
. /home/test.shequivalent to source /home/test.sh.

Any changes made by the script executed by source will affect the current shell (such as the use of cd to change the directory, the directory will change after the script is executed), if the source is not used, it will not affect the current shell.

If you do not want to change the execution permissions of the file and want to execute the file, you can execute a script in the form of (dot + space + executable file name) (of course, only the root user can do this).

Published 381 original articles · praised 85 · 80,000 views +

Guess you like

Origin blog.csdn.net/weixin_40763897/article/details/105193006