文章分类 -  Linux

[转载] 如何解压 GZ 文件
摘要:Gzip 是一个流行的压缩算法,它可以在保持文件模式,归属,时间戳的前提下,压缩文件大小。这个算法经常被用来压缩网页元素,以便更快加载网页页面。 按照惯例,使用 gzip 压缩的文件通常以 .gz 或者 .z 结尾。 本文解释如何打开(或者解压缩).gz 文件。 一、解压 gz 文件在 Linux 阅读全文
posted @ 2022-09-19 15:14 51core 阅读(2835) 评论(0) 推荐(0)
yum 工具
摘要:阅读原文:https://www.cnblogs.com/linuxws/p/11989672.html 安装及升级本地程序包: yum localinstall rpmfile1 [rpmfile2] [...] (用install替代) yum localupdate rpmfile1 [rpm 阅读全文
posted @ 2022-02-11 18:43 51core 阅读(81) 评论(0) 推荐(0)
curl命令详解
摘要:引用自http://blog.csdn.net/wh211212/article/details/54285921 命令:curl 在Linux中curl是一个利用URL规则在命令行下工作的文件传输工具,可以说是一款很强大的http命令行工具。它支持文件的上传和下载,是综合传输工具,但按传统,习惯称 阅读全文
posted @ 2021-11-28 22:27 51core 阅读(417) 评论(0) 推荐(0)
SUSE 配置sendmail
摘要:阅读原文:运维网 https://www.yunweiku.com/thread-127671-1-1.html 具体步骤如下: 1、使用rpm命令是否有安装Sendmail软件 suining:~ # rpm -qa|grep sendmail sendmail-devel-8.12.10-162 阅读全文
posted @ 2021-10-20 09:46 51core 阅读(190) 评论(0) 推荐(0)
修改系统时区
摘要:查看系统时区ll /etc/localtime修改系统时区ln -sf /usr/share/zoneinfo/Asia/Beijing /etc/localtime 另外,可以安装ntp同步服务,从阿里云、华为云、微软等各个公知的时间服务器同步时间。 阅读全文
posted @ 2021-09-18 14:38 51core 阅读(37) 评论(0) 推荐(0)
tar打包且排除某个文件
摘要:场景 想要将以前的程序打包下来,但是发现有log日志,而且比较大,有几G大。 解决思路打包的时候,将某些文件夹给排除掉,只打包自己想要的文件。 解决方法使用tar命令来进行打包,并使用-exclude这个参数来排除一个文件夹。如果存在多个排除文件夹,就要写多个参数。 示例tar -zcvf sche 阅读全文
posted @ 2021-09-07 20:37 51core 阅读(1241) 评论(0) 推荐(0)
Linux shell中2>&1的含义解释
摘要:阅读原文:https://blog.csdn.net/zhaominpro/article/details/82630528 A. 首先了解下1和2在Linux中代表什么在Linux系统中0 1 2是一个文件描述符 名称 代码 操作符 Java中表示 Linux 下文件描述符(Debian 为例) 阅读全文
posted @ 2021-09-07 20:31 51core 阅读(130) 评论(0) 推荐(0)
rsync简要配置
摘要:rysnc 常见问题:https://www.cnblogs.com/wang-xd/p/6551402.html #### 服务端配置 服务端配置文件 /etc/rsyncd.conf: uid = k8sgid = k8suse chroot = nomax connections = 2000 阅读全文
posted @ 2021-08-30 17:21 51core 阅读(68) 评论(0) 推荐(0)
CURL 发送POST请求
摘要:curl -H "Content-Type: application/json" -X POST -d '{"user_id": "123", "coin":100, "success":1, "msg":"OK!" }' "http://192.168.0.1:8001/test"参数 内容-H 阅读全文
posted @ 2021-08-17 21:16 51core 阅读(48) 评论(0) 推荐(0)
tr命令
摘要:语法:# tr --help Usage: tr [OPTION]... SET1 [SET2]Translate, squeeze, and/or delete characters from standard input, writing to standard output. -c, -C, 阅读全文
posted @ 2021-08-05 16:47 51core 阅读(94) 评论(0) 推荐(0)
Linux /etc/profile文件详解
摘要:阅读原文:https://blog.csdn.net/weixin_38233274/article/details/80092837 Linux /etc/profile文件的改变会涉及到系统的环境,也就是有关Linux环境变量的东西,学习Linux要了解Linux profile文件的相关原理, 阅读全文
posted @ 2021-08-05 12:35 51core 阅读(2328) 评论(0) 推荐(0)
setfacl 和 getfacl
摘要:setfacl -m d:u:tuser:rwx /data/testsetfacl -R -m u:tuser:rwx /data/test getfacl /data/test setfacl 命令的常用用法 阅读原文:https://www.cnblogs.com/reachos/p/8717 阅读全文
posted @ 2021-08-03 21:08 51core 阅读(251) 评论(0) 推荐(0)
set和unset
摘要:set和unset,不支持 --help 查询用法:set: usage: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]unset: usage: unset [-f] [-v] [name ...] 阅读原文:https://ww 阅读全文
posted @ 2021-08-03 19:37 51core 阅读(327) 评论(0) 推荐(0)
linux下source命令使用详解
摘要:https://www.jb51.net/article/103657.htm Linux Source命令及脚本的执行方式解析 当我修改了/etc/profile文件,我想让它立刻生效,而不用重新登录;这时就想到用source命令,如:source /etc/profile对source进行了学习 阅读全文
posted @ 2021-08-02 15:54 51core 阅读(1589) 评论(0) 推荐(0)
GNU parallel
摘要:阅读原文:http://about.uuspider.com/2015/09/22/parallel.html 参考:Tutorial, parallel 指南, parallel man & examples, parallel 示例, 安装 输入 占位符 CSV数据导入 输出 并行控制 在一台或 阅读全文
posted @ 2021-07-29 21:06 51core 阅读(295) 评论(0) 推荐(0)
shell脚本执行错误 $'\r':command not found
摘要:阅读原文:https://www.cnblogs.com/manhelp/p/11277584.html 存现这种错误是因为 执行的shell脚本是在windows下编写的,每行结尾是\r\n,而Unix 行结束符是\n 所以在Linux下执行时系统会认为 \r 是一个字符,所以运行错误,需要把文件 阅读全文
posted @ 2021-07-05 18:37 51core 阅读(64) 评论(0) 推荐(0)
Shell 语言中的if条件判断讲解
摘要:一、if的基本语法: if [ command ]; then 符合该条件执行的语句elif [ command ]; then 符合该条件执行的语句else 符合该条件执行的语句fi ## 开启选项[ -o OPTIONNAME ] 如果 shell选项 “OPTIONNAME” 开启则为真。 二 阅读全文
posted @ 2021-07-05 18:24 51core 阅读(1100) 评论(0) 推荐(0)
Sed 命令完全指南
摘要:阅读原文:https://linux.cn/article-10232-1.html sed 保持空间和模式空间 sed基本用法 https://linuxhandbook.com/sed-command-basics/ 阅读全文
posted @ 2021-06-29 18:21 51core 阅读(73) 评论(0) 推荐(0)
Linux中的basename和dirname命令
摘要:1. dirname # dirname --helpUsage: dirname [OPTION] NAME...Output each NAME with its last non-slash component and trailing slashesremoved; if NAME cont 阅读全文
posted @ 2021-06-29 14:41 51core 阅读(355) 评论(0) 推荐(0)
使用 ripgrep 通过正则快速查找文件内容
摘要:阅读原文:https://einverne.github.io/post/2019/09/ripgrep-recursively-searches-directories-using-regex-pattern.html ripgrep(简称 rg),是一个用 Rust 实现的命令行搜索工具,可以通 阅读全文
posted @ 2021-06-29 11:09 51core 阅读(3528) 评论(0) 推荐(0)