Live data from Hacker News

macOS command-line tools you might not know about

saurabhs.org

141–150 of 454 posts

Re: macOS command-line tools you might not know about

#142
Interesting so many useful commands, but they didn't have time to fix basics like scroll wheel, so you have to install 3rd party apps to set it independently from the touch pad and then it still manages to swap it around at random times.

Am I the only one who finds macOS so annoying?

I mean the apps for scroll wheel, alt-tab and what not...

Re: macOS command-line tools you might not know about

#143

Not a command-line tool but the network link conditioner is also really great. Never seen such a tool on another OS You can simulate a really bad network. Latency, bandwidth, packet loss etc. Great for testing but also if people insist on cameras being on. Just screw up the connection so bad that everyone gets annoyed with your blocky image and robot voice and suggest you turn off video and then you make it 'magicall…

Network Link Conditioner rules. I pair it with `mitmproxy` for debugging native apps.

Re: macOS command-line tools you might not know about

#144
post #8

`pbcopy` and `pbpaste` are one of my most-loved in the list. Dealing with some minified json, switching to iTerm, doing `pbpaste | json_pp | pbcopy` and having a clean output is _so_ nice.

alias pbg='pbpaste | fgrep --color -i "`pbpaste -pboard find`"'

select all in a terminal window with pages of log data and cmd-c copy; find the one phrase you want to find in that data and cmd-e to put it in the find pasteboard; cmd-n new window, type pbg to isolate the log lines.

Re: macOS command-line tools you might not know about

#147

/System/Library/PrivateFrameworks/Apple80211.framework/Versions/A/Resources/airport I set an alias in my shell so this is just 'airport', lets you interact with the wifi settings - I particularly like 'airport -s' for doing a scan of the local wifi networks, since it shows signal strength and channel information right there, which is helpful when troubleshooting.

It also separates 2.4GHz and 5.0GHz bands and shows security details (which matters sometimes e.g band steering or automatic same-SSID signal-strength-based AP selection doesn't work)

Re: macOS command-line tools you might not know about

#148
post #98

Earlier quoted context omitted.

In what way do you see those alternatives as superior?

They avoid an unnecessary invocation of the cat executable. Instead, they open a file descriptor and pass that. Tiny difference but there you go.

Not just that, but also all the bytes have to go through an extra pipe. Presumably they're copied an extra time because of this.

When you run "cmd < file", the command reads from stdin, which pulls directly from the file. When you do "cat file | cmd", "cat" opens the file, reads from there, and writes to a pipe. Then "cmd" reads from its stdin, which is a pipe.

Re: macOS command-line tools you might not know about

#149
post #137

Caffeinate is definitely the one I miss most on Windows. Super handy to keep your machine awake whilst some task is ongoing.

I’ve been looking for a better way to do this than just setting my PC to never sleep. Thanks for this. Now I need to find a Mac alternative as well.

Re: macOS command-line tools you might not know about

#150

Interesting so many useful commands, but they didn't have time to fix basics like scroll wheel, so you have to install 3rd party apps to set it independently from the touch pad and then it still manages to swap it around at random times. Am I the only one who finds macOS so annoying? I mean the apps for scroll wheel, alt-tab and what not...

The issues I have are touch-dragging with the touchpad, and no window docking. Docking I fixed by buying 'Magnet', touch dragging is still annoying. They have a setting that is supposed to enable 'double tap drag' like windows, but when you let go, it keeps dragging for some random amount of time, making it unusable.
Post reply on HN