Quantcast
Channel: 宣然博客 » ssh
Viewing all articles
Browse latest Browse all 3

用ssh接vps要用到的一些常用linux 命令

$
0
0

人老了,记忆下降,还是把一些常用的命令记在这里,用的时候不用到处找了

$umask 0022 取授权

$find ***  -type d -exec chmod 755 {} \;  修改***路径下所以目录属性为755

$find ***  -type f -exec chmod 644 {} \;  修改***路径下所以文件属性为644

$ mysqldump -u XXX -p XXX>xxx.sql  导出库

$ mysql -u XXX -p XXX<xxx.sql 导入数据库

$ tar -vczf xxx.tar xxx 压缩xxx到xxx.tar中

$ tar -vxzf xxx.tar xxx 解压xxx.tar 到xxx中

$ chmod -R 777 xxxx 修改文件权限 -R 遍历目录中所有文件

$ chown -R xxx ooo 变更文件ooo的所有者为xxx -R 遍历目录中所有文件

$ vmstat X 显示系统资源 每x秒刷新一次

$ service httpd start 启动httpd服务

$ service httpd stop 停止httpd服务

$ service httpd restart 重启httpd服务

$ free 显示内存使用情况

$ top 查看各进程使用内存的情况


Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images