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
12 views

Install automator service via command line

I would like to automate my Mac installation flow for services. The following is my script: #!/bin/sh rm -rf ./tempWorkflows mkdir tempWorkflows for filename in ./*.workflow; do cp -R "$filename" ...
2
votes
4answers
40k views

How to send text with telnet in Terminal?

I would like to send some text to a port on my machine using telnet in the Mac OS X Terminal. I start telnet using: telnet localhost 8080 Then I type some text. Is that text send automatically or ...
5
votes
3answers
8k 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 ...
0
votes
0answers
33 views

Whats the best way to upgrade the default compiler on El Capitan? [on hold]

Looking for the best and recommended way to install latest the GCC compiler alongside the default C++ compiler that comes with Xcode on Mac OS X El Capitan.
2
votes
1answer
43 views

Can I view history of recently connected USB devices in OS X?

Is it possible via the Terminal in OS X to show a history of recently connected USB devices. For example I want to know the specified ID of the MP3 Sony Walkman which I plugged into my MacBook Pro two ...
1
vote
1answer
22 views

How to change icon of an app through Terminal

I want to customize my app icons, but there's a lot of them, and I don't want to be tedious and go through the whole Get Info process over and over again. Is there any way to write a program, ...
45
votes
10answers
14k views

How do I speed up new Terminal tab loading time?

How can i speed up the terminal startup in Lion? I'm not referring to the startup of the Terminal application, but to the startup terminal windows, like when i open a new tab. I don't have anything ...
0
votes
1answer
18 views

Detect Terminal Color “Theme” from Command Line

When one uses the terminal inspector, one can change many properties of the terminal, such as background color, text color, and selection color. How can I detect what these properties have been set ...
1
vote
3answers
34 views

Missing bash prompt

My bash prompt is missing as shown on the image. I'm not even sure how to open the .bash_profile since dot files are hidden in the finder. I restarted the machine to no avail.
0
votes
2answers
38 views

Are there replacements for the reg commad on Mac OS X 10.9

I believe reg existed on 10.8 and lower as documented here - https://developer.apple.com/library/prerelease/mac/documentation/Darwin/Reference/ManPages/man1/reg.1.html However, in OS X 10.9 I only ...
0
votes
1answer
23 views

Unable to install with admin

I am trying to update MAMP MySQL from this link, but when i double click the file as mentioned in the blog. I get message saying, The file “Install_MySQL_5.6.25.command” could not be executed ...
-1
votes
1answer
30 views

Is there any way to view iOS device logs on the Terminal?

Is there any way to view iOS device logs on the Terminal? Do the logs get stored in any file?
4
votes
0answers
53 views

How do I use non-“legacy” launchctl commands to load and unload plists?

I have some plist files in ~/Library/LaunchAgents. I have been happily using launchctl load -w and launchctl unload -w to turn these on and off for years. However, I notice that now load and unload ...
3
votes
2answers
253 views

Easy way to execute shell script

I want to be able to search in Spotlight for a shell script (or something that calls a shell script) and that such shell script opens a Terminal window so the output is shown live (and I can interrupt ...
0
votes
2answers
464 views

How do I use llvm-profdata in Mac OS X Yosemite?

I have a simple question: how do I use the llvm-profdata binary provided by XCode's Command Line Tools in the terminal? I have installed the Command Line Tools and could see the binary in ...
1
vote
1answer
22 views

unable to install homebrew

unable to install homebrew I am using this command. ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)" getting this error. i have already installed updated ...
0
votes
2answers
61 views

terminal: how do i pipe the results of grep to open a file

I'd like to grep and open a file in just one terminal command. Suppose I'm in this directory: $ ls 1.txt 2.txt 3.txt 4.txt 5.txt and I want to open 3.txt I thought I could do ls | grep 3 ...
0
votes
0answers
14 views

All applications got paused after disk space usage got near 99% and back to normal. What's next?

Mac does some pretty fancy background stuff to try and keep enough disk space for whatever it needs. In my case, 512 gb ssd, it needs to have at least 20gb free to run smoothly, so I usually have 40. ...
1
vote
1answer
69 views

How do I create user accounts from the Terminal in Mac OS X 10.11?

I would like to be able to create new users in Mac OS X 10.11 remotely after ssh'ing into the machine. On Mountain Lion, these steps were listed. Running dscl . -create /Users/joeadmin dscl . ...
1
vote
1answer
1k views

How do I create a script to create/modify local admin accounts?

This question is almost exactly what I need for my project at work. We have approx. 400 Macs on our campus, and the problem is they were not all set up identically. There are at least 4 different ...
18
votes
3answers
27k views

What steps are needed to create a new user from the command line?

What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh. It looks like an existing pair of answers might work, ...
2
votes
2answers
157 views

Is it impossible to delete/move a file named “␀” on mac?

When I try to move, rename, or delete a file named ␀in Finder, I get this error message: The operation can't be completed, because an unexpected error occured (error code -50). With mv, rm or ...
2
votes
0answers
27 views

Why would “ls -R” on a mounted CDROM fail with e.g. “ls: notes: No such file or directory”

I popped an old CDROM into my computer and executed ls -lR /Volumes/CDROM and received dozens of error like this: ./notes: ls: notes: No such file or directory but /Volumes/CDROM/notes does ...
0
votes
2answers
28 views

How to put Wifi card in monitor mode?

