issue132:c_c
Différences
Ci-dessous, les différences entre deux révisions de la page.
Les deux révisions précédentesRévision précédenteProchaine révision | Révision précédente | ||
issue132:c_c [2018/04/30 15:02] – d52fr | issue132:c_c [2018/05/02 19:19] (Version actuelle) – auntiee | ||
---|---|---|---|
Ligne 8: | Ligne 8: | ||
The @ indicates what DNS server it should use - omitting this will use your default DNS.** | The @ indicates what DNS server it should use - omitting this will use your default DNS.** | ||
+ | |||
+ | J'ai fréquemment écrit des articles sur les outils et les sites Web que je trouve utiles pour ma vie professionnelle. Cependant, il s'est passé longtemps depuis que j'ai ciblé les outils en ligne de commande (CLI), de sorte que j'ai pensé qu'il serait bien de revisiter ce sujet et de partager une liste à jour des commandes que j' | ||
+ | |||
+ | dig | ||
+ | |||
+ | Dig est un outil qui vous permet d' | ||
+ | |||
+ | dig @8.8.8.8 google.com | ||
+ | |||
+ | Le @ indique quel serveur DNS il faut utiliser, sans cela, il utilisera votre DNS par défaut. | ||
**time | **time | ||
Ligne 20: | Ligne 30: | ||
Most likely, everyone already knows this command - but if you’re looking for a domain’s IP, or just checking whether or not something responds, this is a tool I use every day. If Ping indicates to me that one domain isn’t responding while another is, then I’ll move onto something like downforeveryoneorjustme.com | Most likely, everyone already knows this command - but if you’re looking for a domain’s IP, or just checking whether or not something responds, this is a tool I use every day. If Ping indicates to me that one domain isn’t responding while another is, then I’ll move onto something like downforeveryoneorjustme.com | ||
+ | |||
ping www.google.com** | ping www.google.com** | ||
+ | |||
+ | time | ||
+ | |||
+ | Que vous soyez un programmeur, | ||
+ | |||
+ | time < | ||
+ | |||
+ | Remplacez < | ||
+ | |||
+ | ping | ||
+ | |||
+ | Très probablement, | ||
+ | |||
+ | ping www.google.com | ||
+ | |||
**lynx | **lynx | ||
Ligne 29: | Ligne 55: | ||
A few months ago, I switched from two monitors to a single ultra wide display. Previously I’d dedicate a single monitor to my terminal, but nowadays I have to split my display in order to have a comfortable size browser and terminal. While I can use i3 to vertically/ | A few months ago, I switched from two monitors to a single ultra wide display. Previously I’d dedicate a single monitor to my terminal, but nowadays I have to split my display in order to have a comfortable size browser and terminal. While I can use i3 to vertically/ | ||
+ | |||
+ | lynx | ||
+ | |||
+ | Lynx est un navigateur en ligne de commande. Bien qu'il ne soit pas un outil que j' | ||
+ | |||
+ | tmux | ||
+ | |||
+ | Il y a quelques mois, je suis passé de deux moniteurs à un seul avec un affichage ultra-large. Avant, j' | ||
**tmux -d -s “Session Name” < | **tmux -d -s “Session Name” < | ||
Ligne 37: | Ligne 71: | ||
Very often, I’ll have some configuration files, or small text files with notes or fixes I’ve hastily typed up. When looking for the correct files, I almost always use grep (or find). Grep is used to check the contents of a file, while find can be used to search for files by name, type, etc. You can also combine the two commands by executing a grep search on all results returned by find (see example below).** | Very often, I’ll have some configuration files, or small text files with notes or fixes I’ve hastily typed up. When looking for the correct files, I almost always use grep (or find). Grep is used to check the contents of a file, while find can be used to search for files by name, type, etc. You can also combine the two commands by executing a grep search on all results returned by find (see example below).** | ||
+ | |||
+ | tmux -d -s “Session Name” < | ||
+ | |||
+ | L' | ||
+ | |||
+ | grep ou find | ||
+ | |||
+ | Très souvent, j' | ||
**find . -name “*.py” -exec grep -H “searchterm” {} \; | **find . -name “*.py” -exec grep -H “searchterm” {} \; | ||
Ligne 45: | Ligne 87: | ||
Also a command that most people probably know. It takes the name of an application, | Also a command that most people probably know. It takes the name of an application, | ||
+ | |||
+ | find . -name “*.py” -exec grep -H “searchterm” {} \; | ||
+ | |||
+ | La commande ci-dessus cherche le mot « searchterm » dans tous les fichiers python dans le répertoire local et ses sous-dossiers. Le commutateur -H dit à grep de lister les noms de fichiers de sorte que vous pouvez vraiment savoir quel fichier vous cherchez. Vous pouvez régler chacun des paramètres si nécessaire. | ||
+ | |||
+ | killall | ||
+ | |||
+ | Encore une commande que tout le monde connaît probablement. Je donne le nom d'une application et il tue toutes ses instances. Très utile quand quelque chose ne répond pas ou qu'il n'y a pas de moyen officiel de l' | ||
**< | **< | ||
- | Not really a command, but a feature of the Linux Shell that I use all the time. It essentially says “if command1 completes successfully, | + | Not really a command, but a feature of the Linux Shell that I use all the time. It essentially says “if command1 completes successfully, |
- | **mkdir -p | + | mkdir -p |
This is simply an additional argument to mkdir, which creates any folders along the path if they don’t exist. So, if you tell it to create ~/ | This is simply an additional argument to mkdir, which creates any folders along the path if they don’t exist. So, if you tell it to create ~/ | ||
{item1, | {item1, | ||
+ | |||
+ | < | ||
+ | |||
+ | Ce n'est pas vraiment une commande, mais une fonctionnalité du Shell de Linux que j' | ||
+ | |||
+ | mkdir -p | ||
+ | |||
+ | C'est juste un argument complémentaire pour mkdir, qui crée tous les dossiers d'un chemin quand ils n' | ||
+ | |||
+ | {item1, | ||
**This is a convention that Bash and most other shells allow. It is essentially a list of options that it cycles through one by one. Combining it with the mkdir command from above, something like this is possible: | **This is a convention that Bash and most other shells allow. It is essentially a list of options that it cycles through one by one. Combining it with the mkdir command from above, something like this is possible: | ||
- | mkdir -p ~/ | + | mkdir -p ~/ |
- | **The command would create the folders 2017 and 2018 in the folder taxes. Each year would also contain the folders “receipts” and “forms”. The key thing here is to avoid using spaces around the commas. If you’re using spaces in the items, be sure to escape them or to enclose the items in quotes. | + | The command would create the folders 2017 and 2018 in the folder taxes. Each year would also contain the folders “receipts” and “forms”. The key thing here is to avoid using spaces around the commas. If you’re using spaces in the items, be sure to escape them or to enclose the items in quotes. |
I hope this list introduces you to a few new commands or shell tricks. If you know of a tool or a trick that I haven’t covered that you can’t live without, feel free to let me know about it via email. As always, I can be reached at lswest34+fcm@gmail.com.** | I hope this list introduces you to a few new commands or shell tricks. If you know of a tool or a trick that I haven’t covered that you can’t live without, feel free to let me know about it via email. As always, I can be reached at lswest34+fcm@gmail.com.** | ||
+ | |||
+ | C'est une convention que Bash et la plupart des shells autorisent. C'est en gros une liste d' | ||
+ | |||
+ | mkdir -p ~/ | ||
+ | |||
+ | La commande créera les dossiers 2017 et 2018 dans le dossier taxes. Chacune des années contiendra aussi les dossiers « receipts » et « forms ». Le point clé ici est d' | ||
+ | |||
+ | J' | ||
issue132/c_c.1525093351.txt.gz · Dernière modification : 2018/04/30 15:02 de d52fr