linux常用指令

admin 提交于 周六, 07/20/2019 - 12:42

1.添加软连接  相当于快捷方式

ln -s /usr/local/redis-4.0.6/src/redis-cli  /usr/bin/redis

2.全局递归搜索文本内容

grep -nr content_list2

3.关闭所有nginx进程

ps -ef|grep nginx|grep -v grep|awk '{print $2}'|xargs kill -9

4.查询所有监听端口

netstat -nlp |grep LISTEN

5.查看top 相关进程详细

pgrep java | xargs ps -u —pid

6.全局搜索

grep -nr content_list2

7.查看 当前文件夹的大小(递归查询大小)

du -h --max-depth=1

8.linux 合并zip分卷

zip -F file.zip --out file-large.zip

9.mysql导入.sql.gz 压缩数据库文件

zcat < [Database].sql.gz | mysql -u root -p Database

 

添加新评论

This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.

图形验证
键入显示在图片中的字符
分类