初学者在Linux命令窗口(终端)敲命令时,肯定觉得通过输入一串一串的字符的方式来控制计算是效率很低。 但是Linux命令解释器(Shell)是有很多快捷键的,熟练掌握可以极大的提高操作效率。 下面列出最常用的快捷键,这还不是完全版。
- 命令行快捷键:
- 常用:
- Ctrl L :清屏
- 常用:
- Ctrl M :等效于回车
| import random | |
| import string | |
| import time | |
| from selenium import webdriver | |
| from selenium.webdriver.chrome.webdriver import WebDriver | |
| from selenium.webdriver.common.by import By | |
| from selenium.webdriver.remote.webelement import WebElement | |
| LOGIN_PASSWORD = '' |
| urlencode() { | |
| # urlencode <string> | |
| old_lc_collate=$LC_COLLATE | |
| LC_COLLATE=C | |
| local length="${#1}" | |
| for (( i = 0; i < length; i++ )); do | |
| local c="${1:$i:1}" | |
| case $c in |
| // ==UserScript== | |
| // @name Copy Link for GitHub Issues and PRs | |
| // @namespace http://tampermonkey.net/ | |
| // @version 0.2 | |
| // @description Add a "Copy link" button to Github issue and pull requests | |
| // @author ye11ow, K8sCat <[email protected]> | |
| // @match https://github.com/* | |
| // @include https://github.com/*/issues/* | |
| // @include https://github.com/*/pull/* | |
| // @icon https://www.google.com/s2/favicons?domain=github.com |
| #!/bin/bash | |
| # server1 and server2 are defined in ~/.ssh/config | |
| users=$(ssh server1 "ls /home") | |
| for user in ${users}; do | |
| user_home_found=$(ssh server2 "ls /home" | grep "${user}") | |
| if [[ -n "${user_home_found}" ]]; then | |
| echo "user home already created: ${user}" | |
| continue | |
| fi |
| # What to do when mysqldump fails | |
| function report_mysqldump_fail() { | |
| cat $scratch/${filename}_raw.err >> $log | |
| mailx -s "mysqldump failed for DB $db_name on $HOSTNAME!!!" [email protected] < $log | |
| exit 2 | |
| } | |
| # How to report a step along the process | |
| function status_report() { | |
| message=$1 |
| $ ssh -vvv xxx-dev | |
| OpenSSH_9.0p1, LibreSSL 3.3.6 | |
| debug1: Reading configuration data /Users/k8scat/.ssh/config | |
| debug1: /Users/k8scat/.ssh/config line 4: Applying options for * | |
| debug1: /Users/k8scat/.ssh/config line 76: Applying options for xxx-dev | |
| debug1: Reading configuration data /etc/ssh/ssh_config | |
| debug1: /etc/ssh/ssh_config line 21: include /etc/ssh/ssh_config.d/* matched no files | |
| debug1: /etc/ssh/ssh_config line 54: Applying options for * | |
| debug2: resolve_canonicalize: hostname 113.13.120.21 is address | |
| debug3: expanded UserKnownHostsFile '~/.ssh/known_hosts' -> '/Users/k8scat/.ssh/known_hosts' |
| # Hello, and welcome to makefile basics. | |
| # | |
| # You will learn why `make` is so great, and why, despite its "weird" syntax, | |
| # it is actually a highly expressive, efficient, and powerful way to build | |
| # programs. | |
| # | |
| # Once you're done here, go to | |
| # http://www.gnu.org/software/make/manual/make.html | |
| # to learn SOOOO much more. |
| { | |
| "fields": [ | |
| "uuid", | |
| "owner_uuid", | |
| "team_uuid", | |
| "project_uuid", | |
| "reference_id", | |
| "reference_type", | |
| "type", | |
| "ext_id", |