using System; using System.Collections.Generic; using System.Text; using System.IO; using System.Net.NetworkInformation; using System.Threading; namespace Manager.Common { public static class NetCommon{ /// <summary> /// 验证IP地址字符串的正确性 /// </summa…
//实现详细记录登陆过系统的用户,IP地址,shell命令及详细操作的时间 将下面代码加入/etc/profile //history USER_IP = who -u am i 2> /dev/null | awk '{print $NF}'| sed -e 's/[()] //g' HISTDIR = /usr/share/.history if [ -z $USER_IP ] then USER_IP = hostname fi if [ ! -d $HISTDIR ] then mkdi…