摘要: 转自:http://blog.51cto.com/lizhenliang/1607723 一. 几个实例 1. 在循环内使用expect脚本例子: restoreManyDaysTraffic.sh 如下 #!/usr/bin/expect set timeout 12000 set i 1 spa 阅读全文
posted @ 2017-12-05 10:38 坚强的小蚂蚁 阅读(11142) 评论(0) 推荐(1) 编辑
摘要: 1. apt install gnome-shell 2. apt install ubuntu-gnome-desktop (弹出框选择lightdm) 3. apt install unity-tweak-tool 4. apt install gnome-tweak-tool 阿里云服务器ub 阅读全文
posted @ 2017-12-04 18:07 坚强的小蚂蚁 阅读(874) 评论(0) 推荐(0) 编辑
摘要: 一. ubuntu忘记密码解决方法 1. 开机按shift 2. 选择高级选项,进入后选择恢复模式(不要按回车),按e进入编辑模式 3. 修改linux命令中的recovery nomodest 为 quiet splash rw init=/bin/bash,按F10 4. 命令行中输入passw 阅读全文
posted @ 2017-12-04 18:03 坚强的小蚂蚁 阅读(1361) 评论(0) 推荐(0) 编辑
摘要: 转自http://blog.csdn.net/zhuying_linux/article/details/6825568 tr(translate缩写)主要用于删除文件中的控制字符,或进行字符转换。语法:tr [–c/d/s/t] [SET1] [SET2]SET1: 字符集1SET2:字符集2-c 阅读全文
posted @ 2017-12-01 10:20 坚强的小蚂蚁 阅读(1737) 评论(0) 推荐(0) 编辑
摘要: 1. apt-get updateapt-get install apache2 mysql-server libapache2-mod-php5 php5-gd php5-mysql php5-common zabbix-server-mysql zabbix-frontend-phpvim /e 阅读全文
posted @ 2017-11-30 15:38 坚强的小蚂蚁 阅读(734) 评论(0) 推荐(0) 编辑
摘要: 参考:https://www.cnblogs.com/wf-linux/p/9488257.html diff的三种模式,normal, context(-c), unified(-u),后面两种模块可使结果看起来更直观些,就是加上参数-c , -u. 可自己实验下 一. 基本用法和例子 现在让我们 阅读全文
posted @ 2017-11-15 11:18 坚强的小蚂蚁 阅读(1060) 评论(0) 推荐(0) 编辑
摘要: 一. 使用du命令进行大小排序 du -h --max-depth=1 | sort -hr 参数说明: --max-depth:表示要查看几层目录, 也可以用 -d 1表示查看1层目录 sort -r:反向显示 sort -h:compare human readable numbers (e.g 阅读全文
posted @ 2017-11-15 11:03 坚强的小蚂蚁 阅读(9988) 评论(0) 推荐(1) 编辑
摘要: 中文显示菱形乱码的一个解决方法: apt-get install zhcon zhcon --utf8 crtl + d 退出 安装中文支持:apt-get install `check-language-support -l zh-hans` 一. ubuntu修改字符编码 1. 添加字符编码,例 阅读全文
posted @ 2017-11-15 10:54 坚强的小蚂蚁 阅读(38443) 评论(0) 推荐(0) 编辑
摘要: 貌似只需要改红色的就行了,要保险就都改,比如阿里云服务器就要2个都改 ubuntu:修改 /etc/hostname 修改 /etc/hosts 比如:127.0.0.1 localhost calm centos: 修改 /etc/hosts 修改/etc/sysconfig/network 都需 阅读全文
posted @ 2017-11-15 10:00 坚强的小蚂蚁 阅读(724) 评论(0) 推荐(0) 编辑
摘要: 一. 基本方法:date -s "2018-09-02 04:23:45"clock -w 把时间写入cmos(一个RAM芯片) hwclock 查看硬件时间 hwclock -w :将系统时间写入硬件时间hwclock --hctosys: 将系统时间调整为和硬件时间一样hwclock --sys 阅读全文
posted @ 2017-11-15 09:41 坚强的小蚂蚁 阅读(5547) 评论(0) 推荐(0) 编辑