Command
Infos CPU
Section titled “Infos CPU”Affichage type processeur
Section titled “Affichage type processeur”cat /proc/cpuinfo | grep "model name"Nombre de coeur physique
Section titled “Nombre de coeur physique”grep "physical id" /proc/cpuinfo |sort -u |wc -lNombre de coeur logique
Section titled “Nombre de coeur logique”grep -c "processor" /proc/cpuinfoInfos démarrage
Section titled “Infos démarrage”Dernier reboot
Section titled “Dernier reboot”last reboot | head -1ou
who -bDernier shutdown
Section titled “Dernier shutdown”last -x|grep shutdown | head -1Compression/Décompression
Section titled “Compression/Décompression”Décompresser avec rebase
Section titled “Décompresser avec rebase”tar xvf 'file' --strip-components 5Tarball one-liner
Section titled “Tarball one-liner”tar xzf - -C ${HOME}/Tools k9s.exe < <(curl -Ls --cacert ${CERTS_FULL_CA_BUNDLE} ${K9S_URL})Tester une connection TCP
Section titled “Tester une connection TCP”SERVER=google.com PORT=80if (: </dev/tcp/$SERVER/$PORT) 2>/dev/nullthenprintf "succeeded \n"elseprintf "failed \n"fiTunnel SSH
Section titled “Tunnel SSH”Exemple d’un tunnel http pour mise a jour yum
Machine 1 : Source Machine 2 : cible (accès internet)
Machine 1 Dans /etc/yum.conf
proxy=socks5h://localhost:1080puis taper la commande suivante
ssh -D 1080 root@machine 2puis taper la commande désiré sur la machine 1 depuis un autre terminal (très important)
Option “downloadonly”
Section titled “Option “downloadonly””yum install --downloadonly --downloaddir='path' 'package'File System (visualisation)
Section titled “File System (visualisation)”Création fichier avec masque défini
Section titled “Création fichier avec masque défini”umask 022Affichage espace libre ou occupé
Section titled “Affichage espace libre ou occupé”Affichage espace occupé en Mo
Section titled “Affichage espace occupé en Mo”du -smTop 10 des plus gros fichiers
Section titled “Top 10 des plus gros fichiers”du -am . | sort -nr | head -10Tri sur la 4eme colonne
Section titled “Tri sur la 4eme colonne”df -h | sort -nk4