Escaping characters on the command line by Joseph Palumbo

While doing some housekeeping on my computer I ran into a situation where I wanted to delete all files that had a (1) in the name.

I started by listing all files that ended in .jpg

$ ls *.jpg
Screenshot 2019-10-07 13.50.50.jpg

I thought I could delete those files using basically the same syntax on the command line, but this is what I got when I tested it out.

Screenshot 2019-10-07 13.53.37.jpg

After Googling around I found this article on that helped me figure it out.

You can use the \ to escape characters on the command line, like this:

$ ls *\(1\).jpg
Screenshot 2019-10-07 13.56.02.jpg

Which lead to this solution:

Screenshot 2019-10-07 13.58.09.jpg

Finder Tags and Terminal by Joseph Palumbo

As I’m focusing on organizing and decluttering my digital life, I’ve started using the MacOS tag feature introduced back in Mavericks. It’s a powerful tool that can be used to create some simple, elegant, and scalable solution to folder and file organization.

The problem is that I use Terminal at least half the time to work with my folders and files and Apple does not provide an out-of-the-box solution for adding/removing tags from CLI. So say ‘hello’ to tag, a fantastic solution working with tags from MacOS Terminal.

Read More