随笔分类 -  Commands

1
摘要:How to prevent long lines truncated to screen width --no-pager don't pipe output into a pager SYSTEMD_LESS=FKMRX journactl -aexu kube-proxy /etc/sudoe 阅读全文
posted @ 2023-02-27 17:45 ascertain 阅读(28) 评论(0) 推荐(0) 编辑
摘要:rpm -i --root /mnt tree-pkg.src.rpm 阅读全文
posted @ 2023-02-16 19:37 ascertain 阅读(17) 评论(0) 推荐(0) 编辑
摘要:Symmetric key encryption is performed using the enc operation of OpenSSL. 查看可用encryption openssl enc -list Encrypt use -pass pass:minutia 指定密码 openssl 阅读全文
posted @ 2023-02-07 11:03 ascertain 阅读(22) 评论(0) 推荐(0) 编辑
摘要:https://serverfault.com/questions/729025/what-are-all-the-flags-in-a-dig-response flags: +qr +noqr toggles the display of the query message as it is s 阅读全文
posted @ 2023-02-02 19:14 ascertain 阅读(24) 评论(0) 推荐(0) 编辑
摘要:ip link: ip link set dev <ifname> name <NAME> 网卡down时, 可改名 ip addr: ip addr add dev tun0 10.1.1.1/24 broadcast 10.1.1.255 ip route: ip route add 1.1.1 阅读全文
posted @ 2023-02-02 17:43 ascertain 阅读(218) 评论(0) 推荐(0) 编辑
摘要:commands: echo -e 'GET / HTTP/1.0\r\n\r\n' | ncat x.com 80 阅读全文
posted @ 2023-02-02 13:07 ascertain 阅读(98) 评论(0) 推荐(0) 编辑
摘要:-f filename Take password to use from file sshpass -f password ssh intrinsic pmap --version -d number Use number as file descriptor for getting passwo 阅读全文
posted @ 2023-01-27 21:58 ascertain 阅读(45) 评论(0) 推荐(0) 编辑
摘要:'@anaconda' means that the package was installed by the Anaconda installer. dnf upgrade --repo update* --exclude kernel* 下载源码rpm包 dnf download --sourc 阅读全文
posted @ 2023-01-25 16:10 ascertain 阅读(187) 评论(0) 推荐(0) 编辑
摘要:Operation mode: -A --catenate concatenate 追加模式, 不能是压缩的 tar -A a.tar -vf b.tar 追加a.tar到b.tar后面 -c --create 创建模式, 目录默认递归, --no-recursion不对目录递归 tar cf c. 阅读全文
posted @ 2023-01-24 15:59 ascertain 阅读(112) 评论(0) 推荐(0) 编辑
摘要:-u -o nounset Treat unset variables as an error when substitutin -e -o errexit Exit immediately if a command exits with a non-zero status 阅读全文
posted @ 2023-01-09 00:52 ascertain 阅读(19) 评论(0) 推荐(0) 编辑
摘要:readlink 默认检查参数是否存在, realpath不会检查 readlink 直接读取非symlink报错, 读取symlink只解析第一级symlink realpath 可直接解析symlink和非symlink, 解析symlink, 会解析所有symlink readlink -f 阅读全文
posted @ 2023-01-08 12:14 ascertain 阅读(139) 评论(0) 推荐(0) 编辑
摘要:#!/usr/bin/env bash #while getopts a:b name; do # echo name: "$name", OPTARG: "$OPTARG", OPTIND: $OPTIND, OPTERR: "$OPTERR" #done echo "$*" echo "$@" 阅读全文
posted @ 2022-11-09 18:21 ascertain 阅读(25) 评论(0) 推荐(0) 编辑
摘要:(49条消息) linux详解sudoers_独壹@无贰的博客-CSDN博客_sudoers 阅读全文
posted @ 2022-11-02 20:47 ascertain 阅读(31) 评论(0) 推荐(0) 编辑
摘要:ProxyCommand: 阅读全文
posted @ 2022-10-17 12:42 ascertain 阅读(32) 评论(0) 推荐(0) 编辑
摘要:1.通过进程替换 #!/bin/bash expect <(cat <<-delimiter set timeout 3 spawn ssh -l root 192.168.8.12 expect { "password" { send "exuberant\n" } } interact deli 阅读全文
posted @ 2022-09-28 19:34 ascertain 阅读(64) 评论(0) 推荐(0) 编辑
摘要:--directory install 默认 给dest 加入执行权限 -b 无参 备份 --backup -p --preserve-timestamps 保留源文件时间戳 -D --target-directory 指定目标目录, 必须存在 阅读全文
posted @ 2021-08-16 16:01 ascertain 阅读(815) 评论(0) 推荐(0) 编辑
摘要:prepare --file-system 显示 文件 所在 file-system信息 只要是同一个文件系统 以上单位都相同 查看/boot下的文件信息 /boot分区下的所有文件 可以获取各种文件信息, 方便脚本编程 我们甚至可在python等直接调用stat获取信息 stat可获取selinu 阅读全文
posted @ 2021-08-06 15:48 ascertain 阅读(386) 评论(0) 推荐(0) 编辑
摘要:--delimiter --list-name--list-full --inverse --count --full --pgroup pgid 根据 pgid筛选 --group 依据 进程 real group ,即进程的 real group id筛选 --euid match by eff 阅读全文
posted @ 2021-08-06 11:10 ascertain 阅读(163) 评论(0) 推荐(0) 编辑
摘要:touch 属于 GNU核心包 touch 用来更新文件的 atime mtime, 如果 FILE 不存在,将会创建新文件,如果 指定 --no-create --no-dereference 则不会创建 symbolic links touch 修改文件时间戳 可使用 -d --date 或 - 阅读全文
posted @ 2021-08-05 11:13 ascertain 阅读(57) 评论(0) 推荐(0) 编辑
摘要:查找uid或gid为0的用户awk -F: '{if($3==0 || $4==0) {print $1}' /etc/passwd /etc/passwd中所有内容以空格分隔,而不以\n分隔awk -v ORS='' '{print $0}' /etc/passwd | awk -v RS=' ' 阅读全文
posted @ 2020-06-11 10:32 ascertain 阅读(240) 评论(0) 推荐(0) 编辑

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