You are on page 1of 2

========================================================

Lesson 1 : Installing Red Hat Enterprise Linux server


========================================================
Lesson 2 : Using Essential Tools
ctrl + r = repeat a command from history; inside you can search for a specific
command from history and continue with ctrl+r
=========================================================
The man command

#man -k <time> = list man section option for setting time


#man <time> = man page of command <time>
#man man pages = lists all man pages with specific commands and description
man -k <time> | grep <1> = search a specific command in a specific man page
/<STRING> press "n" to repeat search
#<date> -s "28 APRIL 2016 18:00:00"
#<date> --help = summary of all the option that can be used with a command
#<date> --help | less

-------------------------------------------------------------

UNDERSTADING VIM

INSERT MODE : a;o;i;ins


COMMAND MODE : ESC
EXIT : :wq!
dd = copy and remove line

p = paste
u = undo
ctrl r = recover undo
:%s/oldtext/newtext/g =replace text with another (g makes command to apply globaly)
v = visual mode > mark a selection and ...d = delete
gg = top of the document; g = last line ; $ = end of line; ^ = beggining of
line ; / = find text; ? = search text in opposite direction

v = visual mode
d = delete
u = undo
c = copy
p = paste
/<word>
?<word>
----------------------------------------------------------
USING GLOBING

Globbing is also known as using wildcards - used to match file names

complete overview in man 7 glob


# ls <host*> - shows all results that starts with host and finishes with character
# ls <?ost> - show all results that starts with any character finished by <ost>
#ls [hm]ost - show all results that starts either with h or with m and finishes in
ost
#ls [!hm] - show all results that finishes in ost but doesn't start with h and m
# ls -d p* = show files and dirs but not their contents
#ls ??st* = shows files and dirs with ST and 3rd and 4th position
#ls *[0-9* = all files and dirs that have a number somewhere
# ls -d [!a-d] = show all files and dirs that don't start with a,b, c, or d
------------------------------------------------------
I/O REDIRECTION AND PIPPING
< STDIN 0 EX : mail -s hi root < .

> >> STD OUT 1 EX : ls > myfile ; ls >> myfile

2 > STDERR 2 EX : grep hi * 2>dev/tty6

You might also like