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)

1
vote
1answer
38 views

Dropbox and locate?

I frequently use the locate command to find files on my machine, but it doesn't index the Dropbox folder. I can't find any way to configure the folder selection. Is there a way to include dropbox in ...
2
votes
1answer
25 views

What would cause a CLI utility to ignore arguments except when invoked directly?

Okay, so this just happened: iMac:bin nreilingh$ tree --version . |____tree iMac:bin nreilingh$ which tree /usr/local/bin/tree iMac:bin nreilingh$ ls -l /usr/local/bin/tree lrwxr-xr-x 1 nreilingh ...
1
vote
0answers
53 views

plutil returns error when a string numeric key is used

I'm trying to insert a row to a plist by using the following command plutil -insert "160" -string "hi" file.plist However the system was not so happy about the fact that I was using a numeric key ...
0
votes
0answers
53 views

Running shell commands from netcat

I have a shell script that I am serving up through netcat - I'm using this as an experiment to learn more about unix I can now do nc 127.0.0.1 1234 | sh and it will pipe the script commands into the ...
1
vote
2answers
393 views

How to determine public temp directory on OS X to be write-accessible by www server?

I've MAMP running httpd server as _www and I'd like to assign the temporary directory as part of the shell script (bash). I've tried to use $TMPDIR as per these posts: How do I find the 'temp' ...
0
votes
0answers
95 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 ...
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, ...
8
votes
2answers
444 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?
2
votes
2answers
518 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 ...
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
173 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 ...
2
votes
0answers
226 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 ...
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 ...
2
votes
1answer
90 views

How to evaluate the state of the OS X Server.app from a shell script?

I need to evaluate if the OS X Server.app has been installed and if it has been started or not. This I need to do from within a shell script. I could check for existing folder names, but I would ...
4
votes
2answers
1k views

Using the -Bless Command on Multiboot Macs with 10.11 El Capitan

As part of our standard deployment, we tend to deploy multiple OSs on Macs, from 10.7 to 10.11. However, with the new SIP (System Integrity Protection), the -bless command no longer works properly. I ...
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 ...
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 ...
1
vote
1answer
34 views

Root login using stdin

Can anyone tell me why this does not work? test:~ test$ echo 123 | su root su: Sorry Thanks
4
votes
1answer
48 views

How can I log all notifications?

Dropbox, PushBullet, Thunderbird and a dozen other apps create notifications. Is it possible to log these in a Unix-like way? I dislike the tiny messages popping up for a few seconds and then ...
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 ...
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 ...
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 ...
4
votes
1answer
435 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 ...
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 ...
2
votes
2answers
55 views

automatic save before “Run in Terminal” in BBEdit

I am a new BBEdit user, with a long experience as TextWrangler user. In TextWrangler, I am used at running python scripts with the command "Run in Terminal", and in TextWrangler the default behaviour ...
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 ...
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. ...
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
vote
1answer
98 views

Automating Terminal Commands with AppleScript

I have an Arduino-based device (www.picobrew.com) and needs firmware updating. The company wrote a little app to do it for Windows users, but us OS X users are out in the cold. Fortunately, we were ...
-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
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
151 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
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?
0
votes
0answers
159 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 ...
3
votes
2answers
128 views

Where Is Darwin's ARP Cache?

The Linux kernel generally tends to cache its ARP tables here: /proc/net/arp. Darwin & Mac OS X, however, do not seem to follow the same convention. So where can I find the Darwin & Mac OS X ...
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 ...
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
173 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 ...
1
vote
0answers
144 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 ...
2
votes
3answers
118 views

Find executables associated with Homebrew Formula

Some Homebrew formulas have names that do not correspond with any of the installed commands (e.g., coreutils, speech-tools), other formulas provide an command that matches up with the name, but also ...
-1
votes
1answer
559 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
918 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
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 ...
3
votes
2answers
513 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 ...