informatique:linux:commandes_linux
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
informatique:linux:commandes_linux [2025/01/06 10:09] – [find] pteu | informatique:linux:commandes_linux [2025/08/04 12:58] (current) – [tar] pteu | ||
---|---|---|---|
Line 294: | Line 294: | ||
Pour modifier la date d' | Pour modifier la date d' | ||
<code bash> | <code bash> | ||
- | chage -E YYYY-MM-DD < | + | chage -E YYYY-MM-DD < |
</ | </ | ||
+ | ou lancer l' | ||
+ | <code bash> | ||
+ | chage < | ||
+ | </ | ||
=====chattr/ | =====chattr/ | ||
Line 544: | Line 547: | ||
=====diff===== | =====diff===== | ||
- | diff permet d' | + | diff permet d' |
- | < | + | < |
cd /tmp ; echo " | cd /tmp ; echo " | ||
diff toto titi | diff toto titi | ||
Line 553: | Line 556: | ||
> titi | > titi | ||
</ | </ | ||
+ | |||
+ | On peut ignorer des motifs avec l' | ||
Un patchfile c'est un fichier qui contient la sortie d'un diff : | Un patchfile c'est un fichier qui contient la sortie d'un diff : | ||
- | < | + | < |
diff -u toto titi > toto_titi.patch | diff -u toto titi > toto_titi.patch | ||
</ | </ | ||
Pour patcher toto avec les modifications de titi on utilise la commande **patch** avec le patchfile : | Pour patcher toto avec les modifications de titi on utilise la commande **patch** avec le patchfile : | ||
- | < | + | < |
patch -b toto toto_titi.patch | patch -b toto toto_titi.patch | ||
| | ||
Line 843: | Line 848: | ||
find . -regextype posix-egrep -iregex ' | find . -regextype posix-egrep -iregex ' | ||
- | # supprimer toutes ces maudites miniatures Windows : | + | # afficher puis supprimer |
- | find . -name Thumbs.db -exec rm {} \; | + | find . -name Thumbs.db |
# attribuer des permissions à tous les sous-répertoires contenus dans le répertoire pics : | # attribuer des permissions à tous les sous-répertoires contenus dans le répertoire pics : | ||
Line 1911: | Line 1916: | ||
=====NetworkManager===== | =====NetworkManager===== | ||
- | Utilitaire de configuration réseau utilisé par défaut sous Redhat/RockyLinux/feu CentOS. | + | Utilitaire de configuration réseau utilisé par défaut sous certaines distribution Linux comme Debian 12 actuellement (2025), mais ça évolue. |
+ | |||
+ | Il existe plusieurs interfaces pour amnipuler cet outil: | ||
+ | * **nmcli** en ligne de commande | ||
+ | * **nmtui** interface semi-graphique (s' | ||
+ | * **NetworkManager** sous Gnome, KDE ou tout autre Windows Manager | ||
+ | |||
+ | Pour voir quel service réseau gère la conf réseau sur votre Linux: | ||
+ | <code bash> | ||
+ | echo "Quel service gère le réseau sur cette machine ?" | ||
+ | if systemctl is-active --quiet NetworkManager; | ||
+ | echo " | ||
+ | elif systemctl is-active --quiet systemd-networkd; | ||
+ | echo " | ||
+ | elif [ -d /etc/netplan ]; then | ||
+ | echo " | ||
+ | else | ||
+ | echo "Aucun apparemment!" | ||
+ | fi | ||
+ | </ | ||
src: https:// | src: https:// | ||
Line 1918: | Line 1942: | ||
systemctl status NetworkManager | systemctl status NetworkManager | ||
- | # Editer fichier de conf | + | # Editer fichier de conf / |
vim / | vim / | ||
TYPE=Ethernet | TYPE=Ethernet | ||
Line 1945: | Line 1969: | ||
ip a | ip a | ||
ip route | ip route | ||
+ | </ | ||
+ | |||
+ | Quelques commandes de diagnostique: | ||
+ | <code bash> | ||
+ | nmcli device status | ||
+ | DEVICE | ||
+ | br0 bridge | ||
+ | docker0 | ||
+ | lo | ||
+ | enp1s0 | ||
+ | enp2s0 | ||
+ | wlp3s0 | ||
+ | veth8881b47 | ||
+ | |||
+ | nmcli connection show | ||
+ | NAME UUID TYPE DEVICE | ||
+ | br0 | ||
+ | docker0 | ||
+ | lo edd7c96b-1336-44f4-8106-1caf773d1d91 | ||
+ | br0 port 1 7f58ed28-4a46-47d9-8ef7-e32cc5663b76 | ||
+ | br0 port 2 920763f3-3e3e-46db-9231-09b1b58deeef | ||
+ | |||
+ | nmcli device wifi list | ||
+ | IN-USE | ||
+ | |||
+ | nmcli device show | ||
+ | GENERAL.DEVICE: | ||
+ | GENERAL.TYPE: | ||
+ | GENERAL.HWADDR: | ||
+ | GENERAL.MTU: | ||
+ | GENERAL.STATE: | ||
+ | GENERAL.CONNECTION: | ||
+ | GENERAL.CON-PATH: | ||
+ | IP4.ADDRESS[1]: | ||
+ | IP4.GATEWAY: | ||
+ | IP4.ROUTE[1]: | ||
+ | IP4.ROUTE[2]: | ||
+ | IP4.DNS[1]: | ||
+ | IP4.DOMAIN[1]: | ||
+ | IP6.ADDRESS[1]: | ||
+ | IP6.ADDRESS[2]: | ||
+ | IP6.GATEWAY: | ||
+ | IP6.ROUTE[1]: | ||
+ | IP6.ROUTE[2]: | ||
+ | IP6.ROUTE[3]: | ||
</ | </ | ||
=====nslookup===== | =====nslookup===== | ||
Line 2836: | Line 2905: | ||
Un outil d' | Un outil d' | ||
+ | |||
+ | Options courantes de création d' | ||
+ | * '' | ||
+ | * '' | ||
+ | * '' | ||
+ | * ''< | ||
<code bash> | <code bash> | ||
Line 2859: | Line 2934: | ||
tar cfz toto.tar --exclude-from exclude-fic.txt ./toto | tar cfz toto.tar --exclude-from exclude-fic.txt ./toto | ||
</ | </ | ||
- | |||
=====tee===== | =====tee===== | ||
informatique/linux/commandes_linux.1736158140.txt.gz · Last modified: 2025/01/06 10:09 by pteu