Using programs and commands that do not have a graphical user interface (GUI) but are rather controlled by typing text commands into a terminal program, or shell.

learn more… | top users | synonyms (2)

0
votes
0answers
94 views

Run Automator workflow or shell script at application launch/shutdown

As the title says, I'm looking for a way to run an Automator workflow (or a shell script) when I launch a specific application. When I shut down the application, I want to run another workflow/shell ...
2
votes
2answers
517 views

How to repair permissions after removing the group wheel from several items?

Is there a command in Single User Mode to recover/reinstall the start-up wheel (with root its user access). I removed wheel as a group from any file/folder it had permissions for or access to. I ...
8
votes
2answers
443 views

Check if caps lock on in terminal

Is there a way to query the system to tell if the caps lock is on or is off from the command line in terminal.app?
1
vote
1answer
75 views

“lsof -i” Command output explanation

i am attempting to maintain a closer eye on my Apple-Mac's outgoing and incoming connections; in collaboration with other processes such as tcpdump and netstat, i have been using the command: lsof -i, ...
3
votes
2answers
988 views

How can I determine if the screen is asleep in Mountain Lion, from the command line?

I have a script that needs to run every so often, but only if the screensaver is active or if the screen is asleep (to make sure nobody is actively using the computer first). I need to have a way to ...
1
vote
1answer
75 views

Run Terminal Command from .terminal file

I just figured out how to export settings from terminal which creates a .terminal file. And I realize that the ExecutionString parameter has changed to the CommandString parameter. I put a command in ...
1
vote
1answer
73 views

git auto-complete branches with checkout alias

There's this neat script to autocomplete git branches. It works fine with git checkout <tab>. But, I want to take it further. I have a checkout alias: alias co='git co'. How can I make branch ...
1
vote
3answers
62 views

Change html files to txt on entire folder

Is there a mac terminal command to change all .html files to .txt including the files in sub folders too?
0
votes
1answer
172 views

Any reason not to change the root shell to bash?

The default shell for root (at least on Yosemite) is /bin/sh. Would there be any problem to changing it to bash (or better yet zsh)? As far as a I know bash at least is backward compatible. I need ...
3
votes
2answers
512 views

Starting and stopping mysql server. Shorten and make automatic

Currently I start and stop mysql with the following command sudo /usr/local/mysql/support-files/mysql.server start sudo /usr/local/mysql/support-files/mysql.server stop It is quite a long ...
2
votes
0answers
224 views

Command line tool for interacting with Bluetooth Low Energy devices, similar to gatttool

I've just found out that some Python code I've got working on Linux also needs to work on OSX. For reliability reasons, on Linux I've been using a cludgy but effective approach to reading and writing ...
17
votes
3answers
17k views

Is there a command to install a dmg

I want to install a dmg file on a remote server. All I have is an ssh access. Since a DMG is a disk image, I tried to mount it, but mount does not seem to recognize its format. file says my dmg file ...
0
votes
2answers
74 views

Softlink /bin/bash to a brew-installed bash

It is a question related to this other one, but I can't comment. I've updated to use bash 4 from brew installation. But I don't know if changing all the header scripts from: #!/bin/bash To ...
0
votes
1answer
151 views

.profile is not loaded on non-login /bin/sh

The problem is in the title, but let me add few details here. I am running on OS X 10.10.5 (14F27). Using default Terminal.app. Content of config files Content of /etc/profile echo " # reading ...
2
votes
0answers
17 views

bash: ping: command not found [duplicate]

My shell can't find ping. $ ping -bash: ping: command not found $ uname -r 14.5.0 $ echo $PATH /usr/local/bin:/usr/bin:/bin:/Users/alex/.cabal/bin $ which ping $ However, man ping works and ...
6
votes
2answers
2k views

Mac renames itself automatically - host name is incorrect in terminal

I've got a handleful of macs (all with unique names) and on occasion it prompt a notice about saying another computer on the network as this name and adds a (2) or (3) to my mac. How can I set the ...
4
votes
1answer
89 views

Automate Yosemite Upgrade

