close
Windows OS:
1. Create Test.bat file.
Enter:

 

echo %date%_%time%-NormalShutdown >> C:\NormalShutdown.txt
 

 

2. Run gpedit.msc
3. Select Computer Configuration àWindows SettingsàScripts(Startup/Shutdown)àShutdown
4. Add
5. Press Browse, select Test.bat file
6. Press Apply, OK
7. As Normal Shutdown OS will automatic creationNormalShutdown.txt file in C:
Force shut down have not this file.
 
LinuxOS:
1. Create K30Normalshutdown.sh on /etc/rc0.d
 
#vi /etc/rc0.d/K30Normalshutdown.sh
Enter:
====================================================================
#! /bin/sh
date +”%Y/%m/%d %H:%M:%S Normal Shutdown”>> /root/NormalShutdown.txt
 
====================================================================
#chmod 777 K30Normalshutdown.sh
2. As Normal ShutdownOS will automatic creationNormalShutdown.txt file in /root
 Force shut down have not this file.
arrow
arrow
    全站熱搜

    fit0190iot 發表在 痞客邦 留言(0) 人氣()