windows:command_prompt
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| windows:command_prompt [2023-08-26 22:49] – created dave | windows:command_prompt [2024-12-13 18:20] (current) – [cmd.exe] dave | ||
|---|---|---|---|
| Line 13: | Line 13: | ||
| </ | </ | ||
| - | //Yes, I should probably learn Powershell but I have enough shit to learn and powershell uses insanely long hyphenated commands. | + | //Yes, I should probably learn Powershell but I have enough shit to learn and powershell uses insanely long hyphenated commands. |
| Line 55: | Line 55: | ||
| ==== For Loop Ping Sweep ==== | ==== For Loop Ping Sweep ==== | ||
| From: https:// | From: https:// | ||
| + | < | ||
| for /L %i in (1,1,255) do @ping -n 1 -w 200 192.168.1.%i > nul && echo 192.168.1.%i is up. | for /L %i in (1,1,255) do @ping -n 1 -w 200 192.168.1.%i > nul && echo 192.168.1.%i is up. | ||
| + | </ | ||
| As you can see the idea is the same, -n being the equivalent of -c in Linux’s ping and -w is the timeout, then we send the output to nul and echo only if the ping command was successful (that’s what the && is for) | As you can see the idea is the same, -n being the equivalent of -c in Linux’s ping and -w is the timeout, then we send the output to nul and echo only if the ping command was successful (that’s what the && is for) | ||
| Line 72: | Line 74: | ||
| setx PATH "path with quotes if there are spaces (there are)" | setx PATH "path with quotes if there are spaces (there are)" | ||
| + | ===== Line count (like wc -l) ===== | ||
| + | [[https:// | ||
| + | < | ||
| + | find /c /v "" | ||
| + | </ | ||
windows/command_prompt.1693090199.txt.gz · Last modified: by dave
