Live data from Hacker News

OS X Command Line Utilities

mitchchn.me

11–20 of 243 posts

Re: OS X Command Line Utilities

#11
What always surprises me is that so many don't know or use the directory stack commands, pushd and popd. I'll admit I was also ignorant of them until something like 2005, but once I learned of them I switched and never looked back. Now I can't see someone write or type "cd" without a little bit of a cringe.

Re: OS X Command Line Utilities

#12
/usr/local is the default location for user-installed stuff, but I personally like to have my package manager do its stuff in a separate directory.

I like the way Fink [1] uses the /sw (software) directory.

Does anyone have a valuable opinion on the comparison between Fink and Homebrew — or maybe MacPorts?

[1] http://www.finkproject.org

Re: OS X Command Line Utilities

#13

There's been a few of these lists over the past few years, most recent one is https://news.ycombinator.com/item?id=7494100 It seems like a large portion of HN is less experienced re sysadmin, but is interested in it nonetheless. Perhaps there's room to make a 'codecademy for unix' type course? Curious to see what folks thing.

It does feel I'm retreading ground that's already been covered too many times, but my whole motivation for this blog was more or less what you're observing. There's a huge group of people on the fringes of hacker culture who are looking for a way in and don't know where to start. Definitely a fan of the idea of 'Nixacademy.

Re: OS X Command Line Utilities

#14

What always surprises me is that so many don't know or use the directory stack commands, pushd and popd. I'll admit I was also ignorant of them until something like 2005, but once I learned of them I switched and never looked back. Now I can't see someone write or type "cd" without a little bit of a cringe.

uhh... I have known pushd and popd for quite a long time, but never realized that pushd can be used in place of cd. So what I have been doing all the time is:

pushd .

cd some_dir

Re: OS X Command Line Utilities

#15
Another one that I can't live without:

   ssh-add -k keyfile
Integrates with keychain meaning you can have a passworded private key without having to play around with ssh-agent and shells and profiles. Put keychain access in the menu bar and you can lock the keychain on demand as well. Integration of ssh into the OSX workflow is absolutely awesome.

That and some of the examples in that article really make it a killer platform for Unix bits.

Re: OS X Command Line Utilities

#16
post #12

/usr/local is the default location for user-installed stuff, but I personally like to have my package manager do its stuff in a separate directory. I like the way Fink [1] uses the /sw (software) directory. Does anyone have a valuable opinion on the comparison between Fink and Homebrew — or maybe MacPorts? [1] http://www.finkproject.org

[deleted]

Re: OS X Command Line Utilities

#17
post #12

/usr/local is the default location for user-installed stuff, but I personally like to have my package manager do its stuff in a separate directory. I like the way Fink [1] uses the /sw (software) directory. Does anyone have a valuable opinion on the comparison between Fink and Homebrew — or maybe MacPorts? [1] http://www.finkproject.org

/usr/local is a wasteland on OS X. Package installers love to dump stuff in there blindly. This leads to fun-to-debug problems where two different things are overwriting files in there and blowing up because of version mismatch problems.

I ended up making a /rr tree ("rwg's root"), building things I care about from scratch, and using GNU stow to manage it.

Re: OS X Command Line Utilities

#18
post #14

What always surprises me is that so many don't know or use the directory stack commands, pushd and popd. I'll admit I was also ignorant of them until something like 2005, but once I learned of them I switched and never looked back. Now I can't see someone write or type "cd" without a little bit of a cringe.

uhh... I have known pushd and popd for quite a long time, but never realized that pushd can be used in place of cd. So what I have been doing all the time is: pushd . cd some_dir

I've been using Unix machines and pushd since the mid 1990s and just learned this as well. All those wasted years...

Some examples here:

http://en.wikipedia.org/wiki/Pushd_and_popd

Edit: change to desktop Wikipedia URL.

Re: OS X Command Line Utilities

#19

no love for macport?

I'm a happy macports user, never had any issues with it especially after having set +no_x11 in the default variants :).

The only bad thing about it that "port upgrade outdated" must be used carefully, but that is probably true of most port-like systems.

Re: OS X Command Line Utilities

#20
The screencapture options are wrong.

    "Select a window using your mouse, then capture its contents without the window’s drop shadow and copy the image to the clipboard:

    $ screencapture -c W"
-c captures the cursor, W is not an option. The real command for this is:

    $ screencapture -C -o
Post reply on HN