Hacker News new | ask | show | jobs
by flukus 3205 days ago
> want to rename something? it's mv

There is a rename command as well. But apart from the first time I tried to rename a file I've never had trouble remembering it. There is a good reason for it to, internally it is a move operation.

> want to tell the time? it's date

Is this different in powershell? Some quick googling indicates the Get-Date is the method you want and being .net based everything deals with DateTime objects.

> why is the command to download something curl/wget?

I find this easier to remember than Invoke-WebRequest, or is it Invoke-RestMethod?

If they were so hard to remember that could be aliased to something similar, but I've never seen anyone bother.

Edit - I mean I've never heard anyone going the other way and suggest doing "alias Invoke-WebRequest=\"curl\"" in bash.

2 comments

They're pre-aliased to curl and get. ls works too. Most of the options won't work of course.
> why is the command to download something curl/wget?

I find this easier to remember than Invoke-WebRequest, or is it Invoke-RestMethod?

easier to remember: maybe, but much less discoverable than Invoke-WebRequest/Invoke-RestMethod. this seems to be the overall trend for linux shell commands. a few characters long for easy typing, but otherwise arbitrary strings that you have to remember and have 0 discoverability. GGP's comment was about how you had to search for how to do everything in powershell, so in that respect powershell is at least not worse than bash.

> 0 discoverability

Have you ever heard of `apropos`?

Interesting ....

I really liked DEC's VMS DCL ... and "help" was top notch.