I want to be able to launch the Yosemite Installer app from the Applications folder and install the upgrade with commands. When I look inside the InstallESD.img there are many PKG files, I am unsure ...
1
vote
5answers
150 views

How to remove top and bottom lines from a file using sed, awk, etc. in 1 step

I want to chop the top 13 and the last 6 lines from a file There are several answers on unix/linux but they aren't working for me as the sed options used aren't available on osx, tac isn't available, ...
2
votes
1answer
94 views

Ext2 utility “e2cp” alternative for OS X

In my linux machines, I use the command line utility e2cp to copy files from and to ext2 disk images. Unfortunately, OS X does not provide any ext2fs utility out of the box. Is there a version of e2cp ...
1
vote
2answers
2k views

Yosemite supplied curl stopped supporting https

I am having the issue that curl is failing to deal with https, and thus I cannot update Homebrew: brew update && brew upgrade fatal: unable to access 'https://github.com/Homebrew/homebrew/': ...
3
votes
1answer
766 views

Sorting out compile errors when using multiple different versions of Xcode

I am on Yosemite and trying to compile a software package using g++. Compiling this particular package has previously worked on Mountain Lion under Xcode 4.6.3, but now I have Xcode 6.1.1, and the ...
3
votes
1answer
345 views

How to record human voice and display as text on command line?

I am looking tool or a script that records human voice and displays as text purely on command line. I am not looking for text to speech, but rather speech to text. I do not want to work at all with ...
4
votes
1answer
433 views

Using python screws up the shell (and/or terminal?)!

The problem Simply opening and closing the Python sub-shell screws up my shell (or possibly the terminal?). It seems to remove the shell's ability to print any text I enter, including newlines after ...
6
votes
4answers
766 views

Can I modify a terminal command to do additional stuff?

I've looked into aliases, functions... but I have not come up with anything satisfying. Let me give you a couple of scenarios: 95% of times that I cd into a folder, I follow up with a ls command. ...
2
votes
0answers
84 views

Connect to server on command line

I am currently trying to connect my NAS on OSX 10.9.5 using the command line. This will work fine if I first connect my NAS using Finder: I select it in the "Shared" section of Finder's sidebar, click ...
0
votes
1answer
37 views

CLI Solution - Stripping File Attributes - LSOpenURLsWithRole()

I am getting this error when trying to execute an unsigned application that was downloaded via the native web-browser; Safari.app. LSOpenURLsWithRole() failed with error -10810.. There used to be a ...
1
vote
0answers
35 views

Command line replacement for tmutil

Anyone know of a command line replacement for tmutil, either script or binary? Failures of tmutil: Does not log. No meaningful diagnostics. Cannot resume interrupted restore. Cannot overwrite ...
1
vote
1answer
191 views

Terminal - don't require password for shell script to run

I am running Yosemite 10.10.5 and I have a shell script which I want to use to toggle whether my wifi connections run through tor or not. This uses the networksetup a couple of times and so asks for ...
1
vote
1answer
27 views

Terminal not responding to “which”, “type”, etc. commands

I tried to look for the full path of the TextEdit app in the terminal using the command which and whereis but the terminal doesn't respond. it just skips to the next line like there was no command: ...
-1
votes
0answers
44 views

Terminal Command to Edit Hostname [duplicate]

How can I edit the Hostname of my MacBook Pro via the CLI? Currently running Mac OS X Yosemite (Version 10.10.5).
0
votes
2answers
145 views

telnet shell-script in Automator

I'm partly new to Automator and since there is no application for Mac to control my Pioneer AVR I use some commands in the Terminal. But I'd like to automate some of my commands with the terminal. I ...
0
votes
1answer
53 views

npm commain in Automator

Hi, I would like to write an automator workflow which allows me to install node packages. I tried with $ npm insall but doesn't work any idea how I could solve this?
0
votes
2answers
59 views

Installing *.dmg via CLI [duplicate]

How are *.dmg packages installed via the command line? I noticed that they can be mounted with: me@MacBook-Pro:~$ open /Users/me/Downloads/installer.dmg What's next?
1
vote
2answers
44 views

