informatique:linux:commandes_linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
informatique:linux:commandes_linux [2019/04/05 09:16] – [ping] fping pteu | informatique:linux:commandes_linux [2019/07/04 09:01] – ntp pteu | ||
---|---|---|---|
Line 1710: | Line 1710: | ||
Permet d' | Permet d' | ||
- | | + | <code bash> |
- | | + | nslookup google.fr |
- | | + | |
- | + | | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | Cet outil est " | + | |
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | # pour interroger un serveur (ici 10.1.1.24) en particulier : | ||
+ | nslookup google.fr 10.1.1.24 | ||
+ | # utiliser nslookup en mode interactif | ||
+ | nslookup | ||
+ | > server 10.1.1.24 | ||
+ | Default server: 10.1.1.24 | ||
+ | Address: 10.1.1.24# | ||
+ | > google.fr | ||
+ | Server: | ||
+ | Address: | ||
+ | |||
+ | Non-authoritative answer: | ||
+ | Name: | ||
+ | Address: 216.58.209.227 | ||
+ | </ | ||
+ | |||
+ | Cet outil est " | ||
+ | |||
+ | |||
+ | =====NTP===== | ||
+ | |||
+ | NTP est le protocole de synchronisation d' | ||
+ | |||
+ | / | ||
+ | <code bash> | ||
+ | # spécification des serveurs sur lesquels se synchroniser | ||
+ | pool 0.fr.pool.ntp.org iburst | ||
+ | pool 0.ch.pool.ntp.org iburst | ||
+ | pool 0.debian.pool.ntp.org iburst | ||
+ | pool 1.debian.pool.ntp.org iburst | ||
+ | pool 2.debian.pool.ntp.org iburst | ||
+ | pool 3.debian.pool.ntp.org iburst | ||
+ | |||
+ | # si besoin, préciser les clients qui peuvent se synchroniser sur nous | ||
+ | restrict 127.0.0.1 | ||
+ | restrict ::1 | ||
+ | </ | ||
+ | |||
+ | Forcer la mise à jour de la date sur un serveur en particulier : '' | ||
+ | |||
+ | Vérifier le bon fonctionnement : | ||
+ | <code bash> | ||
+ | ntpq -p | ||
+ | | ||
+ | ============================================================================== | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | | ||
+ | # | ||
+ | -178.249.167.0 ( 195.66.241.2 | ||
+ | *eudyptula.init7 162.23.41.10 | ||
+ | -smtp1.xipalia.c 193.190.230.65 | ||
+ | -bart.nexellent. 194.242.34.149 | ||
+ | # | ||
+ | # | ||
+ | # | ||
+ | -tick.ntp.infoma .GPS. 1 u | ||
+ | +sunflower.spide 145.238.203.14 | ||
+ | -ip139.ip-5-196- 145.238.203.14 | ||
+ | +cluster009.lino 193.190.230.66 | ||
+ | # | ||
+ | -2001: | ||
+ | +2001: | ||
+ | x78.192.0.158 (c .DCFa. | ||
+ | # | ||
+ | # | ||
+ | </ | ||
=====passwd===== | =====passwd===== | ||
Line 2024: | Line 2093: | ||
* Afficher les lignes de 2 à 5 d'un fichier ; alternative : afficher les lignes de 2 jusqu' | * Afficher les lignes de 2 à 5 d'un fichier ; alternative : afficher les lignes de 2 jusqu' | ||
- | <code bash>sed -n ' | + | <code bash> |
- | <code bash>sed -n ' | + | sed -n ' |
+ | sed -n ' | ||
+ | </ | ||
* Supprimer les lignes contenant toto dans le fichier toto.txt : | * Supprimer les lignes contenant toto dans le fichier toto.txt : | ||
<code bash>sed -i '/ | <code bash>sed -i '/ | ||
+ | |||
+ | * Supprimer les lignes vides | ||
+ | <code bash>sed '/ | ||
* supprimer ('' | * supprimer ('' | ||
Line 2337: | Line 2411: | ||
Le port (ici 80) est facultatif (par défaut 23). | Le port (ici 80) est facultatif (par défaut 23). | ||
+ | ====Envoi d'un mail==== | ||
+ | Pour envoyer un mail en SMTP via l' | ||
+ | <code bash> | ||
+ | # lancer l' | ||
+ | $ telnet | ||
+ | |||
+ | telnet> open 10.1.1.55 25 | ||
+ | Trying 10.1.1.55... | ||
+ | Connected to 10.1.1.55. | ||
+ | Escape character is ' | ||
+ | 220 exemple.fr ESMTP Server Ready. Tue, 9 Apr 2019 14:39:14 +0200 | ||
+ | |||
+ | EHLO toto | ||
+ | 250-exemple.fr Hello client.exemple.fr [10.1.2.201], | ||
+ | 250-ENHANCEDSTATUSCODES | ||
+ | 250-PIPELINING | ||
+ | 250-EXPN | ||
+ | 250-VERB | ||
+ | 250-8BITMIME | ||
+ | 250-SIZE 25000000 | ||
+ | 250-DSN | ||
+ | 250-ETRN | ||
+ | 250-DELIVERBY | ||
+ | 250 HELP | ||
+ | |||
+ | MAIL from: | ||
+ | 250 2.1.0 toto@exemple.fr... Sender ok | ||
+ | |||
+ | RCPT to: | ||
+ | 250 2.1.5 dest@domaine.fr... Recipient ok | ||
+ | |||
+ | DATA | ||
+ | 354 Enter mail, end with " | ||
+ | |||
+ | Subject: Test de mail | ||
+ | Ceci est un test de msg | ||
+ | . | ||
+ | 250 2.0.0 x39CdEPw012136 Message accepted for delivery | ||
+ | |||
+ | QUIT | ||
+ | 221 2.0.0 exemple.fr closing connection | ||
+ | Connection closed by foreign host. | ||
+ | </ | ||
=====time===== | =====time===== | ||
informatique/linux/commandes_linux.txt · Last modified: 2024/04/05 06:58 by pteu