Remix.run Logo
The Windows equivalents of the most used Linux commands(techkettle.blogspot.com)
37 points by elsadek 7 hours ago | 19 comments
flexagoon 12 minutes ago | parent | next [-]

> Finding a specific file by name across the system

> Linux: find / -name "config.txt"

This is not how you find a file across the entire system, you use plocate for that. find would take ages to do what plocate does instantly

Akuehne 4 hours ago | parent | prev | next [-]

My most used windows command is, and will always be, `ls`.

Then I'm reminded that it's not a know file or directory.

IcyWindows 3 hours ago | parent [-]

It's been nearly 20 years since powershell came out.

SoftTalker 2 hours ago | parent [-]

And we had cygwin before that. First thing I always installed on a Windows box so I could use bash and all my favorite utilities.

not_a_bot_4sho an hour ago | parent | prev | next [-]

A great non-AI resource on this topic: https://ss64.com/

malbs 3 hours ago | parent | prev | next [-]

findstr is an underappreciated command line tool. I use it a lot

hackyhacky 3 hours ago | parent | prev | next [-]

> Author's note: From here on, the content is AI-generated

Kudos to the author for their honesty in admitting AI use, but this killed my interest in reading this. If you can use AI to generate this list, so can anyone. Why would I want to read AI slop?

HN already discourages AI-generated comments. I hope we can extend that to include a prohibition on all AI-generated content.

> Don't post generated comments or AI-edited comments. HN is for conversation between humans.

rmunn 2 hours ago | parent | next [-]

If the author had also included a note explaining that he'd *reviewed* what the AI produced and checked it for correctness, I would be willing to trust the list. As it is, how do I know the `netstat` invocation is correct, and not an AI hallucination? I'll have to check it myself, obviating most of the usefulness of the list. The only reason such a list is useful is if you can trust it without checking.

charcircuit 2 hours ago | parent | prev [-]

Why should you learn anything if you can just use AI to look it up? For fun is one reason.

jmclnx 4 hours ago | parent | prev | next [-]

Not bad, but one big criticism, never do a 'kill -9' first, that will stop the program from cleaning up after itself if killed using -9.

Use one of these instead:

    -TERM   then wait, if not
    -INT    then wait, if not
    -HUP    then wait, if not
    -ABRT
If you are sure all of these fail, then use -9 (-KILL). But assume the program has a major bug and try and find another program that will do the same task and use that instead.
adrianmonk 21 minutes ago | parent | next [-]

Maybe this logic should be built into the "kill" command (or some other standard command). Given that this is the right way, it shouldn't be more tedious than the wrong way!

It could also monitor the target process and inform you immediately when it exits, saving you the trouble of using "ps" to confirm that the target is actually gone.

BenjiWiebe 44 minutes ago | parent | prev [-]

How often does plain 'kill <pid>' not work, but some other signal other than SIGKILL works?

Usually the process is either working correctly and terminates when asked, or else not working correctly and needs to be KILLed.

WaterRun 4 hours ago | parent | prev | next [-]

I recently had a similar idea. https://github.com/Water-Run/Cmdset

8note 3 hours ago | parent | prev | next [-]

ok, but how do i get the only linux command i know?

ctrl+r

usr1106 2 hours ago | parent | next [-]

Works just fine in powershell. Avoid using command prompt and life is already a bit better

thunderbong 2 hours ago | parent | prev [-]

F7

HDBaseT an hour ago | parent | prev | next [-]

traceroute vs tracert always catches me out.

themafia 2 hours ago | parent | prev | next [-]

> Windows: netstat -n -a | findstr "https" (//note the double quotes)

netstat works perfectly fine on linux as well. If you're looking for https connections it's certainly far more efficient than 'lsof'.

also if you use '-n' then you're not going to get service names translated, so that probably should be:

netstat -n -a | find "443"

jpease 4 hours ago | parent | prev [-]

CTRL-ALT-DEL?