WebP 格式的命令工具
webp 是一个官方工具包,它不是单个软件,而是一整套处理 WebP 格式的命令工具集合。
brew install webp
# 有损(推荐,长截图用)
cwebp -q 80 input.png -o output.webp
# 无损(画质完全不变,体积稍大)
cwebp -lossless input.png -o output.webp
dwebp input.webp -o output.png
webp 是一个官方工具包,它不是单个软件,而是一整套处理 WebP 格式的命令工具集合。
brew install webp
# 有损(推荐,长截图用)
cwebp -q 80 input.png -o output.webp
# 无损(画质完全不变,体积稍大)
cwebp -lossless input.png -o output.webp
dwebp input.webp -o output.png
zsh 中使用单引号('),不对特殊符号进行解析,使用双引号(")会对特殊符号进行解析,如:$
docker rmi none
alias docker.rmi.none='docker rmi --force $(docker images -q --filter "dangling=true")'
sudo apt install moreutils
chatgpt install
Install mode: Log in to ChatGPT in the browser that pops up, and click
through all the dialogs, etc. Once that is achieved, exit and restart
this program without the 'install' parameter.
Provide a prompt for ChatGPT, or type /help or ? to list commands.
1> /quit
GoodBye!
VideoToolbox还包括一些命令行工具,例如vttool、vtenc、vtdecode等,可以在终端中使用。这些工具可以用来检查视频的属性、转码视频、将视频转换为图像序列等任务。
curl http://ip:port/
GET /?name=wjj HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: curl/7.61.1
Accept: */*
POST /users_by_json HTTP/1.1
Host: 127.0.0.1:8000
User-Agent: curl/7.61.1
Accept: */*
Content-Type: application/json
Content-Length: 36
{
"name": "wjj",
"age": 40
}
test.json
{ "stuff": { "that": [1,2,3], "isin": true, "json": "end"}}
jq . test.json
python -m json.tool test.json
$ df -h
Filesystem Size Used Avail Use% Mounted on
udev 126G 0 126G 0% /dev
tmpfs 26G 4.0M 26G 1% /run
/dev/sda2 548G 50G 471G 10% /
tmpfs 126G 0 126G 0% /sys/fs/cgroup
/dev/sda1 511M 7.9M 504M 2% /boot/efi
/dev/sdb1 2.0T 4.7G 1.9T 1% /data
$ df -h | tr a-z A-Z
......
下表显示了手册的 章节 号及其包含的手册页类型。
1 可执行程序或 shell 命令
2 系统调用(内核提供的函数)
3 库调用(程序库中的函数)
4 特殊文件(通常位于 /dev)
5 文件格式和规范,如 /etc/passwd
6 游戏
7 杂项(包括宏包和规范,如 man(7),groff(7))
8 系统管理命令(通常只针对 root 用户)
9 内核例程 [非标准]
......
man 7 man
man man.7
man -a passwd
--Man-- 下一页: passwd(5) [ 查看 (return) | 跳过 (Ctrl-D) | 退出 (Ctrl-C) ]
help cd
cd --help
ls --help
info cd
$ echo 'YWRtaW4=' | base64 -d
admin[username@hostname ~]$
$ echo 'admin' | base64
YWRtaW4K
printf 命令。$ printf 'admin' | base64
YWRtaW4=
-n 告诉 echo 不输出换行符。$ echo -n 'admin' | base64
YWRtaW4=
方法三:可以通过参数 -e 告诉 echo 启用反斜杠转义的解释。
cd "$(brew --repo)"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/brew.git
cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew-core.git
brew update
-c, --create Create a new archive. Arguments supply the names of the files to be archived.
-x, --extract, --get Extract files from an archive.
-z, --gzip, --gunzip, --ungzip Filter the archive through gzip(1).
-j, --bzip2 Filter the archive through bzip2(1).
-f, --file=ARCHIVE Use archive file or device ARCHIVE. If this option is not given, tar will first examine the environment variable `TAPE'. If it is set, its value will be used as the archive name. Otherwise, tar will assume the compiled-in default.
-t, --list List the contents of an archive.
-v, --verbose Verbosely list files processed.
排除所有的 yaml 文件
zip -r yolov5.zip yolov5/ -x "*yolo*.yaml"
只查看文件名 $ zipinfo -1 yolov5.zip yolov5/ yolov5/hubconf.py yolov5/tutorial.ipynb yolov5/Dockerfile yolov5/README.md yolov5/.dockerignore yolov5/models/ yolov5/models/common.py yolov5/models/export.py yolov5/models/yolov5s.yaml yolov5/models/yolo.py yolov5/models/init.py yolov5/models/experimental.py yolov5/models/yolov5m.yaml yolov5/models/yolov5l.yaml yolov5/models/yolov5x.yaml yolov5/LICENSE yolov5/.gitignore yolov5/test.py yolov5/train.py yolov5/weights/ yolov5/weights/download_weights.sh yolov5/requirements.
du - 估计文件空间使用量
-s, --summarize display only a total for each argument
-h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G)
在文件之间建立链接
ln [OPTION]... [-T] TARGET LINK_NAME
ln [OPTION]... TARGET
ln [OPTION]... TARGET... DIRECTORY
ln [OPTION]... -t DIRECTORY TARGET...
rm /var/www/ubuntu