Ssh

Client Generating a new SSH key 1 ssh-keygen -t rsa -b 4096 -C "your_email@example.com" Adding it to the ssh-agent 1 ssh-copy-id -i CUSTOMER root@XXX.XXX.XXX.XXX Copy for pasting your key 1 cat ~/.ssh/id_rsa.pub | xclip -sel clip . Putty Open logging Set private key Unable to load private key Run PuTTYgen.

Linux

LVM Logical Volume Manager (Linux) Default application 1 2 3 4 5 6 7 # determine a file's MIME type $ xdg-mime query filetype foo.pdf application/pdf # choose the default application for this file $ xdg-mime query default application/pdf # open a file with its default application $ xdg-mime default qpdfview.desktop application/pdf 7z 1 2 3 sudo apt install p7zip-full p7zip-rar 7z e file.7z 7z a OutputFile files_to_compress tar 1 2 tar jcvf - logs/ | split -b 1m - logs.

Systemd

Journal tail by service name 1 journalctl -p debug -f -u foo

Git

Usage 中文文件名乱码 1 git config --global core.quotepath false 创建新分支 1 2 git fetch git checkout -b local-branchname origin/remote_branchname 删除远程分支 1 git push origin --delete branchName 放弃更改 1 git checkout -f 放弃未提交的更改: 1 git reset --hard 放弃最近的 merge 1 git reset

Tar

Usage xz 1 tar -cf - foo/ | xz -9 -c - > foo.tar.xz