TheShed

Mac OS Tools

Category: Tools
#Mac OS

Some Mac OS X stuff…

ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

To install Homebrew. You might argue that downloading and executing arbitrary ruby scripts is a tad dangerous. But then so is downloading and executing some bin. (With scripts you have the benefit of being able to examine the source before you download, but watch out for a bait-and-switch if someone decides to show your browser different content because they detected a specific user-agent.)

Now let's grab wget:

brew install wget

You see, just like apt-get (or Chocolatey).

Now we'll use wget to grab stuff from a NAS:

wget -m ftp://usr:pass@server/path/to/files

(Why aren't we using SMB? That's a long story but essentially it's an old NAS and a recent Mac OS X build.)

If I don't want to include the source directory structure in the target add --cut-dirs=4 where 4 is the sum of the number of directories specified in the path +1 (for the server name).