![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Linux
式微 式微 胡不归
这个作者很懒,什么都没留下…
展开
-
shell读写管道文件
创建管道文件mkfifo test.pipe# write.shi=1while truedo i=$((i+1)) echo $i > test.pipe sleep 2sdone# read.shwhile truedo cat test.pipe sleep 3sdone可以同时有多个读和多个写在运行,实现消息分发功能。...原创 2021-03-08 23:28:40 · 686 阅读 · 0 评论 -
echo -e 识别转义,unicode
root@10-35-111-140:/$ echo -e \\u4e13\\u6ce8专注root@10-35-111-140:/$root@10-35-111-140:/$ echo -e 'a\bc'croot@10-35-111-140:/$ECHO(1) User ...原创 2019-09-16 19:01:32 · 738 阅读 · 0 评论 -
ssh -t
ssh -tman ssh ... -T Disable pseudo-terminal allocation. -t Force pseudo-terminal allocation. This can be used to execute arbitrary screen-based programs on a remote machine, ...原创 2019-09-16 18:49:51 · 3495 阅读 · 0 评论 -
Linux把内存挂载成硬盘提高读写速度
https://www.linuxidc.com/Linux/2011-09/42396.htm转载 2019-06-30 11:01:54 · 1021 阅读 · 0 评论 -
用户和用户组变成了数字
tar包解压后发现用户和用户组变成了数字,原因是没有这个ID对应的用户UID和用户组GID,手动创建即可[root@localhost postgres]# lltotal 4drwxr-xr-x 6 504 504 4096 Jun 9 09:34 pgsql[root@localhost postgres]# useradd -u 504 -d /home/postgres -g p...原创 2019-06-29 10:26:59 · 2690 阅读 · 0 评论 -
yum 配置源
本地安装CCProxy虚拟机/etc/yum.repos.d/环境下配置源,例如网易的源/etc/yum.repos.d/CentOS6-Base-163.repo网易源地址http://mirrors.163.com/.help/centos.html配置代理在yum.conf文件最后面加(修改)一行[root@root etc]# vi yum.confkeepcache=1 (改...原创 2019-06-29 10:18:51 · 89 阅读 · 0 评论 -
Linux内存Cache和Buffer理解
https://linux.cn/article-7310-1.htmlhttps://blog.csdn.net/lqglqglqg/article/details/82313966https://www.cnblogs.com/chenpingzhao/p/5161844.htmlhttps://www.cnblogs.com/sunqim16/p/6580388.html转载 2019-01-09 16:35:57 · 149 阅读 · 0 评论 -
linux CPU监控工具
https://www.cnblogs.com/arnoldlu/p/9462221.html转载 2019-01-09 10:19:29 · 649 阅读 · 0 评论 -
SSH互信
一、在SSH服务器所在机器上1、以root用户登录,更改ssh配置文件 /etc/ssh/sshd_config,去除以下配置的注释RSAAuthentication yes #启用rsa认证PubkeyAuthentication yes #启用公钥私钥配对认证方式AuthorizedKeysFile .ssh/authorized_keys #公钥文件路径2、重启SSH服务[...原创 2019-01-14 16:36:29 · 4602 阅读 · 0 评论 -
SSH连接慢问题解决
现在连接linux服务器一般都是使用SSH远程连接的方式。最近新装了一台服务器,发现telnet时速度很快,ping时一切也正常,但SSH连接的时候却很慢。经过网上资料查询,大致是有以下几种原因:1、SERVER的SSHD会去DNS查找访问的CLIENT IP的HOSTNAME,如果DNS不可用或者没有相关记录,就会消耗一段时间。2、在authentication gssapi-with-m...转载 2019-01-14 16:35:13 · 335 阅读 · 0 评论 -
Load average高排查
https://www.jianshu.com/p/3edc2c9f05e9 查CPU使用率比较高的线程小脚本:#!/bin/bashLANG=CPATH=/sbin:/usr/sbin:/bin:/usr/bininterval=1length=86400for i in $(seq 1 $(expr ${length} / ${interval}));do...转载 2018-12-28 14:43:38 · 601 阅读 · 0 评论 -
Linux查看硬件信息命令
Linux查看硬件信息命令https://www.cnblogs.com/cloudos/p/8416415.html转载 2018-12-17 14:13:11 · 302 阅读 · 0 评论 -
磁盘相关信息
读hdparm -Tt /dev/sda 写time dd if=/dev/zero bs=1024 count=1000000 of=/1Gb.file 磁盘坏道检测badblocks -v /dev/sda1 磁盘健康检测smartctl -a /dev/sda5原创 2018-12-07 15:28:02 · 125 阅读 · 0 评论 -
parted磁盘分区、格式化、挂载
parted分区[root@localhost ~]# parted /dev/sdbGNU Parted 3.1Using /dev/sdbWelcome to GNU Parted! Type 'help' to view a list of commands.(parted) mktable gpt #设置分区格式 ...原创 2018-12-07 15:25:09 · 3419 阅读 · 0 评论 -
Linux中修改环境变量及生效方法(永久、临时)环境变量查看
https://blog.csdn.net/u011630575/article/details/49839893https://www.cnblogs.com/hongzg1982/articles/2101792.html还是有点晕 待整理bashrc与profile的区别要搞清bashrc与profile的区别,首先要弄明白什么是交互式shell和非交互式shell,什么是l...转载 2018-11-06 16:27:26 · 1364 阅读 · 0 评论