Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mac 'batchfile' script solution?

In Windows I would create a .bat file to run this script from my desktop, on my Mac how do I create something similar that can be run from the desktop to execute this:

 defaults write com.apple.finder AppleShowAllFiles TRUE
 killall Finder
like image 949
Ian Vink Avatar asked Apr 09 '26 06:04

Ian Vink


1 Answers

Create a file with the following content

#!/bin/bash
defaults write com.apple.finder AppleShowAllFiles TRUE
killall Finder

From the terminal.app, run chmod o+x <filename> to make the file executable.

To run the file simply open the terminal.app and ./<filename>

like image 83
Shoan Avatar answered Apr 11 '26 19:04

Shoan