Bash - Open Folder In Terminal

# from the command-line open -b "$1" # from inside an Automator service - best linked as a folder service open -b "$@" : ' Setup the Service on Mac OSX using Automator (not tested w/terminal snippet) 1. Open I found mine in the ‘/Applications/’ folder. 2. Inside Automator go to File > New, then choose “Service” for type of document. 3. Change ‘Service receives selected’ to: ‘files or folders’ in ‘’. (By default you should see ‘text’ in ‘any application’) 4. Under ‘Actions/Library/Utilities’ drag ‘Run Shell Script’ into your workflow window. (You may need to Show Library if this panel is hidden. Searching for ‘Run Shell’ will also show you the Action) 5. Inside the ‘Run Shell Script’ window set the ‘Shell type’ to “/bin/sh” and Pass input to “as arguments” 6. Set the shell script contents to: `open -b "$@"` 7. File > Save your workflow. (The name you give your file will be the name that appears in your Services menu) 8. If your file is in the following directory it should now be accessible by right-clicking a file/folder in the{username}/Library/Services/{filename}.workflowIf not, opening the {filename}.workflow file should prompt you to install the Service. '
Opens the Terminal window at the specified directory. Can be included in an Automator service to provide right-click access to the folder inside Terminal.

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.