Recursively find all files that match a certain pattern

With gnu find you can use regex, which (unlike -name) match the entire path: To just count the number of files: (The %i format code causes find to print the inode number instead of the filename; unlike the filename, the inode number is guaranteed to not have characters like a newline, so counting is more reliable. Thanks to @tripleee for … Read more

Change default title in mac terminal window

That’s two questions: the text in the titlebar for OSX Terminal comes from the names of the processes running in the terminal. There can be multiple levels of processes, e.g., a shell running an editor. Terminal shows up to a few levels of those. You can configure its behavior in the Preferences dialog. In practice, it can … Read more

Vim Can’t Save File (E212)

This will ask you for the root password, then save your changes as you requested: Then type (L)oad at the prompt, to re-load the file after it is saved.

Upgrade Node.js to the latest version on Mac OS

Here’s how I successfully upgraded from v0.8.18 to v0.10.20 without any other requirements like brew etc, (type these commands in the terminal): sudo npm cache clean -f (force) clear you npm cache sudo npm install -g n install n (this might take a while) sudo n stable upgrade to the current stable version Note that sudo might prompt your password. Additional note regarding step 3: stable can be exchanged … Read more

OS X Framework Library not loaded: ‘Image not found’

[Xcode 11+] The only thing to do is to add the framework to the General->Frameworks, Libraries And Embedded Content section in the General tab of your app target. Make sure you select the ‘Embed & Sign’ option. [Xcode v6 -> Xcode v10] The only thing to do is to add the framework to the Embedded binaries section in the General tab of your … Read more

How to install Java 8 on Mac

Oracle has a poor record for making it easy to install and configure Java, but using Homebrew, the latest OpenJDK (Java 14) can be installed with: For the many use cases depending on an older version (commonly Java 8), the AdoptOpenJDK project makes it possible with an extra step. Existing users of Homebrew may encounter Error: Cask adoptopenjdk8 exists … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)