随笔分类 -  DevOps

摘要:只列出目录: ll -F | grep '/$' ls -F 选项append indicator ( one of */=>@| ) to entries,目录会被追加 "/" 后缀* 是可执行文件suffix= socket文件| FIFO管道文件> 进程间通信设备 ll | grep '^d' 阅读全文
posted @ 2020-11-27 16:01 ascertain 阅读(103) 评论(0) 推荐(0) 编辑
摘要:安装32位rar: 下载至/usr/src目录 wget http://www.rarlab.com/rar/rarlinux-3.8.0.tar.gz -directory-prefix=/usr/src 解压 tar xzvf rarlinux-3.8.0.tar.gz 其已经是编译完成的包,M 阅读全文
posted @ 2020-11-27 14:18 ascertain 阅读(468) 评论(0) 推荐(0) 编辑
摘要:7z的选项设计实在让人无语,只能说太难用 Usage: 7z <command> [<switches>...] <archive_name> [<file_names>...] Command: a 压缩 7z a bb.7z /etc/security # 带security目录 7z a bb 阅读全文
posted @ 2020-11-25 19:59 ascertain 阅读(690) 评论(0) 推荐(0) 编辑
摘要:shell没有专门的时间转换函数,更没有oop之类的类方法,不过操作时间还是很简单的 date:date 直接后跟格式化字符串默认显示当前时区的当前时间 %a abbreviated weekday 简写的weekday %A full weekday name 全写weekday %b abbre 阅读全文
posted @ 2020-11-25 14:40 ascertain 阅读(474) 评论(0) 推荐(0) 编辑
摘要:首先,Linux比其它操作系统更稳定更安全。理论上Linux是有可能被病毒侵害的。但实际上 Linux机器几乎不可能遭受病毒的攻击。所以我这里的问题是为什么要为Linux准备防病毒软件,为了更好理解,我准备了以下理由: Linux平台安装杀毒软件的原因: 从Linux平台扫描Windows驱动 通过 阅读全文
posted @ 2020-11-25 09:53 ascertain 阅读(4681) 评论(0) 推荐(0) 编辑
摘要:Linux: 文件分割 split: Usage: split [options] [Input] [Prefix] 默认prefix为x,需要指定Prefix来改写前缀 --suffix-length=N 后缀长度,默认为2 --additional-suffix=SUFFIX 每个子文件最后附加 阅读全文
posted @ 2020-11-12 19:11 ascertain 阅读(324) 评论(0) 推荐(0) 编辑
摘要:首选要查找占用大量磁盘空间的文件,基本是长久不清理的日志文件 du --exclude=/proc --total -sh /* | sort -hr find / ! -path '/proc*' -size +200M -print 通过上面两台命令可以快速找出大文件,但是不能贸然删除日志文件, 阅读全文
posted @ 2020-11-10 11:34 ascertain 阅读(227) 评论(0) 推荐(0) 编辑
摘要:Cygwin是Windows下模拟Linux环境的软件,最初由Cygnus Solutions研发,通过重新编译将Linux上的软件移植到Windows 官网: http://www.cygwin.com/ 1.安装Cygwin需要到官网下载安装包。在该网站首页的Current Cygwin DLL 阅读全文
posted @ 2020-11-09 20:21 ascertain 阅读(733) 评论(0) 推荐(0) 编辑
摘要:rsync Options: -v, --verbose 详细模式输出 -q, --quiet 精简输出模式 -c, --checksum 打开校验开关,强制对文件传输进行校验 -a, --archive 归档模式,表示以递归方式传输文件,并保持所有文件属性,等于 -rlptgoD -r, --re 阅读全文
posted @ 2020-10-26 19:43 ascertain 阅读(219) 评论(0) 推荐(0) 编辑
摘要:#下载fpm yum install ruby ruby-dev #切换gem源为国内源 gem sources --add https://gems.ruby-china.com/ --remove https://rubygems.org/ #下载fpm gem install -y fpm # 阅读全文
posted @ 2020-10-25 01:36 ascertain 阅读(170) 评论(0) 推荐(0) 编辑
摘要:at atd 等所有命令均由 at 包提供 默认只有/etc/at.deny ,此为黑名单 /etc/at.allow 为白名单,优先级高于 /etc/at.deny 当/etc/at.allow 和 /etc/at.deny 都不存在时,只有 root才能使用 at ,rpm包默认提供了空/etc 阅读全文
posted @ 2020-10-23 18:00 ascertain 阅读(152) 评论(0) 推荐(0) 编辑
摘要:一. 二、hosts.allow和hosts.deny支持哪些服务 2.1 hosts.allow和hosts.deny支持哪些服务 hosts.allow和hosts.deny规则的执行者为TCP wrappers,对应守护进程为tcpd;而tcpd执行依赖于程序使用了libwrap库。 也就是说 阅读全文
posted @ 2020-10-15 16:33 ascertain 阅读(1431) 评论(0) 推荐(0) 编辑
摘要:parted: mkpart PART-TYPE [FS-TYPE] START END PART-TYPE是指定PARTLABEL的,一般指定为primary,blkid中会显示当分区为gpt时,可以任意指定分区名称,msdos有限制 一般指定为primary 在mkpart操作之前必须有明确的P 阅读全文
posted @ 2020-10-14 17:45 ascertain 阅读(514) 评论(0) 推荐(0) 编辑
摘要:command > output.txt The standard output stream will be redirected to the file only, it will not be visible in the terminal. If the file already exist 阅读全文
posted @ 2020-10-13 14:14 ascertain 阅读(215) 评论(0) 推荐(0) 编辑
摘要:LV扩容 一、 LVM概述 在 Linux 系统中,我们经常使用 LVM (逻辑卷管理)的方式去管理和使用磁盘, LVM 可以动态扩容,给我们的使用带来了很多的便捷性 LVM结构图如下: image.png 物理卷(Physical Volume,PV) 指磁盘分区或从逻辑上与磁盘分区具有同样功能的 阅读全文
posted @ 2020-10-10 14:49 ascertain 阅读(1535) 评论(0) 推荐(0) 编辑
摘要:shell中 ! 叫做事件提示符,Event Designator,可以方便的引用历史命令,即history中记录的命令 !n 引用第n条命令 !-n 引导倒数第n条命令, !-1 引用倒数第一条命令 !! 同 !-1 !string 引用最近以string开始的命令 !$ 传递最后执行的命令参数 阅读全文
posted @ 2020-10-09 21:28 ascertain 阅读(716) 评论(0) 推荐(0) 编辑
摘要:In case you have multiple kernels installed in the system, you can boot from a specific kernel in case of a downgrade or any other requirement. Let’s 阅读全文
posted @ 2020-09-29 22:01 ascertain 阅读(156) 评论(0) 推荐(0) 编辑
摘要:最近遇到一个问题,需要在服务器上对域名进行泛解析,比如访问百度的域名统统解析到 6.6.6.6,然而发现 hosts 文件根本就不支持类似 *.baidu.com 的这种写法。 于是乎就在网上找了下资料,发现可以通过 Dnsmasq 来解决这个问题,原理其实就是本机的 DNS 指向 Dnsmasq 阅读全文
posted @ 2020-09-27 19:12 ascertain 阅读(1193) 评论(0) 推荐(0) 编辑
摘要:ps: ps在默认情况下,仅会列出与目前所在的bash shell有关的PID 排序 ps aux --sort=-pcpu # pcpu降序排列ps aux --sort=+pmem # pmem升序排列 定制显示选项 ps -e -o pid,user,pcpu,pmem,rss ps ax - 阅读全文
posted @ 2020-09-26 21:44 ascertain 阅读(195) 评论(0) 推荐(0) 编辑
摘要:Linux 中"-"有特殊的含义,比如在命令的后面加"-"表示后面跟的是选项。但是如何新建带名字中有"-",下面介绍三种方法,比如要新建 文件 "-a": 1、cd .>-a 2、vi -- -a 3、echo"">-a 上面三种方法都可以在当前目录下新建一个"-a" 文件 ,当然还可以有别的方法新 阅读全文
posted @ 2020-09-23 20:13 ascertain 阅读(4904) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示