文件操作
// 复制
cp file1 file2
//复制文件夹
cp -r dir1 dir2
//解压
tar zxvf FileName.tar.gz
//压缩
tar zcvf FileName.tar.gz DirName
// 删除(通过通配符配置)
rm -f 2010-10-*.log 2010-09-*.log
端口相关
1,ufw
//查看
sudo ufw status
//开发
sudo ufw allow 8080
//删除
sudo ufw delete allow 8080
//指定ip
sudo ufw allow from 192.168.1.1
//查看其他命令
sudo ufw –help
2,查看端口
//查看端口,*代表要查询的对象
netstat -ntlp | grep *
启动.sh程序
1,./命令
//启动
./startup.sh start
//查看状态
./startup.sh status
2,windows修正linux的sh文件换行符的问题
http://www.cnblogs.com/jacktu/archive/2008/06/12/1218400.html
关于日期的操作
http://blog.163.com/niuxiangshan@126/blog/static/1705965952012215189714/
mysql相关
//连接远程数据库
mysql -h192.168.1.11 -uroot -p123456
Redis相关
//服务相关
sudo /etc/init.d/redis-server stop
sudo /etc/init.d/redis-server start
sudo /etc/init.d/redis-server restart
//客户端目录
cd usr/bin/
//centOS 7 中启动与开启启动
systemctl start redis.service
systemctl enable redis.service