0% found this document useful (0 votes)
27 views7 pages

Capitolul II Using Essential Tools Utilizarea Instrumentelor Esențiale

The document discusses three types of commands in Linux: aliases, internal commands that are loaded into memory at boot, and external commands stored on disk. It also covers I/O redirection using <, >, 2>, and pipes (|) to process the output of one command as input to another. Common Linux commands and editors like vi are described along with helpful options.

Uploaded by

Cristian Zaharia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views7 pages

Capitolul II Using Essential Tools Utilizarea Instrumentelor Esențiale

The document discusses three types of commands in Linux: aliases, internal commands that are loaded into memory at boot, and external commands stored on disk. It also covers I/O redirection using <, >, 2>, and pipes (|) to process the output of one command as input to another. Common Linux commands and editors like vi are described along with helpful options.

Uploaded by

Cristian Zaharia
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 7

Capitolul II

Using Essential Tools


Utilizarea instrumentelor esențiale
Trei tipuri de comenzi:
 #aliasnewcommand = `oldcommand` Cu alias
definim comenzi asa cum dorim, ele oricum vor
executa comanda initiala. Alias se executa primele.
 Comanda interna - comenzi ce sunt parte din shell. Ele
se incarca la bootare in memorie si se executa la fel
din memorie.
 Comenzi externe - se afla pe disk. Ele se citesc de pe
disk.
I/O Redirection
 STDIN < (0<) - input: keyboard s.a.m.d.
 STDOUT > (1>) - output rezultate pe monitor sau
unde specifica noi
 STDERR 2> - output erori pe monitor sau
unde specificam noi
 > - Redirect STDOUT. If redirect to a file, the content of the file will
be owerwritten.
 >> - Redirect STDOUT. If redirect to a file, the output will be
appended.
 2> - redirect STDERR
 2>&1 - Redirect STDERR to same destination as STDOUT
 < - Redirects STDIN
 sort < filelist.txt - arata pe ecran lista de fisiere din filelist.txt in
ordine alfabetica
 >dev/null - va redirectiona mesajele catre nicaieri, in rezultat nu vom
vedea nimic pe ecran sau in alta parte.
Pipe

| - pipe se foloseste pentru a prelucra rezultatele


unei comenzi si a le oferi ca input pentru alta
comanda
 ls| less -rezultatul comenzii ls se transmite
comenzii less, ca rezultat obtinem o vizualizare in
pager.
Esc Switch from input to command mode

Vi editor - #vi i, a
o
Switch from command to input at (i) or after (a)
Open a new line and go to input mode
:wq Write current file and quit
:q! Quit the file (! - force to quit)
:w filename Write current file to new file
Dd Delete current liine
Yy Copy current line
P Paste current selection
V Visual mode which allow to select text block
U Undo last command
Ctrl + R Redo last undo
Gg Go to first line in doc
G Go to last line in doc
/text Search for text from cursor position forward
?text Search for text from cursor position backward
^ Go to first position in current line
$ Go to last position in current line
!ls Add the output of ls i the current file
:%s/old/ne Replace all ocurences of old with new
w/g
HELP

 # <command> --help
 #man <command> - arata manual despre o comanda
 #man -k = #apropos - arata date despre o comanda
 #man -k partition = #apropos partition - se arata toate comenzile ce contin info
despre partition

You might also like