When I run tcpdump, I do so after having connected to an access point. Is there a way to run tcpdump without having connected already?
4
votes
2answers
5k views

Howto install 'MySQL Utilities' using brew or brew cask

I installed MySQL server and client using brew. I installed MySQL Workbench with brew cask. But I don't find MySQL Utilities (something new?). Howto install that using brew or brew cask? ...
5
votes
1answer
180 views

Command line to disconnect or connect 802.1x authentication

I have been searching for a terminal command line to disconnect or connect 802.1x authentication, but not the network interface. I was searching some help pages and it showed command lines to export ...
0
votes
1answer
32 views

Can I programmatically install a specific version of JDK (i.e. using command-line tools only) on OS X?

I know you can apt-get JDK on Ubuntu. Is there anything similar on OS X? It looks like Oracle requires you accept a license agreement on ...
1
vote
2answers
62 views

Exiting/Starting the Terminal (El Capitan)

In the latest Mac OS X Terminal version I noticed that if I type exit and the press Enter, I get the following: Last login: Wed Jan 27 09:18:48 on ttys000 Ian-iMac:~ Ian$ exit logout Saving ...
4
votes
1answer
2k views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
1
vote
1answer
32 views

how to throttle Internet bandwidth?

In previous releases of OS X, there was a command called ipfw, that permitted throttling of network bandwidth, which is useful for running some kinds of tests on software. It appears that as of ...
4
votes
1answer
2k views

How to enable Maven autocomplete on Mac OS X command-line?

When using Maven (mvn) on OS X Terminal, how can I get tab-completion for Maven goals, plugin names, etc? Things like this: mvn pa [TAB] -> mvn package mvn je [TAB][TAB] -> mvn jetty:run
0
votes
2answers
38 views

Run command line tools as separate app

Is there a way to run command line tools as a separate app, so I can easily switch between them with apple+tab etc? I want this for things like a mail and irc client where I don't want to hunt down ...
1
vote
1answer
31 views

OSX Terminal no longer save my commands in history

Here's my issue. Last week I realized that my OSX (10.11.13) Terminal no longer saves the command I execute in the history file(s). To be more clear: I type the command test On the same terminal ...
2
votes
2answers
42 views

Single-button shortcut for “Do not Disturb”

Is there a way I can bind a single key on my keyboard to toggle "Do not Disturb"? It would be more convenient that opening up the notification center and moving that awkward slider. I do think that ...
2
votes
0answers
46 views

Issues with Anki and BasicTeX

My last Mac worked with Anki to display LaTeX formatted equations but I am still, but I haven't been able to transfer it over. My steps thus far: I obviously downloaded and installed Anki and ...
0
votes
2answers
33 views

Backward compatibility of shell scripts

I use a .command file to start a basic shell script in the form: #!/bin/bash -- this simply starts Something at /usr/local/bin/Something myLittleOneLineScript To make it work I changed its ...
1
vote
1answer
36 views

Can't seem to redirect input in Terminal

I'm having issues getting redirection to work in Terminal. I'm in a C++ class where we have to create an application, then find that application in the Terminal and place a text file in the same ...
4
votes
2answers
1k views

-d option for split is illegal on OS X 10.9

I have bash script that works on Ubuntu but for OS X 10.9 i get the error for split command: split -b 1000000 -a 3 -d $F $F && rm $F || { echo "Error: 'split' command not installed" ; exit 1 ...
3
votes
2answers
2k views

How can I set the display settings using command line

I would like to configure the 'Scaled' property of my Macbook Pro display using the command line. How could I do that?
3
votes
2answers
99 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 ...
0
votes
1answer
28 views

sudo and some other system commands not working with platypus

I am making a shell script that works great on its own, but does not work correctly when packaged with Platypus. It does not want to execute sudo, and a few other system commands. Are there any work ...
0
votes
1answer
52 views

Help converting Apple Script to Shell Script

This Apple Script works great to mount the logged in Active Directory users network homedrive as a mounted network drive but we currently have it running as an App at login via "Login Items". ...
1
vote
1answer
31 views

FTP file to specific path on server

I try to FTP a file with a one liner in a shell from a mac to a folder on my server. Doing the same in the FTP-Shell is not a problem for me, but doing this in one line is not possible to me. I even ...
0
votes
0answers
22 views

Why does Image Magick fail to read fonts?

I'm trying to create a simple contact sheet of all the photos in a directory using Montage: $ montage -font Helvetica -pointsize 10 *.png contact_sheet.jpg However, I keep getting a error reading ...
3
votes
2answers
192 views

Upgrade OS X operating system from the command line

You can upgrade software with sudo softwareupdate --install --all. Is it possible to upgrade the OS itself from the command line?
29
votes
15answers
19k 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
2answers
13k 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
39 views

Set default user in terminal

I just formatted my Mac and upgrade it to El Capitan, When I open Terminal I see that I am always logged in as root: How can I get my usual user name every time I open a new Terminal window, I ...
3
votes
4answers
10k views

How to find all files that are larger than 1GB on the Mac HD?

It seems that either one of these commands can be used: sudo find / -size +1G sudo find / -type f -size +1G But when it gets to /Volumes, it actually look at all the back up files by Time Machine ...
3
votes
1answer
73 views

Why does this cause Mac OSX to print over SSH?

While screwing around and breaking things I came across these stupid commands (if executed in order it causes what I got): cd / && cat vmlinuz cd /boot/ && cat init* It causes ...