版权声明:[email protected]版权所有 https://blog.csdn.net/weixin_43458720/article/details/88179630
打开rc.local
[root@bogon rc.d]# cat rc.local
#!/bin/bash
# THIS FILE IS ADDED FOR COMPATIBILITY PURPOSES
#
# It is highly advisable to create own systemd services or udev rules
# to run scripts during boot instead of using this file.
#
# In contrast to previous versions due to parallel execution during boot
# this script will NOT be run after all other services.
#
# Please note that you must run 'chmod +x /etc/rc.d/rc.local' to ensure
# that this script will be executed during boot.
touch /var/lock/subsys/local
- 整篇文章只有最后一句是命令
- 当我们打开/var/lock/subsys/local后发现根本什么都没有
- 再回到touch命令的man页查看,发现touch不止有创建文件的作用还有创建文件时更改日期的作用。