How to change file extensions command line MacOS


Linux has a handy rename command which is great for easily renaming file extensions within a directory.

> rename .htm .html *.htm

MacOS however has no such command.

Fortunately, Ben Han documented a nice work around by creating a simple script.
(Click here for a reminder on how to create MacOS scripts)

for f in *.$1
  mv $f ${f%$1}$2

It uses the mv command and loops through your directory doing the move based on whatever parameters you pass in.

For example to change all my pngs to jpgs all I have to do now is navigate to the target directory and type:

> png jpg

And voila! All my pngs are now jpgs.

Thanks again Ben for this great tip.

How to zip all files of certain file extension (UNIX, MacOS)

Leave a comment

As part of trying to do more things from the command line here’s a handy command for zipping files by type on MacOS from the command line.

find . -name "*.jpg" -print | zip source -@

You can find this an other commands from the zip man page.

Filling the joy bucket

1 Comment

Making money is great.
And when you get paid by the hour it’s tempting to work as many billable hours as you can.

But while billable work is great for the bottom line, it’s not always great for the soul.
You’ve got works of art you want to create. Start-up ideas you want to do.

But not maximizing your billable hours feel like your leaving money on the table.

So what’s does a poor boy do?

Try this.

Find out what your most productive time of day is (the hours where the creative juices are really flowing) and see if you can’t reserve 1-2 hours each day to focus on one true your passion.

Then, for one week, block off those core hours and don’t let anything keep you from doing whatever it is you need to do.
artist at work
Start that book.
Build that protoype.
Learn that guitar song.
Make that movie.
Spend that time with the family.

Whatever it is you need to do to fill your joy bucket, do it.

Do this for a week then reflect.

  • Do you feel better for having spent time on x,y,z?
  • Are you less stressed because you feel like you’ve accomplished something you’ve always wanted to do?
  • Do you look forward to getting up in the morning, knowing you’ve set time aside for something you really enjoy doing.

I’m not saying life is all fun and games, and there won’t be times you need to buckle down and get stuff done.

But by setting aside some time for those things you feel compelled to do, you can put food on the table, and enrich your life (and the lives of those around you) at the same time.

So block off that time. Give yourself a week. And see if you’re happier.

You know what’s important in your life.
Go do it.

Don’t underestimate the power of a brand


apple logo starbucks logo

People feel more productive when they use Apple computers.
The wine tastes better in Riedel glasses.
And people prefer it when the coffee is served in a Starbucks mug or cup.

Whether the products actually do these things on their own isn’t the point.

It’s how you feel, and whether you are more productive because of their use that counts.

Some people scoff at the extra cost of an Apple laptop compared to a PC notebook.
They don’t feel it’s worth the extra couple hundred bucks.

But if it makes you ‘feel’ better and inspires you to do things you otherwise wouldn’t, I say it’s worth it.

If buying an Apple laptop, or treating yourself to a cup of fine coffee motivates you to:

  • start that book
  • write the blog, or
  • attend that night class

go for it. The extra couple dollars you spend getting your butt in gear will more than pay for itself with the art you create.

And their is no shame in personally harnessing the power of a brand.

%d bloggers like this: