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
votes
1answer
59 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 "./sudo"...
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 http://stackoverflow....
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
81k 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
25 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
38 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
28 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
69 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
58 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
871 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
15k 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?
103
votes
18answers
113k 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
52 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
32 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 command-line?...
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
34 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
37 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
23 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
313 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
162 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 com.apple....
2
votes
1answer
102 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 it. ...
4
votes
1answer
316 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
135 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: /usr/...
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
41 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
50 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
48 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
471 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
40 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
28 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?
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
25 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
19k 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 ...
0
votes
0answers
49 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 ...
2
votes
1answer
107 views

How to set up wireless bridge on same subnet?

I have set up Internet Sharing over Wifi on an ethernet-wired desktop Mac running Yosemite 10.10. I have various OS X and iOS clients that are able to connect to the shared Wifi connection and access ...
1
vote
1answer
87 views

One line weather output from terminal

Anyone knows a way to get a one line weather output in the terminal window with specified location? So far I'm using curl wttr.in/city but I would like a one output like City, Sunny 0'. I've found ...
0
votes
0answers
13 views

R installed through MacPorts won't install packages

On my system where I installed R through MacPorts, I get this error when I try to install a new R package: > install.packages("sas7bdat") Installing package into ‘/Users/simsong/Library/R/3.2/...
0
votes
1answer
54 views

Trying to compile thttpd 2.27 on Mac OS X 10.11

I'm trying to compile thttpd 2.27 on Mac OS X 10.11 from source, but when I issue: ./configure It shows: creating cache ./config.cache checking host system type... configure: error: can not guess ...
108
votes
9answers
81k views

What is the difference between iTerm2 and Terminal?

I keep hearing that iTerm2 is much better than Terminal. I downloaded iTerm2 today and played around with it, but I couldn't see what is so much better about iTerm2. iTerm2 seemed just like Terminal. ...
4
votes
4answers
3k views

Can I list files ordered by date added to a folder from a command-line tool like ls?

I need to build a script that shows files in the same order as the default Downloads folder in the dock, ordered by Date Added, newest first. I can't seem to find the option in ls. Any other way to ...
4
votes
4answers
7k views

How to open a new Terminal tab in current working directory?

I want to create and run a bash function that: cd into a project's directory Open a new tab in Terminal in the same directory Open my dev tools and start dev services Item #2 doesn't work as ...
0
votes
1answer
34 views

Deleting password from Keychain in terminal

I'm having trouble deleting the github credentials from Keychain Access. Keychain Access just freezes everytime I try. Is there a command to force deletion of an item in the Keychain from the terminal?...
0
votes
1answer
42 views

Mac OSX equal to linux time command

What's binary that will give exact result for Linux's time command flags? alias tcmd='/usr/bin/time \-f\ "CPU: %Us\tReal: %es\tRAM: %MKB"' Current time in Mac OSX for command above is: /usr/bin/...
0
votes
0answers
78 views

LSOpenURLsWithRole() failed with error -600 when opening html file from terminal

I created a new test.htm file in my homedir, and when I type open test.htm it switches to Firefox, just opens an empty tab (my file does not appear), and the terminal says: LSOpenURLsWithRole() ...
9
votes
3answers
2k views

How to isolate processes that evoke insane mds_stores disk read activity?

I have an interesting situation where when I monitor my disk activity, I find that mds_store is continually running between 1 to 35 megabytes per second (averaging around 3-5 MB/s) on the read and ...