ridiculous... Why this entry is in the top 30?
The Windows equivalents of the most used Linux commands
61–70 of 72 posts
Re: The Windows equivalents of the most used Linux commands
#62Earlier quoted context omitted.
Because powershell is weird and obtuse? Or because powershell works slightly different in the terminal va the powershell dev environment? Its a tool most of us use under duress rather than choice
I certainly won't argue that pwsh is even close to perfect, but...obtuse is just about the most unfitting description of powershell. It offers a level of structure and consistency that is - even with all its shortcomings - orders of magnitude above the wild west of the daily reality of the linux cli. Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess.
I just dont see how Remove-Item is superior to rm and thats just the first example that came to mind (Atleast there are aliases for most stuff afaik so i guess its not AS bad).
I also just googled and there seem to be 3-4 different commands (not including the aliases) that do EXACTLY the same thing, atleast the Microsoft article used 1:1 the same description for all of them.
Re: The Windows equivalents of the most used Linux commands
#63Why would you use CMD when Powershell exists?
Its very likely that its just because i have almost no experience with powershell meanwhile i have now ~4-5 years of dailying linux but i just find the powershell commands to be very cumbersome to use. They are wayyy to long and descriptive instead of just 2-4 letters, there are 500 different commands for very specific uses instead of 10 tools that you can use and combine todo almost everything and if i recall correc…
This applies to errors of course, there are a number of properties for an error that you can look at (and use in scripts to handle errors) if the full output is too much or unclear.
Re: The Windows equivalents of the most used Linux commands
#64Re: The Windows equivalents of the most used Linux commands
#65Earlier quoted context omitted.
I certainly won't argue that pwsh is even close to perfect, but...obtuse is just about the most unfitting description of powershell. It offers a level of structure and consistency that is - even with all its shortcomings - orders of magnitude above the wild west of the daily reality of the linux cli. Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess.
"Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess." I kinda feel like you could apply the statement more to powershell tho. I just dont see how Remove-Item is superior to rm and thats just the first example that came to mind (Atleast there are aliases for most stuff afaik so i guess its not AS bad). I also just googled and there seem to be 3-4 different commands (not incl…
Re: The Windows equivalents of the most used Linux commands
#66> "Author's note: From here on, the content is AI-generated" Ah, I see, googling the equivalent of "clear" was too much work and you had to get an LLM to do it for you. Well at least you were honest about it
Re: The Windows equivalents of the most used Linux commands
#67Let me present you my favorite, how do you figure out dirname, basename and filename in batch script? set filepath="C:\some path\having spaces.txt" for /F "delims=" %%i in (%filepath%) do set dirname="%%~dpi" for /F "delims=" %%i in (%filepath%) do set filename="%%~nxi" for /F "delims=" %%i in (%filepath%) do set basename="%%~ni" echo %dirname% echo %filename% echo %basename% It is just as intuitive as one would expe…
$file = Get-ChildItem "C:\some path\having spaces.txt" Write-Output $file.DirectoryName Write-Output $file.Name Write-Output $file.BaseName Or if that's still to verbose: $file = gci "C:\some path\having spaces.txt" echo $file.DirectoryName echo $file.Name echo $file.BaseName People should really get over their aversion against powershell.
Get-Item "C:\some path\having spaces.txt" | select DirectoryName, Name, BasenameRe: The Windows equivalents of the most used Linux commands
#68My most used windows command is, and will always be, `ls`. Then I'm reminded that it's not a know file or directory.
Re: The Windows equivalents of the most used Linux commands
#69Earlier quoted context omitted.
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.
How would you know the invocation is correct when written by a human? Don’t humans make mistakes?
That's why you can't just vibe-code something and expect it to work 100% correctly with no design flaws, you need to check the AI's output and correct its mistakes. Just yesterday I corrected a Claude-generated PR that my colleague had started, but hadn't had time to finish checking before he went on vacation. He'd caught most of its mistakes, but there was one unit test that showed that Claude had completely misunderstood how a couple of our services are intended to work together. The kind of mistake a human would never have made: a novice wouldn't have understood those services enough to use them in the first place, and an expert would have understood them and how they are supposed to work together.
You always, always, have to double-check the output of LLMs. Their error rate is quite low, thankfully, but on work of any significant size their error rate is pretty much never zero. So if you don't double-check them then you're likely to end up introducing more bugs than you're fixing in any given week, leading to a codebase whose quality is slowly getting worse.
Re: The Windows equivalents of the most used Linux commands
#70Earlier quoted context omitted.
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.
Different programs may take different amounts of time to cleanup and close. To know if a signal failed takes human judgment or heuristic. A program receiving a signal is even able to show a confirmation dialog for the user to save stuff, etc. before closing.
So really what "kill" would be doing is automating a common procedure, which is different than taking responsibility for doing it correctly. It would need to be configurable.
I still think it would be a net benefit since right now incentives push people toward doing something the wrong way (even if they know better). But I can also see how it might give people a false sense of security or something along those lines.