generic approach to finding the correct name to run an app from the command line

Whenever I am not in a browser or in my text editor, most of my time on my mac is spent on the terminal. What's a quick, generic way to figure out how to run a gui program from the bash shell? It ...
0
votes
0answers
158 views

OSX Open Atom from terminal

I am trying to implement my own dotfiles. I am using zsh as my default shell. When I try to launch Atom from terminal I get this error FSPathMakeRef(/Users/agusgambina/Applications/Atom.app) ...
0
votes
0answers
15 views

control ios gestures on jailbroken iPhone via shell

Im looking for a way to do a simple scroll on an ios device via ssh or if theres a tool currently available that would work too. All i need is a way do do a scroll from the top of the screen to the ...
0
votes
0answers
24 views

Have URL scheme handled by shell (or other) script

I want to create a custom URL scheme, say x-camptown-races-sing-this-song-doo-dah-doo-dah, such that when I open a URL such as x-camptown-races-sing-this-song-doo-dah-doo-dah:foobar, it gets handled ...
1
vote
1answer
23 views

zero pad numbers in `cal` (or `gcal`) output?

This seemed pretty easy, but I have not found a good way to do it. In Terminal, cal will give this output: September 2015 Su Mo Tu We Th Fr Sa 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ...
3
votes
3answers
479 views

How to convert a DVD to ISO?

On Mac OSX 10.9, how do you convert a DVD into an ISO that I can use with players such as VLC. I wish to achieve this without buying a program. Steps I have tried: Downloading Mac app Burn. It ...
1
vote
0answers
54 views

Setting up command line email for Mac Yosemite

I am trying to setup my system to be able to send emails from command line. This link explains the steps, and I am able to send emails. However, I have one issue, the sender name is picking up the ...
0
votes
0answers
172 views

log in to iCloud via command line

I used to be able to Screen Share with 2 of my Mac minis in remote locations until I changed my Apple password. Now they are not showing up under Shared in Finder. I am still able to SSH into them. Is ...
3
votes
3answers
558 views

iTerm - going one word backwards and forwards

Would it be possible to configure iTerm 2 to go backwards and forwards one word through the curent text in the command line using a keyboard shortcut?
1
vote
0answers
143 views

defaults: command not found

i have two users on macbook pro (yosemite). one of them has access to the defaults binary in /usr/bin the other user gets command not found. looking up in /usr/bin --> no defaults. both accounts are ...
-1
votes
1answer
551 views

Essential Networking Commands [closed]

I'm used to working with Linux so I like being able to do as much as possible from the comfort of my Terminal.app bash shell. So.. What are the essential networking commands & utilities ...
0
votes
0answers
35 views

Xcode Zombies from the command line

I'm encountering EXC_BAD_ACCESS, and I'm not sure of the cause. I know that Xcode offers Zombies, but when I try instruments t="Zombies" my_program_name it doesn't seem to raise the appropriate ...
1
vote
1answer
913 views

Make `hostname -f` return fully qualified hostname

How can i make hostname (i.e. the unix commandline tool hostname, invoked in terminal) return a hostname including the domain information? At the moment, hostname, hostname -f and hostname -s return ...
1
vote
4answers
161 views

Quote a filename in a script passed to chmod?

I'm having trouble quoting a filename that's eventually passed to chmod. The script was originally written for SSH's StrictModes and authorized_keys, but I had to expand it due to a bad UMASK that ...
1
vote
1answer
95 views

No commands installed from pip work in Terminal

I've been learning python and tried to install pep8, restviewer and other command line apps but when i try to run them, it shows a command not found error. -bash: restview: command not found I've ...
0
votes
2answers
111 views

applescript will not stop running

I have an applescript that utilizes a named pipe and pipes data over to it. I have my script passing said data in a while loop, which is working, but I find that I am unable to stop the script ...
4
votes
6answers
13k views

How can I write a script to open multiple terminal tabs and execute code in them?

I want to be able to open the terminal application and have it either automatically run a script that opens several tabs and run an arbitrary set of commands in each. For example I would like one tab ...