Uživatelské nástroje

Nástroje pro tento web


software:linux:commands

Toto je starší verze dokumentu!


1 tail

vypis logu v realnem case

tail -f /soubor

vyber ze souboru

tail -f /soubor | grep --line-buffered hledaneslovo
tail -f /soubor | stdbuf -o0 grep hledaneslovo

2 ssh key pro vzdalene prihlasovani klientu pres ssh

ssh rsa key generovani - nezadavat passphrase

ssh-keygen -t rsa

prekopirovani na server

ssh-copy-id user@ip_srv

3 ssh klice 2

server: jako root

ssh-keygen -t rsa

heslo nechame prazdne

scp /root/.ssh/id_rsa.pub uzivatel@nacilovemstroji:/var/tmp/id_rsa.pub.temp

cilovy stroj

mkdir /root/.ssh
touch /root/.ssh/authorized_keys
chmod 700 ~/.ssh
chmod 600 ~/.ssh/authorized_keys
cat /var/tmp/id_rsa.pub.temp >> ~/.ssh/authorized_keys
ln -f -s /home/zdroj /home/symlink

5 SED

sed -i 's/original/new/g' file.txt

-i = in-place (i.e. save back to the original file) s = the substitute command g = global (i.e. replace all and not just the first occurrence)

software/linux/commands.1544616703.txt.gz · Poslední úprava: 2018/12/12 13:11 autor: root