linux常用命令
2014-12-11 15:59
106 查看
查看目录文件大小
du -sh /data/* |sort -rn
解压
tar -xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2 //解压 tar.bz2
tar -xZvf file.tar.Z //解压tar.Z
unrar e file.rar //解压rar
unzip file.zip //解压zip
tar -cvf /tmp/etc.tar /etc<==仅打包,不压缩!
[root@linux ~]# tar -zcvf /tmp/etc.tar.gz /etc<==打包后,以 gzip 压缩
[root@linux ~]# tar -jcvf /tmp/etc.tar.bz2 /etc<==打包后,以 bzip2 压缩
更新apt下载列表
sudo apt-get update
sudo apt-get install mysql-server
查看端口占用
netstat -anp|grep 7001
#memcached 启动
/usr/local/bin/memcached -d -c 10240 -m 1024 -u root -p 6000
#mysql启动
service mysqld start
备份表结构
mysqldump -h127.0.0.1 -P8904 -uroot -p123456 --add-locks -q -d mj_log> mj_log.sql
du -sh /data/* |sort -rn
解压
tar -xvf file.tar //解压 tar包
tar -xzvf file.tar.gz //解压tar.gz
tar -xjvf file.tar.bz2 //解压 tar.bz2
tar -xZvf file.tar.Z //解压tar.Z
unrar e file.rar //解压rar
unzip file.zip //解压zip
tar -cvf /tmp/etc.tar /etc<==仅打包,不压缩!
[root@linux ~]# tar -zcvf /tmp/etc.tar.gz /etc<==打包后,以 gzip 压缩
[root@linux ~]# tar -jcvf /tmp/etc.tar.bz2 /etc<==打包后,以 bzip2 压缩
更新apt下载列表
sudo apt-get update
sudo apt-get install mysql-server
查看端口占用
netstat -anp|grep 7001
#memcached 启动
/usr/local/bin/memcached -d -c 10240 -m 1024 -u root -p 6000
#mysql启动
service mysqld start
备份表结构
mysqldump -h127.0.0.1 -P8904 -uroot -p123456 --add-locks -q -d mj_log> mj_log.sql
相关文章推荐
- Linux下常用配置文件及常用命令的介绍
- Linux 常用命令汇编(一)
- Unix/Linux常用监控和管理命令工具
- Linux下常用网络配置文件及常用命令的介绍
- Linux开发中的常用命令
- linux常用的命令详细说明
- Linux下的常用命令和设置
- Linux常用命令
- Linux常用命令介绍
- Linux 的常用网络命令
- Linux 入门常用命令
- linux常用开发命令
- Linux常用命令和服务器配置
- Linux 的常用网络命令
- linux常用命令及技巧
- Linux开发中的常用命令
- LINUX选修课讲义:UNIX常用命令
- Linux 入门常用命令
- Linux常用命令(2)
- Linux开发中的常用命令