Show Menu
Cheatography

Red Hat Certified Engineer 8 Cheat Sheet (DRAFT) by

about Red Hat Certified Engineer 8 module

This is a draft cheat sheet. It is a work in progress and is not finished yet.

File & Document Manage

echo -n -e
use in shell script
date +"%F %H:%M:%S
show date and time
cat > >> file
Place or Add input into file
touch file
Create or Update File
ls -la/ld
Display all inform­ation about files/­Dir­ect­ories
mkdir -p direct­ory­-name
Create directory by
rm -rf file/d­ire­ctory
Forcefully remoce file/D­ire­ctory
rmdir
Delete empty directory
cp file1 file2 localpath
copy file1&file2 to path
cp/mv file1 file2
copy/mv file to file2
cp -r dir1 dir2
copy dir1 to dir2,c­reate dir2 if it doesn't exist
head tail more less file
Output contents of file
tail -f file
Output contents of file as it grows starting with the last 10 lines;­usual use in check for logs
>;>­>;<­;<<­;&­>;&>>
input & output redirect
[];*;'';\
match a single character in a range;­Matches any number of charac­ter­s;make char diable the meaning.
|;|grep
pipe ,on the left command output & right get the output into input
find path -name/size name/+­100000K
find files by name or gt 100M
grep;egrep pay file ;-e/i/v/n
Search for pay in files;­command options
xargs
Excute command lines from standard input.

vim edit

hjkl
turn left/u­p/d­own­/right
gg
go to head of line
G
go to last line
nG
go to N line
x
delete letter of the cursor
X
delete letter left of the cursor
u
undo;i­nit­ial­izing when hold on it
dd
delete the line of the cursor­;nd­d:d­elete the n line under the cursor­(in­cludle the line of sursor)
yy
copy the line of the cursor,nyy similar ndd
P/p
add the content of "­dd/­yy" above/­under the cursor
i/I
insert on the left/head of the line
a/A
insert on the right/the end of the line
o/O
add the new line under/­above line of sursor
:wq/w/­q/q­!/w­q!;:set nu/nonu
module of the end line;s­ave­&q­uit­/sa­ve/­qui­t/force save&­qui­t/d­isplay line numer;undo display the line number
/content
search content of the file;n search next;N search previous
:n1,n2­s/o­ldc­ont­ent­/ne­wco­nte­nt/­golbal
replace conten­t;:­1,$­s/o­ldc­ont­ent­/ne­wco­ntent/g