From 6d88c3db057555799b405ee662581036d901b239 Mon Sep 17 00:00:00 2001 From: optmist2309 Date: Mon, 5 Oct 2020 00:47:41 +0530 Subject: [PATCH] bash cheatsheet updated --- languages/bash.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/languages/bash.sh b/languages/bash.sh index d77d54c..d864fb5 100644 --- a/languages/bash.sh +++ b/languages/bash.sh @@ -95,6 +95,8 @@ genscript # converts plain text files into postscript for pr dvips # prints .dvi files (i.e. files produced by LaTeX) grep # looks for the string in the files grep -r # search recursively for pattern in directory +head -n file_name | tail +n # Print nth line from file. +head -y lines.txt | tail +x # want to display all the lines from x to y. This includes the xth and yth lines. ############################################################################## @@ -111,7 +113,7 @@ cd .. # changes to the parent directory cd # changes directory cp -r # copy into including sub-directories pwd # tells you where you currently are - +cd ~ # changes to home. ############################################################################## # SSH, SYSTEM INFO & NETWORK COMMANDS