[ INVIDIOUS https://yewtu.be/watch?v=NsK7OPlK94U ]
Voir aussi Bulle g1sn6Q
" The number of command combinations you can come up with on the Linux command-line is seemingly endless, and there are some real gems out there that you might... "
Efface le terminal
- "clear" / "reset" / ctrl+L
Navigation ( path cd )
( retour au dernier dossier )
- "cd -"
Marque page, retour au dossier...
( mémoriser un emplacement où revenir facilement )
pushd // popd
- pushd = ajouter curent.path (pwd) à un historique (pile/stack)
- popd = retourner au path enregistré dans la pile/stack
Cacher / Minimiser une application en Frontground
( retourner au terminal quand on est dans une Front app )
( tel = nano, vim... qui sortent du cli.terminal = page )
( sans perdre le contenu ni sauvegarder )
- Ctrl-Z ( minimize to background )
- "fg" ( forground the app )
une vidéo complète à ce sujet individious
Relancer un commande
- "!!" == commande précédente
- ex : sudo !!
Historique des commandes
Rechercher dans anciennes commandes( search reverse history ) <3
( j'utilise un plugin zsch )
- Ctrl+R
- "history" pour voir l'historique)
Utiliser commande dans l'History
( en l'appelant avec son chiffre )
( "!" : appelé "Bang" )
- !102
Ajouter une date à l'history
- HISTIMEFORMAT="%Y-%m-%d %T "
- HISTCONTROL dans .bashrc
Pause
- cmatrix
- F11 fullscreen
Supprime contenu de la commande
- Ctrl+U
Début de ligne
- Ctrl+A
Commandes successives
- sudo apt update; sudo apt upgrage
- ls -l && echo "hello world"
Différence
- ls /error/folder && echo "hello world"
-> && = Ne lance pas la seconde commande si échec !
-> ; = Passe à la suivante même si erreur de la première
TAIL
( afficher un txt/log mis à jour en direct ) ( live checking )
- tail /var/log
CAT
( afficher contenu d'un fichier )
- cat hello.txt
TRUNCATE
( coupe un fichier jusqu'à la ligne )
- truncate -s 2 hello.txt
Affichage en colonnes
- mount | column -t
Moi j'ajouterais au moins
- Ctrl+X = début fin ligne
- Ctrl+A = début ligne
- Ctrl+W = effacer ligne