Linux 常用到的命令

1、按照文件所有属用户和名字查询

find -user mpsp -name \*.bin

2、根据string 字符串查找内容

more +/string test.txt

3、查找文件尾部 后200行内容

tail -200f test.log

 

4、查找文件系统可用空用

df -h (-h 以友好的方式展式)

5、查找特定目录的使用空间

df -h /dev

 

6、计算目录的大小

du -h -s /dev  (-h 以友好的方式展示单位, -s 计算整个目录的大小)

 

7、改变文件或目录的所属用户、所属组

chown -R mpsp group1

8、改变文件的读写权限

读r=4、写w=2、执行x =1

chmod 777 1.log

 9、远程拷贝文件

scp -r /usr/mpsp mpsp@10.10.178.206:/home.tmp

10、根据端口号查进程

netstat -anp|grep 6805

11、根据应用名查询进程

ps -ef |grep  应用名称

posted @ 2019-09-09 10:15  TesterDong  阅读(165)  评论(0编辑  收藏  举报