# linux script使用
2 min read
修改/etc/profile vi /etc/profile 在后面添加 if [ $UID -ge 0 ]; then exec /usr/bin/script -t 2>/var/log/script/$USER-$UID-`date +%Y%m%d%H%M`.date -...
修改/etc/profile vi /etc/profile 在后面添加 if [ $UID -ge 0 ]; then exec /usr/bin/script -t 2>/var/log/script/$USER-$UID-`date +%Y%m%d%H%M`.date -...
修改/etc/ssh/sshd_config 在最下面的: UseDNS no AddressFamily inet SyslogFacility AUTHPRIV PermitRootLogin yes PasswordAuthentication no 把这条改为yes PasswordA...
如: tail -f /var/log/secure | grep 58.39.166.141 返回值(例如): Dec 18 18:38:20 iZ6weh5sqq28g70gojw9z0Z sshd[24109]: Accepted publickey for root from 58.39.1...
一般是安装完什么新软件,如游戏加速器,代理等后出现内网或外网不同的情况, 可以使用一下操作重置网络,需要重启 ipconfig /flushdns ipconfig /registerdns netsh winsock reset...
直接上命令 history 1 | { read x cmd; echo “$cmd”; } 对于read命令的了解,仅限于在shell脚本中使用read -p,对于这种用法从来没用过,更不知道它的含义。 今天抽空琢磨了一下,终于搞明白了来龙去脉。先来写几个命令吧: # read a b c...