随笔分类 -  linux

1 2 3 4 5 ··· 15 下一页
相关
摘要:日常部分数据以 txt 的文件格式提供,为避免入库之后再进行统计的麻烦,故学习 shell 进行处理,减少工作量。 1.样例数据 # test.txt YD5Gxxx|6618151|6825449073|6476534190|36251|超级会员|0 YD5Gxxx|8968336|1445546 阅读全文
posted @ 2023-03-19 03:49 MR__Wang 阅读(800) 评论(0) 推荐(0) 编辑
摘要:简介: :1,$ s/^[0-9]\{1,\}//g :% s/^[0-9]\{1,\}//g :18,200 s/^/#/g :19,28 s/^#//g :1,$ s/^[0-9]\{1,\}//g :% s/^[0-9]\{1,\}//g :18,200 s/^/#/g :19,28 s/^# 阅读全文
posted @ 2023-01-07 03:24 MR__Wang 阅读(131) 评论(0) 推荐(0) 编辑
摘要:介绍 Openvpn 是个非常强大的工具,默认的参数已经足够对付大多数场景了。由于某些原因,我只需要某些 ip 走 Openvpn 的线路,这就需要自定义路由了。 Openvpn 路由 配置 主要由 route-nopull、vpn_gateway、net_gateway 三个参数决定 route- 阅读全文
posted @ 2022-12-17 14:50 MR__Wang 阅读(2) 评论(0) 推荐(0) 编辑
摘要:Issue When configure nginx 1.19.0, run the commands. ./configure --prefix=/opt/nginx-1.19.0 Copy But the following error occurs. checking for PCRE lib 阅读全文
posted @ 2022-11-07 12:37 MR__Wang 阅读(1410) 评论(0) 推荐(0) 编辑
摘要:ubuntu 每隔一秒执行一次crontab 文件/etc/crontab 增加一下内容 * * * * * root /bin/bash -c 'for i in {1..60}; do bash /data/hello.sh;sleep 1; done' 阅读全文
posted @ 2022-10-16 17:40 MR__Wang 阅读(104) 评论(0) 推荐(0) 编辑
摘要:将window下的文本文件上传到linux上,在读取数据文件时,在每一行数据后会出现^M字符。 为什么会出现这种情况呢: 因为windows、linux、os系统的换行符标准不同: 先了解下概念,回车:用“\r”表示,ASCII码中的“代码”为CR,意义是将光标移到当前行的首位;换行:用“\n”表示 阅读全文
posted @ 2022-09-26 23:37 MR__Wang 阅读(1526) 评论(0) 推荐(0) 编辑
摘要:showmount命令用于查询NFS服务器的相关信息 # showmount --help Usage: showmount [-adehv] [--all] [--directories] [--exports] [--no-headers] [--help] [--version] [host] 阅读全文
posted @ 2022-08-19 14:38 MR__Wang 阅读(1190) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/weixin_43790540/article/details/104848610 阅读全文
posted @ 2022-06-15 20:44 MR__Wang 阅读(259) 评论(0) 推荐(0) 编辑
摘要:ss 命令比 netstat 好用的 socket 统计信息,iproute2 包附带的另一个工具,允许你查询 socket 的有关统计信息。 ss 命令安装: -bash/zsh: ss: command not found #Debian apt-get install iproute2 #Ub 阅读全文
posted @ 2022-06-12 17:28 MR__Wang 阅读(490) 评论(0) 推荐(0) 编辑
摘要:我们想通过ssh访问github或者gitee的时候,都需要用Git生成密钥,对应的的命令是: ssh-keygen -t rsa -C "你的邮箱地址" 或者 ssh-keygen -t rsa -b 4096 -C "你的邮件地址" 命令对应相关解释如下: sshSSH 为 Secure She 阅读全文
posted @ 2022-05-22 10:58 MR__Wang 阅读(1506) 评论(0) 推荐(0) 编辑
摘要:只需要注释下面的默认网关,然后添加一条路由到你服务器内网的即可,其它都不用动 配置文件: server.conf #push “redirect-gateway def1 bypass-dhcp” #客户端网关使用openvpn服务器网关 push “route 172.16.202.0 255.2 阅读全文
posted @ 2022-05-06 10:23 MR__Wang 阅读(0) 评论(0) 推荐(0) 编辑
摘要:SELinux(Security-Enhanced Linux) 是美国国家安全局(NSA)对于强制访问控制的实现,是 Linux历史上最杰出的新安全子系统。 关闭SELinux 临时生效: 命令临时生效: setenforce 0 (临时生效可以直接用setenforce 0 ) 1 启用 0 告 阅读全文
posted @ 2022-04-21 20:02 MR__Wang 阅读(1309) 评论(0) 推荐(0) 编辑
摘要:故障现象:今天做rsync远程同步时,为了从备份源站点中使用免密方式同步文件,当时在发起端输入了以下命令, 提示了如下报错: 故障排查和解决方法:根据报错提示的英文语句进行翻译:密码文件不能被其他用户访问。原来是密码文件只能被属主读取和写入,不能被其他用户读取,这是不安全的!而创建的文件默认权限是6 阅读全文
posted @ 2022-04-09 13:59 MR__Wang 阅读(675) 评论(0) 推荐(0) 编辑
摘要:由于centos7原本就安装了Python2,而且这个Python2不能被删除,因为有很多系统命令,比如yum都要用到。 [root@VM_105_217_centos Python-3.6.2]# python Python 2.7.5 (default, Aug 4 2017, 00:39:18 阅读全文
posted @ 2022-04-07 14:42 MR__Wang 阅读(350) 评论(0) 推荐(0) 编辑
摘要:版本信息: CentOS版本:CentOS-7-x86_64-Minimal-1810 PostgreSQL版本: PostgreSQL 10.10, 64-bit 第一部分:PostgresSQL的安装 1、安装rpm文件 yum install https://download.postgres 阅读全文
posted @ 2022-04-02 19:24 MR__Wang 阅读(1411) 评论(0) 推荐(0) 编辑
摘要:.tgz是Linux系统下的压缩文件格式。 解压缩方法: gunzip filename.tgz 这一步将.tgz文件转换为.tar文件。 tar -xvf filename.tar 其中x表示解压,v表示解压、压缩过程可见,f表示压缩文件夹。 阅读全文
posted @ 2022-04-01 11:24 MR__Wang 阅读(8597) 评论(0) 推荐(0) 编辑
摘要:zip -rem folder.zip folder 用zip命令对文件夹进行加密。 -r 表示对文件夹进行加密,如果对文件进行加密,则不需要这个选项。 -e 表示加密。 -m 表示加密压缩后删除原有文件/文件夹。 folder.zip 表示加密压缩后的文件夹的名字,folder表示要加密压缩的文件 阅读全文
posted @ 2022-02-09 09:36 MR__Wang 阅读(1057) 评论(0) 推荐(0) 编辑
摘要:gitlab 12.3.5 安装卡在ruby_block[wait for redis service socket] action run 在安装gitlab的时候,安装完毕,执行sudo gitlab-ctl reconfigure,在/etc/gitlab/gitlab.rb文件的时候,会卡在 阅读全文
posted @ 2022-01-26 16:20 MR__Wang 阅读(1379) 评论(0) 推荐(0) 编辑
摘要:下载node阿里云镜像(推荐) 地址:https://npm.taobao.org/mirrors/node/latest-v14.x/ 选择自己要下载的版本,这里我选择的v14.6.0 cd /usr/local wget https://npm.taobao.org/mirrors/node/l 阅读全文
posted @ 2022-01-16 18:15 MR__Wang 阅读(702) 评论(0) 推荐(0) 编辑
摘要:scp是secure copy的简写,用于在Linux下进行远程拷贝文件的命令,和它类似的命令有cp,不过cp只是在本机进行拷贝不能跨服务器,而且scp传输是加密的。可能会稍微影响一下速度。当你服务器硬盘变为只读 read only system时,用scp可以帮你把文件移出来。另外,scp还非常不 阅读全文
posted @ 2022-01-05 23:48 MR__Wang 阅读(754) 评论(0) 推荐(0) 编辑

1 2 3 4 5 ··· 15 下一页
点击右上角即可分享
微信分享提示