Blog

MakeX.app a simple “chmod +x” front end

By Zack Smith posted on June 24th, 2007

MakeX.app

You can Download the Application ->here<- and the “Source” ->here.<-

I often teach classes to administrators who are new to the command line, I on the other hand ssh more then I sleep and so no matter what the class ( for better or worse ) I tend to throw one liners on screen every 10 mins . Because of this I often start class out by showing people how to make a simple “.command” file. The rational being that if they don’t think they’re going to remember the commands then just saving them in a file ( perhaps on a thumb drive ), will probably suffice while they are learning. If your not familiar with these files, they are a handy way to have a double clickable “scripts” , sans the hash bang i.e. #!/bin/bash or what could almost be referred to as a “batch” file. Creating one of these files is as simple as opening TextEdit.app changing the format to”Plain text” Format->Make Plain Text + Shift + T ).

Make Plain Text

Type in any command such as top -du then save the file with a .command, responding to the warning dialog with “Use .command”

The last part is where this mini article is leading, because this file must be executed by the terminal ( i.e. the shell ) it must be “executable” which is a permission bit you can turn on using the chmod command. There is no graphical interface for the execute bit unlike read or write permissions , so normally you would have to at minimum remember the command chmod +x /path/to/my.command but getting back to our scenario , first time Mac OS X administrators will kind of glaze over a bit at the idea of having to remember even this. Enter: MakeX.app its a very simple little Apple Script Application that I built to allow people to drag and drop their .command files ( and anything else ) to have them become executable. It also allows you to choose the file by running the application, and has some basic logic like asking for an admin password with needed.

If would you like to contact me with comments or inaccuracies about this article, feel free but support requests will be ignored unless you would like to sign up for Iris Professional Services service. Thanks

Comments Off

Posted in One liners, Scripts, Tips and Tricks

Comments are closed.