Tag: Mac

  • Mac OS: How to batch edit file extension via Terminal

    Today I had a directory of images whose file name extensions are .jpeg. I need them as .jpg but I didn’t want to rename them one by one.

    Here’s how we can change the file extensions in a directory by batch. And by the way, I am on Mac OS El Capitan version 10.11.5 with Homebrew package manager.

    First, open your Mac’s Terminal.

    Type the command rename just to check if you have it installed in your system. If the Terminal displays usage instructions on rename then you already have it.

    If rename is a command not found, then install it via Homebrew using this command:

    Once the rename command is available, navigate to the directory where your files that need new extensions are.

    Then edit the following command to suit your needs before running:

    The syntax for this is actually rename "s/OLD_EXTENSION/NEW_EXTENSION/" *.OLD_EXTENSION

    That’s all! I hope that worked for you.

    Resource: Changing extension to multiple files

  • Android Development: Permission denied when running ./gradlew in Mac

    I’m using a Mac at the moment to work on my Android app projects.

    For some reason I need to run ./gradlew in the terminal, but I was getting this error:

    -bash: ./gradlew: Permission denied

    To fix this, what I did was run the following commands:

    After those commands, my Mac downloaded numerous files and it took an hour to finish because of our poor Internet connection in the workplace. 🙁

    After an hour and a half, I was able to finally use the command ./gradlew on the Mac Mini. Phew!