Terminal Command To Chmod An App On Mac

Very often, in OS X, when one has a terminal command that needs to be used often, it's convenient to turn that UNIX command into a double-clickable desktop file with a recognizable icon. How can that possibly be done? I'll show you how.

OS X is based on BSD UNIX

  1. If you’re running Mac OS X, or your favourite flavour Linux, you’re all set. Just fire up the terminal, and keep going. If you’re on Windows, well, the default command set isn’t quite what a bash shell is. If you want some power, check out Microsoft PowerShell; however, the.
  2. You can use the chmod command to indicate that the text file is executable (that is, its contents can be run as a shell script). In the Terminal app on your Mac, use the cd command to move into the directory that contains the file you want to make executable.
  3. Type chmod 755 foldername, and then press Return. This changes the permissions of the folder to rwxr-xr-x. When it comes to using the ls and chmod commands, practice makes perfect. Try modifying the permissions on a couple of sample files. If you need more help, use the man command to display the manual pages for these commands (e.g., man ls).

Terminal is Mac OS X way into the command line world. It is designed for you to typing in specific commands that you would not be able to do otherwise. This is great for customizing your Mac and unveiling hidden features. It is also a good way to destroy you system because you screwed something up. Drag the app you need to change the permission straight onto the Terminal window, which will fill in the correct path; Hit Backspace once, as the last task will add an unnecessary space; Then you need to add the sub-path to the actual executable inside the app, so copy this & paste it onto the end of your current Terminal.

Here's the basic outline of this tip.

  1. Create a UNIX script with a text editor that contains one or more terminal commands.
  2. Make it executable.
  3. Double click it in the Finder.

It's really quite simple, but there are a few things to be aware of. I'll walk you through it and add some notes as needed.

I. Create a script. UNIX scripts are similar to AppleScript. There are commands and a syntax. From time to time you'll see articles that show how to change an OS X preference from the command line. For example, you may have seen this terminal command that strips the drop shadow from your screenshots:

Note #1. The Terminal app location is /Applications/Utilities/Terminal.app

Terminal Command To Chmod An App On Mac

Scripts are a sequence of commands, managed by the scripting language, to a achieve a task. The easiest way to write a script is to use a text editor, like OS X's built-in TextEdit, found in the Applications folder.

Note #2. Make sure the Preferences for TextEdit are set correctly. Preferences > New Document > Plain text. Once set, relaunch TextEdit.

Here's a simple script that uses the 'uptime' command to display how long it's been since your Mac was rebooted.

Note #3. The first line tells OS X to use the Bash scripting language. There are several to chose from. We won't dig into that here.

Copy and paste this script into a new TextEdit file. Call it 'ByYourCommand.txt' Save this file on your desktop.

II. Make the Script Executable.

1. In the Finder, delete the file extension '.txt' The Finder will ask for confirmation.

2. Open the Terminal app and navigate to the file. Substitute your own login name instead of mine. Like this:

3. Still in the terminal, execute this UNIX command:

Note #4. This UNIX command makes the file executable, that is, double-clickable.

Note #5. If you have antivirus software installed, it may object, depending on its preferences, to an executable script being inserted into a file that was created by an OS X text editor. Just ignore the warning.

At this point, you'll notice that the file's icon has changed to this:

III. Double click the file 'ByYourCommand' on the desktop. The Terminal app will launch, the script will be executed, and you'll see the results, like this:

Uptime: one day, 21 h since my last reboot.

If you need to edit the script, you'll have to add the '.txt' extension back. (Or, as the geeks will point out, edit with a UNIX editor like vi. I had to say that.)

This is as far as we'll go with a one line command. Once you get the hang of this and learn a whole lot more, you'll find yourself happily creating your own custom scripts—if you decide to learn Bash or one of the other UNIX shells available. A new door is open to create your own scripts, but you should, of course, learn much more about UNIX and scripting before you go wild with this newfound superpower. A really careless act could render your OS X corrupted and/or unbootable.

Welcome back to Coding Corner! Today, we're going to go over some great interface and user tweaks you can execute to customize your Mac. These tricks are often simple and can help you spruce up your Mac far beyond what the System Preferences window allows.

So, without further ado, 15 great tricks you can execute in Terminal.

Tweak the Finder

Want to see hidden files, or copy Quick Look text? There are quite a few 'defaults' commands that let you alter how the Finder looks or acts.

1. Show hidden files and folders

Want to see all the hidden files and folders OS X has to offer — or you simply can't find a file you hid? Just use this command in Terminal:

defaults write com.apple.finder AppleShowAllFiles -bool TRUE
killall Finder

To re-hide all your files, just change the TRUE to FALSE.

2. View any file's contents

If you've had a file get corrupted or you suspect there's something hidden inside its package, you can force Terminal to open it. Just use the following command:

cat ~/enter/file/path

Fair warning: If you try to open a photo or pretty much any non-text document, you'll likely just see text gibberish.

3. Copy the contents of a folder from one place to another

Sure, you can Option-drag any file to a new location to make a copy of it, but if you want to simplify the process and automatically copy the entire contents of one folder to another, check out this simple Terminal trick.

ditto -V ~/original/folder/ ~/new/folder/

4. Download files outside of your browser

Have the URL to a file but don't want to use Safari, Firefox, or Chrome to download it? You can go through Terminal with the following commands:

cd ~/Downloads/
curl -O http://www.thefilename.com/thefile/url.mp3

