NetWiki

I can make net work

User Tools

Site Tools


windows:command_prompt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
windows:command_prompt [2023-08-26 22:49] – created davewindows:command_prompt [2024-12-13 18:20] (current) – [cmd.exe] dave
Line 13: Line 13:
 </code> </code>
  
-//Yes, I should probably learn Powershell but I have enough shit to learn and powershell uses insanely long hyphenated commands.  I know you can tab complete but still, WTF?   Also, after being Windows-free and generally Microsoft free for five years and coming back, I've realized that Microsoft makes shit. The issue is largely the UI.  I **like** having a lot of options but the MS UIs are sooo freaking busy that I can never find anything.//+//Yes, I should probably learn Powershell but I have enough shit to learn and powershell uses insanely long hyphenated commands.  I know you can tab complete but still, WTF?   Also, after being Windows-free and generally Microsoft free for five years and coming back, I've realized that Microsoft makes shit software. The issue is largely the UI.  I **like** having a lot of options but the MS UIs are sooo freaking busy that I can never find anything.//
  
  
Line 55: Line 55:
 ==== For Loop Ping Sweep ==== ==== For Loop Ping Sweep ====
 From: https://www.rubyguides.com/2012/02/cli-ninja-ping-sweep/ From: https://www.rubyguides.com/2012/02/cli-ninja-ping-sweep/
 +<code>
  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.
 +</code>
 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://superuser.com/questions/959036/what-is-the-windows-equivalent-of-wc-l|What is the Windows equivalent of "wc -l"?]]
 +<code>
 +find /c /v ""
 +</code>
  
windows/command_prompt.1693090199.txt.gz · Last modified: by dave

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki