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)

11
votes
2answers
3k views

Shell Script for Yesterday's Date

I'm trying to execute the following shellscript with hazel app on any file in the folder. It works, but the only thing thats causing a problem is the date for yesterday. #! /bin/bash saveDir="TJ" ...
101
votes
5answers
184k views

Can I open files in TextEdit from the Terminal in Mac OS X?

I frequently find that a terminal command to open a file in TextEdit would be very handy. Does such a command exist on Mac OS X?
0
votes
0answers
9 views

How can I put a Realtek wifi adapter in monitor mode?

I have an ALFA awus036nhr wifi adapter and can use it in monitor mode in Linux but I can't use airmon-ng in OS X even though I have airocrack-ng installed, and running tcpdump -Ii en6 returns: ...
0
votes
1answer
30 views

What automatic script runs with Bourne Shell (/bin/sh) for root?

I want to add some aliases to my OSX command line environment for easier navigation when in the root prompt (sudo su to root). On the Bourne Again Shell (/bin/bash), I can edit ...
2
votes
2answers
2k views

Change accessibility setting on Mac using terminal

I would like to grant accessibility permission to some apps on Mac using Terminal as per this intruction https://support.apple.com/en-au/HT202866 which is the accessibility tab in System Preferences ...
42
votes
3answers
19k views

Linux' `ps f` (tree view) equivalent on OSX?

How can I get a tree view like the one below on OSX? vartec@some_server:~$ ps xf PID TTY STAT TIME COMMAND 11519 ? S 0:00 sshd: vartec@pts/0 11520 pts/0 Ss 0:00 \_ -bash ...
4
votes
1answer
119 views

How to access GPS data from command line on jailbroken iPhone

Are there any binaries available via the command line to get information from the GPS on a jail broken iPhone? I've searched through Cydia and haven't found anything, but I wouldn't imagine this ...
0
votes
0answers
10 views

Can't delete keychain items with UI, but command line works fine

When using the Keychain Access app, I am often unable to delete an Web form password item. I have tried hitting the delete key and going to Edit > Delete. In both cases, nothing happens, there is no ...
-1
votes
1answer
55 views

Can naming/running a program “sudo” somehow cause problems?

I hope this is an appropriate place to post this--I have no idea what happened. I named a c++ file (a simple sudoku solver) "sudo.cpp" and then compiled it with "g++ sudo.cpp -o sudo" and ran ...
2
votes
2answers
2k views

“xcode-select --install” versus retrieving the dmg from Apple's developer website

I would to ask a question closely related to already existing posts (How to install command line tools without error that is not currently available on Software Update server? and ...
0
votes
1answer
61 views

I lost my bash commands (error command not found) [closed]

I was trying to set up Python environment (virtualenv and virtualenvwrapper, following this tutorial - Install OpenCV 3.0 and Python 3.4+ on OSX) and that's where my problems started. The wrapper was ...
0
votes
1answer
23 views

Does Apple provide a web site with content of `man` pages for the command-line commands bundled with Mac OS X?

I want to provide URL links to man page content at apple.com as an authoritative source of information. Describing and quoting the local man page is awkward. Does Apple provide man pages on the web?
34
votes
15answers
79k views

Password dialog appears when SSH private key permissions are set to 0600

I installed my SSH private key in ~/.ssh/id_rsa and set its permissions to 0600. When I connect to an SSH server which uses my private key in Terminal.app via ssh, a dialog pops up and asks me to ...
1
vote
1answer
15 views

Carbon Copy Cloner shell script for ejecting the source drive

I created a backup system for a friend, using Carbon Copy Cloner. The system has been up and running since January, but it needs regular intervention. The main problem is that external hard drives ...
0
votes
2answers
31 views

Workflow/tools for installing command line application on OS X (Yosemite or later)

I maintain a set of command line bioinformatics tools which we distribute as source and binaries for Linux, Windows, and OS X. Currently the binary distribution for OS X is just a zip file containing ...
0
votes
1answer
21 views

Finding file in parent folder of an AppleScript

I have an AppleScript that calls another script (a perl script in this case) which resides in the same folder as the AppleScript. Now I'm trying to put the script into a variable like this: tell ...
1
vote
1answer
55 views

Error when using “pmset sleepnow”

Whenever I use pmset sleepnow in Terminal (even with sudo) I get this error: Unable to sleep system: error 0xe00002e2. I have no idea what's going on. Please help!
1
vote
1answer
41 views

How can I find the serial number of my Apple Keyboard USB on a mac programmatically from the terminal?

I would like to retrieve the Apple USB Keyboard's serial number from a command to use in a script. What command can I use ?
3
votes
2answers
835 views

Why setting image as its own icon with sips result a blurred icon? Are there any alternatives?

I've successfully changed icons using the procedure described in an another question: Changing or setting a file or folder icon programmatically. Either my sips (or Finder) got broken afterwards or I ...
36
votes
8answers
14k views

How can I change a file or folder icon using the Terminal

How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
99
votes
18answers
110k views

Is there a Mac OS X Terminal version of the “free” command in Linux systems?

On Linux, I often use the free command to see the current amount of free and used memory in the system. For example: $ free total used free shared buffers cached ...
3
votes
1answer
45 views

root user can't create a file in /usr/lib

I am trying to follow this advice from stackoverflow and copy some library files from /usr/local/Cellar/openssl/1.0.1c to /usr/lib/. I have tried cp, ln -s and even touch, but they all fail. I am ...
0
votes
1answer
22 views

Send notification from command line [duplicate]

On Mac OS X, some applications will display a notification that appears briefly in the upper-right corner (e.g., when I receive email). Is there a way to generate a notification from the ...
29
votes
15answers
21k views

Lock Screen Command One-Liner

I'm trying to find out whether there is any kind of equivalent command line one-liner which replicates the exact identical functionality of the 'Lock Screen' menu option available via the Keychain app ...
4
votes
5answers
2k views

How to find the currently connected network service from the command line?

I would like to find out which of the available network services (e.g. Ethernet or Wi-Fi) is currently active. In this screenshot from the Network Preferences, you can see that Wi-Fi is currently ...
1
vote
0answers
32 views

Are there any advantages to using GNU over the default OSX command line utilities? [closed]

Are there any advantages to using GNU utilities (installed via homebrew) as opposed to the default, BSD based OSX utilities? They seem very similar to me, but I will not pretend to be a master of ...
1
vote
1answer
34 views

Is there a terminal command to open applications in a specific Desktop?

For example when I run open -a Kodi I'd like to be able to specify which Desktop I'd want the application to launch in. Trying to avoid dragging/dropping to the desired workspace.
6
votes
5answers
8k views

Creating a virtual serial port

I'm trying to create a pair of virtual serial ports on my mac. This is fairly easy to do with many shareware programs on a PC. I figured there would be some uber-powerful shell command to do this in ...
0
votes
1answer
21 views

To get Graphical Info reader in El Capitan?

Graphical info reader is the reader which colorises links in the info pages. I know there are good options in OS X but I cannot find them. I do home search info and I get homebrew/science/clinfo ...
0
votes
2answers
306 views

Can't install WordGrinder on Yosemite

Recently, I have been trying to install WordGrinder on Yosemite. First I tried getting the latest tar packages from the developers' website and using them, but I ran into some library linking errors ...
3
votes
1answer
143 views

Why does OS X have bash v3.2.57?

OS X comes with bash version 3.2.57 instead of bash version 4.3.39, which GNU lists as the current stable release of bash. Is there any way to upgrade bash on Mac OS X?
1
vote
1answer
9 views

Transfer statistics per process or destination, not interface

I would like to log upload statistics for an application I run on my Mac. Now, I know that with netstat -ib I can access statistics per network interface. I also know that with lsof -i I can get a ...
10
votes
6answers
5k views

How to list all available .plist keys on a certain domain application by defaults command?

I want to know all keys (property list) which available on certain domain application, as example I could list available key for com.apple.dock by entering this command: $ defaults read ...
2
votes
1answer
101 views

How to fix “You are not allowed to use ”Application“”

How do I fix this message, I am Admin, Mobile. Even if i login to a root account this message still appears. I have iTerm so if any commands need to be inputted to fix this problem I can still do ...
4
votes
1answer
307 views

Building mysql with readline instead of editline

I'd really like to be able to use readline instead of editline with the mysql client, but I can't find out how to do this. The bottled mysql that brew installs by default for mavericks is using ...
0
votes
1answer
108 views

Error while installing Homebrew on Mac OS X (10.10.3): Unable to change file mode on /usr/local/

When I run the command on the home brew website, /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" I get: ==> This script will install: ...
0
votes
1answer
34 views

'cat' not displaying line breaks

For some reason cat no longer shows line breaks when I use it, while all other tools (grep, more etc) do. I am using iterm2 on OSX 10.11.4. What could be causing this behaviour? Example I have a ...
1
vote
1answer
33 views

Force enabling TRIM before setup assistant is run

Basically, I'm preparing to give a MacBook Pro, running Mac OS X 10.11.4, to someone, but I need to execute "sudo trimforce enable" beforehand, as it contains an aftermarket SSD (fully compatible with ...
3
votes
2answers
47 views

How to Change USB Thumb icon using Terminal or Bash/other scripting language

I'm looking for a method to change USB or External Drive Icon using bash or any other command line method. I know how to manually chnage them like this I am using El Capitan
0
votes
0answers
39 views

In Terminal, how do I run a curl command to POST data?

I'm using OS X Yosemite and having trouble running curl to POST data to my local server. Below is the command I'm running and the response: localhost:myproject davea$ curl --header ...
5
votes
3answers
436 views

setup youtube-dl destination to ~/Downloads

How do I setup youtube-dl to default download to ~/Downloads instead of the home folder?
1
vote
2answers
31 views

How to Install pdfimages in El Capitan?

I am reviewing the answer here about Extracting embedded images from a PDF. It is not in Homebrew. How can you install pdfimages in OS X El Capitan?
1
vote
0answers
22 views

El Captan disk utility did not see erased partition after fail bootcamp install

I try to get my full drive after fail a bootcamp install of Win. Now I have removed extra partition from my fusion drive, but can’t see empty space using the el captan disk utility. Using shell, ...
1
vote
1answer
19 views

Does Homebrew have a command-not-found hook?

Arch Linux's pkgfile has a command-not-found hook that you can source from your shell's startup file (.zshrc, .bashrc, or whatever). Does Homebrew have anything roughly equivalent to this?
5
votes
3answers
9k views

Is there any way to access the console logs on an iOS 8 device without installing Xcode?

The title says it all. Prior to iOS 8, one could use iPhone Configuration Utility, but that no longer works. Is there any other way to access these logs without installing the gargantuan XCode? Are ...
2
votes
2answers
3k views

Open a new Safari window in the current Space from Terminal with multiple tabs (URLs)

How to open an new Safari window from Terminal in the current Space? Now when using the open http://example.com command it opened the URL as last tab on my first Safari window. I'm looking for a way ...
2
votes
1answer
23 views

Preferable way to ship a command line tool with my OS X *.app

I'm working on an Electron based application to write OS images to removable drives, which is being packaged as an *.app for OS X. Along with the GUI application, I'd like to ship a CLI version ...
5
votes
3answers
18k views

How do I force a partition and format on a USB key in OS X Mountain Lion Disk Utility or from CLI diskutil?

I have a brand new Memorex TravelDrive 64GB USB disk which is being troublesome. It's formatted FAT16 on MBR, which is not so nice, and I'd like to put it on HFS+. I've tried to do this through ...
-1
votes
0answers
13 views

Adding text to a png with OS X bash but without third-party installed? [duplicate]

$ convert -bash: convert: command not found $ gm -bash: gm: command not found Is it possible to make an OS X El Capitan bash script to add text to an image (a png), without installing ...
0
votes
0answers
37 views

Get result of Terminal tab do script via commandline

I've seen similar questions like this but none seem to deal with getting the result from a specific Terminal tab? I'm writing a Chrome extension to do some awesome stuff. Right now I'm just trying to ...