The method of running .sh File under Linux system
Editor to share with you how to run .sh files under the Linux system. I hope you will get something after reading this article. Let's discuss it together.
The way to run a .sh file under the Linux system: first enter the absolute path of the file [/ root/datelog.sh]; then cd to the directory of the [datelog.sh] file and execute [. / datelog.sh].
The method of running .sh file under Linux system:
The first (this approach requires the use of chmod to make the file eligible for execution (x): chmod uplink datelog.sh):
1. Enter the absolute path / root/datelog.sh of the file under any path to execute the file (if permission permits, of course).
2. Cd to the directory of the datelog.sh file, and then execute. / datelog.sh
The second (this approach does not require files to have executable permissions to run):
1. Add the file name to sh under the file path, and sh datelog.sh
2. Under any path, sh plus file path and file name: sh / root/ datelog.sh
After reading this article, I believe you have a certain understanding of "how to run .sh files under the Linux system". If you want to know more about it, you are welcome to follow the industry information channel. Thank you for reading!