Skriptimine 2017: Difference between revisions

From ICO wiki
Jump to navigationJump to search
No edit summary
No edit summary
Line 41: Line 41:
|print lines matching a pattern
|print lines matching a pattern
|http://www.skrenta.com/rt/man/grep.1.html
|http://www.skrenta.com/rt/man/grep.1.html
|grep 'error' /var/log/
|grep -R 'error' /var/log/*
|-
|-
|ls
|tail
|list directory contents
|output the last parts of file
|http://www.skrenta.com/rt/man/ls.1.html
|http://www.skrenta.com/rt/man/tail.1.html
|tail -f /var/log/syslog
|-
|-
|ls
|cat
|list directory contents
|concatenate files and print on the standard output
|http://www.skrenta.com/rt/man/ls.1.html
|http://www.skrenta.com/rt/man/cat.1.html
|cat /var/log/syslog
|-
|-
|ls
|man
|list directory contents
|format and display the on-line manual pages
|http://www.skrenta.com/rt/man/ls.1.html
|http://www.skrenta.com/rt/man/man.1.html
|man man
|}
|}

Revision as of 09:54, 6 February 2017

Hindamiskriteeriumid

Arvestuse saamiseks peab tudeng esitama järgmised tööd:

2 kodutööd
3+3 hinnangut teiste kodutöödele
Kaitstud praktikumide tööd
2 kontrolltööd

Labori keskkond

https://elab.itcollege.ee/users/sign_in

Labs -> Skriptimine 2017
Kasutaja: student
Parool: student

Linuxi käsud

Käsk Funktsioon Man link Näidis
cd Change Directory http://www.skrenta.com/rt/man/cd.1.html cd /var/log
ls list directory contents http://www.skrenta.com/rt/man/ls.1.html ls -lah /var/log
ps report process status http://www.skrenta.com/rt/man/ps.1.html ps -ef
grep print lines matching a pattern http://www.skrenta.com/rt/man/grep.1.html grep -R 'error' /var/log/*
tail output the last parts of file http://www.skrenta.com/rt/man/tail.1.html tail -f /var/log/syslog
cat concatenate files and print on the standard output http://www.skrenta.com/rt/man/cat.1.html cat /var/log/syslog
man format and display the on-line manual pages http://www.skrenta.com/rt/man/man.1.html man man