Directory Operations: The Below Are The Linux Commands Which Are Used Frequently in
Directory Operations: The Below Are The Linux Commands Which Are Used Frequently in
The below are the Linux commands which are used frequently in
Directory operations
mkdir vinaytech --creating directory
pwd --
CAT
Creating files
Cat Command:
Examples:
Crating:
Ctrl + d
Cat tdclass
Copying file
cp tdclass tdclass1
Remove file
rm tdclass1
Moving file
Mv tdclass1 tdclass2
WC
Wc -->Word count
Real time:
For Reconciliation and Unit testing
While performing ETL operations on files
TEE
Tee : Display and Redirect
Real Time:
Most frequently used command at the time of
executing utilities in Unix prompt / script
Examples:
sed 's/HYD/Hyderabad/' tdclass
etc...
AWK
AWK -->
Most powerful command for processing rows and columns in a file
Awk supports
A) Conditional Operators
B) Blocks
C) Loops
D) String functions
E) Associative Arrays
Examples:
GREP
GREP-->GLOBALLY SEARCH A REGULAR EXPRESSION AND PATTERN
Useful for identifying a partial / full string in the file.
r w x r w x r w x
Examples:
HEAD
HEAD-->DISPLAY FIRST LINES OF THE FILE
TAIL
TAIL-->DISPLAY LAST LINE OF A FILE
PS
PS COMMAND:(PROCESS STATUS COMMAND)
REAL TIME :
a) To identify processes running
b) To kill / abort /terminate /halt process
etc...
KILL
KILL command: Kills the process
VI EDITOR
VI EDITOR:(VIRTUAL INTERPRITER / INTERFACE)
Syn:
VI <filename> <Enter Key>
A or a
I or i
O or o
L H J K
TO GOTO 3 LINES BACK WE USE 3K / 3H / 3I
$-->END KEY
^ OR Q --> Home Key
x->deleting character
CTRL DD->CUT
CTRL P-->PASTE
: q! //Quitting