From 271d4ef931cb26ca611587f0add954441bfe4f64 Mon Sep 17 00:00:00 2001 From: David Hay <89824813+dave-hay@users.noreply.github.com> Date: Wed, 17 Nov 2021 23:16:34 -0800 Subject: [PATCH 1/3] Typo + General Formatting CTRAL+A > CTRL+A --- languages/bash.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/languages/bash.sh b/languages/bash.sh index ec74a11..6b7fcb1 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -46,7 +46,7 @@ CTRL+X then ( # start recording a keyboard macro CTRL+X then ) # finish recording keyboard macro CTRL+X then E # recall last recorded keyboard macro CTRL+X then CTRL+E # invoke text editor (specified by $EDITOR) on current command line then execute resultes as shell commands -CTRAL+A then D # logout from screen but don't kill it, if any command exist, it will continue +CTRL+A then D # logout from screen but don't kill it, if any command exist, it will continue BACKSPACE # deletes one character backward DELETE # deletes one character under cursor @@ -88,7 +88,7 @@ readlink # shows where a symbolic links points to tree # show directories and subdirectories in easilly readable file tree mc # terminal file explorer (alternative to ncdu) touch # creates or updates (edit) your file -mktemp -t # make a temp file in /tmp/ which is deleted at next boot (-d to make directory) +mktemp -t # make a temp file in /tmp/ which is deleted at next boot (-d to make directory) cat # prints file raw content (will not be interpreted) any_command > # '>' is used to perform redirections, it will set any_command's stdout to file instead of "real stdout" (generally /dev/stdout) more # shows the first part of a file (move with space and type q to quit) @@ -183,7 +183,7 @@ dig -x # reverses lookup host wget # downloads file netstat # Print network connections, routing tables, interface statistics, masquerade connections, and multicast memberships -time # report time consumed by command execution +time # report time consumed by command execution ############################################################################## From 45dc3252bbd208906173d1dd32f054b4dc2e551b Mon Sep 17 00:00:00 2001 From: VesitoDev <88315648+VesitoDev@users.noreply.github.com> Date: Mon, 29 Nov 2021 19:50:57 +0200 Subject: [PATCH 2/3] added ":w" to exiting --- tools/vim.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/vim.txt b/tools/vim.txt index 6aa912d..00c25c5 100644 --- a/tools/vim.txt +++ b/tools/vim.txt @@ -215,6 +215,7 @@ z= suggest word :q quit Vim. This fails when changes have been made. :q! quit without writing. :cq quit always, without writing. +:w save without exiting. :wq write the current file and exit. :wq! write the current file and exit always. :wq {file} write to {file}. Exit if not editing the last From 08ad0bea19a9e678f01404c1ae3693fe7aea4dcd Mon Sep 17 00:00:00 2001 From: rparwaiz <78734549+rparwaiz@users.noreply.github.com> Date: Wed, 1 Dec 2021 17:11:42 +0000 Subject: [PATCH 3/3] Update bash.sh --- languages/bash.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index 6b7fcb1..21204cd 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -55,6 +55,7 @@ history # shows command line history !! # repeats the last command ! # refers to command line 'n' ! # refers to command starting with 'string' +esc :wq # exits and saves script exit # logs out of current session @@ -89,7 +90,10 @@ tree # show directories and subdirectories in easilly r mc # terminal file explorer (alternative to ncdu) touch # creates or updates (edit) your file mktemp -t # make a temp file in /tmp/ which is deleted at next boot (-d to make directory) -cat # prints file raw content (will not be interpreted) +cat # displays file raw content (will not be interpreted) +cat -n # shows number of lines +cat filename1 > filename2 # Copy filename1 to filename2 +cat filename1 >> filename2 # merge two files texts together any_command > # '>' is used to perform redirections, it will set any_command's stdout to file instead of "real stdout" (generally /dev/stdout) more # shows the first part of a file (move with space and type q to quit) head # outputs the first lines of file (default: 10 lines)