2020年9月9日
摘要: Linux的文件基本权限有9个,分别是owenr、group、others(u、g、o)三种身份各自有自己的r、w和x,比如“rwxrwxrwx”, 就表示owener具有r、w、x权限,同样group和others同样具有r、w、x权限。 当文件权限为“rwxrwxrwx”时,分数是: owner 阅读全文
posted @ 2020-09-09 22:07 夏雨等秦天 阅读(209) 评论(0) 推荐(0) 编辑
摘要: 根据pid查看java进程占用的实际内存 jmap -heap pid 根据ps查看系统所有进程的信息 ps aux --sort -rss 阅读全文
posted @ 2020-09-09 21:56 夏雨等秦天 阅读(144) 评论(0) 推荐(0) 编辑
摘要: 查看当前目录下文件大小 [root@t-enter home]# lsautouser Python-3.7.2 Python-3.7.2.tgz test[root@t-enter home]# du -sh *40K autouser338M Python-3.7.222M Python-3.7 阅读全文
posted @ 2020-09-09 21:35 夏雨等秦天 阅读(188) 评论(0) 推荐(0) 编辑
摘要: tar 的压缩、解压命令 压缩 pwd /lsdir tar -zcvf dir.tar.gz dir (压缩目录包括文件命令)lsdir dir.tar.gz 解压 rm -rf dirtar -zxvf dir.tar.gz (解压命令)lsdir dir.tar.gz Zip 的压缩、解压命令 阅读全文
posted @ 2020-09-09 21:09 夏雨等秦天 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 删除/data下5天前的所有文件 # find /data -mtime +5 -type f -exec rm -rf {} \; 删除/data下5天前的所有 "cleanLog*"文件 # find /data -name "cleanLog*" -mtime +5 -type f -exec 阅读全文
posted @ 2020-09-09 21:03 夏雨等秦天 阅读(1290) 评论(0) 推荐(0) 编辑
摘要: 删除0字节文件 # find -type f -size 0 -exec rm -rf {} \; 阅读全文
posted @ 2020-09-09 20:45 夏雨等秦天 阅读(781) 评论(0) 推荐(0) 编辑
摘要: history : 打印历史命令 -c : 清空历史命令 -w : 把缓存中的命令写入历史命令保存文件~/.bash_history 历史命名文件bash_history中保存的与终端上history列出的并不完全相同。 history列出的不仅有文件中的,还有本次登录后执行的命令。需要正确注销后才 阅读全文
posted @ 2020-09-09 20:34 夏雨等秦天 阅读(230) 评论(0) 推荐(0) 编辑
摘要: linux服务器之间相互复制文件 copy 本地文件1.sh到远程192.168.9.10服务器的/data/目录下(king:用户名)# scp /etc/1.sh king@192.168.9.10:/data/copy远程192.168.9.10服务器/data/2.sh文件到本地/data/ 阅读全文
posted @ 2020-09-09 20:21 夏雨等秦天 阅读(181) 评论(0) 推荐(0) 编辑
摘要: 通过端口号查看占用的进程ID netstat -nap | grep 端口号 [root@t-enter ~]# netstat -nap | grep 8332 (Not all processes could be identified, non-owned process info will 阅读全文
posted @ 2020-09-09 20:16 夏雨等秦天 阅读(450) 评论(0) 推荐(0) 编辑
摘要: 插入(insert)模式i 光标前插入I 光标行首插入a 光标后插入A 光标行尾插入o 光标所在行下插入一行,行首插入O 光标所在行上插入一行,行首插入G 移至最后一行行首nG 移至第n行行首n+ 下移n行,行首n- 上移n行,行首:/str/ 从当前往右移动到有str的地方:?str? 从当前往左 阅读全文
posted @ 2020-09-09 17:41 夏雨等秦天 阅读(131) 评论(0) 推荐(0) 编辑