|
|
|
|
פורסם: 04/09/2017 - 06:51
נושא ההודעה: דף קיצורים ל Bash
|
הי,
למי שמתחיל עם Bash, כתבתי דף קצר עם פקודות בסיסיות והסברים (כותרת סקריפט, פקודות תנאי, לולאות, משתנים ופונקציות).
גירסא באנגלית:
https://www.ynonperek.com/2017/09/04/bash-cheat-sheet/
גירסא בעברית:
https://www.tocode.co.il/blog/2017-09-bash-cheatsheet
ינון
|
|
חזרה לתוכן הדיון |
פורסם: 04/09/2017 - 10:30
נושא ההודעה: Re: דף קיצורים ל Bash
|
היי ינון,
לפי מיטב הבנתי, דף קיצורים או בשמו האנגלי -
cheat-sheet
הוא דף קצר הניתן להדפסקה,
זה נראה כאילו הפוסט שלך כולל הרבה מאוד הסברים,
אם הייתי בוחר ללכת לצ׳יט שיט, הייתי מעדיף שהוא יראה כך:
https://gist.github.com/LeCoupa/122b12050f5fb267e75f
או הדף שהכנתי לעצמי בעבודה -
קוד: |
Move and Delete
Ctrl + a Jump to the start of the line
Ctrl + e Jump to the end of the line
Ctrl + k delete to end of command line
Ctrl + u delete to start of command line
Alt + f Move cursor one word forward
Alt + b Move cursor one word backwards
Alt + d Delete one word forward
Ctrl + w Delete one word backwards
Esc + backspace delete one word backwards - until special char
Misc
Ctrl + r Search the history backwards
Alt + . Yank last argument to previous command
Ctrl + l Clear screen
Ctrl + d Exit current shell
cd + - go to previous location (cd + minus)
pwd -P - actual working directory
echo $$ - get PID of the current shell ( useful in scripts )
echo $? - get exit status of the last command
command !$ - will run command with last argument of the previous command |
|
|
חזרה לתוכן הדיון |
פורסם: 04/09/2017 - 10:38
נושא ההודעה:
|
כן ידוע עדיין מתלבט לגבי השם... אולי ״Quickstart Guide״ יהיה יותר מתאים
|
|
חזרה לתוכן הדיון |
פורסם: 04/09/2017 - 13:34
נושא ההודעה:
|
Anonymous : | כן ידוע עדיין מתלבט לגבי השם... אולי ״Quickstart Guide״ יהיה יותר מתאים |
תתחדש על הבלוג
ובהצלחה בהעברת הקורסים.
|
|
חזרה לתוכן הדיון |
פורסם: 04/09/2017 - 16:45
נושא ההודעה:
|
מכל הקיצורים הללו אני משתמש רק בארבעה:
חיפוש פקודה אחורה, ביטול פעולה, חזרה למצב אחרון ודף חלק. כי זה מה שאני זוכר
ויש גם את זה:
קוד: | $ bind -P|grep "can be found"|sort | awk '{printf "%-40s", $1} {for(i=6;i<=NF;i++){printf "%s ", $i}{printf"\n"}}'
abort "\C-g", "\C-x\C-g", "\e\C-g".
accept-line "\C-j", "\C-m".
backward-char "\C-b", "\eOD", "\e[D".
backward-delete-char "\C-h", "\C-?".
backward-kill-line "\C-x\C-?".
backward-kill-word "\e\C-h", "\e\C-?".
backward-word "\e\e[D", "\e[1;5D", "\e[5D", "\eb".
beginning-of-history "\e<".
beginning-of-line "\C-a", "\eOH", "\e[1~", "\e[H".
call-last-kbd-macro "\C-xe".
capitalize-word "\ec".
character-search-backward "\e\C-]".
character-search "\C-]".
clear-screen "\C-l".
complete "\C-i", "\e\e".
complete-command "\e!".
complete-filename "\e/".
complete-hostname "\e@".
complete-into-braces "\e{".
complete-username "\e~".
complete-variable "\e$".
delete-char "\C-d", "\e[3~".
delete-horizontal-space "\e\\".
digit-argument "\e-", "\e0", "\e1", "\e2", "\e3", ...
display-shell-version "\C-x\C-v".
do-lowercase-version "\C-xA", "\C-xB", "\C-xC", "\C-xD", "\C-xE", ...
downcase-word "\el".
dynamic-complete-history "\e\C-i".
edit-and-execute-command "\C-x\C-e".
end-kbd-macro "\C-x)".
end-of-history "\e>".
end-of-line "\C-e", "\eOF", "\e[4~", "\e[F".
exchange-point-and-mark "\C-x\C-x".
forward-char "\C-f", "\eOC", "\e[C".
forward-search-history "\C-s".
forward-word "\e\e[C", "\e[1;5C", "\e[5C", "\ef".
glob-complete-word "\eg".
glob-expand-word "\C-x*".
glob-list-expansions "\C-xg".
history-expand-line "\e^".
insert-comment "\e#".
insert-completions "\e*".
insert-last-argument "\e.", "\e_".
kill-line "\C-k".
kill-word "\ed".
next-history "\C-n", "\eOB", "\e[B".
non-incremental-forward-search-history "\en".
non-incremental-reverse-search-history "\ep".
operate-and-get-next "\C-o".
possible-command-completions "\C-x!".
possible-completions "\e=", "\e?".
possible-filename-completions "\C-x/".
possible-hostname-completions "\C-x@".
possible-username-completions "\C-x~".
possible-variable-completions "\C-x$".
previous-history "\C-p", "\eOA", "\e[A".
quoted-insert "\C-q", "\C-v", "\e[2~".
re-read-init-file "\C-x\C-r".
reverse-search-history "\C-r".
revert-line "\e\C-r", "\er".
self-insert " ", "!", "\"", "#", "$", ...
set-mark "\C-@", "\e ".
shell-expand-line "\e\C-e".
start-kbd-macro "\C-x(".
tilde-expand "\e&".
transpose-chars "\C-t".
transpose-words "\et".
undo "\C-x\C-u", "\C-_".
unix-line-discard "\C-u".
unix-word-rubout "\C-w".
upcase-word "\eu".
yank "\C-y".
yank-last-arg "\e.", "\e_".
yank-nth-arg "\e\C-y".
yank-pop "\ey".
|
|
|
חזרה לתוכן הדיון |
|
|
|
|