The first command moves your current Terminal location to your Downloads folder; the second downloads it from the web to that folder.

Modifying screenshots

Want to change how your screenshots look? Here are some commands to help you do just that.

5. Change your screenshot's file format

This Terminal command lets you change the file format of your screenshots. By default, they're saved as PNGs, but you can also save them as PDFs, JPGs, and more.

defaults write com.apple.screencapture type jpg

6. Disable drop shadows on a screenshot

Here's another good one if you tend to take a lot of screenshots: This command will disable drop-shadow on your screenshots, only displaying the window you've snapped.

$ defaults write com.apple.screencapture disable-shadow -bool TRUE
killall SystemUIServer

7. Create a new default name scheme for screenshots

Don't like the phrase Apple uses to save your screenshots? Traditionally, it's 'Screen Shot - [date] - [time]', but you can change 'Screen Shot' to any word you please.

defaults write com.apple.screencapture name 'New Screen Shot Name'
killall SystemUIServer`

Get bored of your new name scheme? Go back to the default by typing as follows:

defaults write com.apple.screencapture name '
killall SystemUIServer

8. Change the location of your screenshots

Your screenshots, by default, save to the Desktop. But if you'd prefer they save elsewhere, it's an easy Terminal trick to make it so.

Terminal Command To Chmod An App On Mac Free

defaults write com.apple.screencapture location ~/your/location/here
killall SystemUIServer

You can also drag the folder of your choice on top of the Terminal window after typing 'location' if you don't want to manually type out the file path.

System changes

If you're looking for broader OS X-level changes, these commands might help you get started.

9. Create a custom login message

Best Terminal Commands For Mac

Whether you want to troll your friends or add useful 'in case of loss' contact information, you can add a personalized message to your login screen with this Terminal command.

Setup Mac Digital Signage. Play Digital Signage works with macOS. Follow these instructions to setup PlaySignage app on your Mac and get up and running digital signage. Download our Mac OS player application. Click here to download the player. To install the application, drag “PlaySignage” to “Applications”. Looking for an app that you can use with your Mac mini to create great-looking digital signage displays? Look no further. ScreenCloud is designed to work with any hardware you have available - whether that’s an Android TV that can power itself or a regular TV made “smart” using a device like the Mac mini. Mac mini: an introduction. Digital signage app for mac. LaneSquare Technology Pvt Ltd is a software business formed in 2014 in India that publishes a software suite called Pickcel Digital Signage. Pickcel Digital Signage includes training via live online, and in person sessions. The Pickcel Digital Signage product is Windows, Mac, Linux, SaaS, and Android software.

Basic Mac Terminal Commands

sudo defaults write /Library/Preferences/com.apple.loginwindow LoginwindowText 'In case of loss, call 555-555-5555.'

10. How long has my Mac been running?

Is your Mac acting sluggishly? It might be in need of a good restart. You can check to see just how long your Mac's been active by checking its uptime with this Terminal command:

uptime

11. Keep your Mac awake

If you need to prevent your Mac from going to sleep — say, you're running an extensive task, or recording your screen — there's an all-too-amusing command for that:

caffeinate

Once you enter this command, your Mac's digital eyes will be pried open and prevented from going to sleep until you end it by pressing Control-C.

If you don't want to rely on being the one to end your poor Mac's suffering, you can also create a set a number of seconds before your Mac sleeps:

caffeinate -u -t 5400

The above command will keep your Mac awake for an hour and a half.

12. Make your Mac automatically restart after a crash

We've all had our Mac freeze up or crash at least once in its lifetime. If you want to skip the crying and the yelling at the screen and get back to work, you can enter this Terminal command, which will make OS X reboot as soon as it senses a full system freeze.

sudo systemsetup -setrestartfreeze on

Modify your Dock

Want to make your Dock look different? Check out these Terminal tweaks.

13. Add spacers to your Dock

You can organize your Dock's many icons by adding in blank spaces with this handy terminal command:

defaults write com.apple.dock persistent-apps -array-add '{'tile-type'='spacer-tile';}'
killall Dock

Mac Terminal Command Help

Repeat this command for each spacer you'd like for your Dock. To remove a spacer, you can drag it out to the right until you see the poof icon.

14. Dull hidden apps in the Dock

Not sure which apps are visible on your screen? You can make this information extra pertinent by using this Terminal command, which lowers the opacity on icons for hidden apps in the Dock. It's a great way to see what you haven't used lately, as well as what's cluttering up your screen.

defaults write com.apple.Dock showhidden -bool TRUE
killall Dock

15. Hide non-active apps in your Dock

If lowering the opacity of hidden apps appeals to you, you might like this Terminal command even better: It hides any closed app from your Dock at all times.

defaults write com.apple.dock static-only -bool TRUE
killall Dock

Mac Os X Terminal Commands

Your favorites?

Have a Terminal command you love that we didn't mention? Drop it below in the comments.

We may earn a commission for purchases using our links. Learn more.

Mac Os Terminal Commands Pdf

Lawsuit time

Google faces privacy lawsuit over tracking users in apps without consent

List Of Mac Terminal Commands

Law firm Boies Schiller Flexner has filed another lawsuit against Google. This time, the law firm has accused Google of tracking users in apps even after opting out.

Capture dv cam software download mac free Windows Movie Maker isn't included in Windows 7, but you can download it for free from the.