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
2answers
51 views

Why does my iTerm2 launch with an X in it's path?

After upgrading to El Capitan, then working on installing Rails, my iTerm2 shell now opens with x >, instead of just >. Can someone please explain why this is happening, and help me figure out ...
0
votes
1answer
179 views

OS X El Capitan: man, command not found

Today I was trying to update openssl in my MacBook Pro with El Capitan 10.11.2. I don't know where I made a mistake but it seems I have accidentally disabled man. In fact, if I launch man ...
35
votes
4answers
20k views

MacPorts vs. Fink vs. Homebrew [duplicate]

I always used MacPorts to install and maintain my GCC compilers and other programs. Now I've heard about Fink and Homebrew. It seems these two utilities are gaining ground in the Mac community, but I ...
0
votes
2answers
41 views

Is it possible to set the JAVA_HOME env in El Captitan?

I am unable to set the JAVA_HOME environment variable osx. I added the following line to my .bash_profile export JAVA_HOME=`/usr/libexec/java_home` and sourced it afterwards; yet when I printenv or ...
5
votes
4answers
1k views

pbpaste, pbcopy using wrong pasteboard?

I'm converting a shell script which xclip and similar tools on Linux, to use pbpaste and pbcopy on Mac. The problem is the default pasteboard ('general' according to the man-page) for these tools is ...
0
votes
1answer
49 views

OS X Terminal: 'ls' shows program but then says command not found?

I am trying to start MongoDB from the terminal. When I navigate to the folder and hit 'ls', all the applications show up but when I type in the name of the application( 'mongod'), it says it is not ...
3
votes
3answers
118 views

Display interactive notifications (with buttons) via Terminal

I'd like to let my bash shell scripts to display gui notifications with two buttons that the user can click and then execute some commands depending on the button pressed. What options exist?
162
votes
8answers
85k views

How can I trigger a Notification Center notification from an AppleScript or shell script?

I'd love to be able to take advantage of 10.8's Notification Center features in AppleScripts and shell scripts I write. Is there a built-in command or a third-party library I can use from either an ...
4
votes
1answer
590 views

How can I “Open an app from an unidentified developer” without using the GUI?

Basically, I used the native Safari.app web browser to download a third party application and I want to run / open it from the comfort of my bash shell / Terminal.app CLI; despite the following error ...
1
vote
1answer
291 views

Manage login items from terminal in 10.11 El Capitan

Previously, % launchctl submit -l label -- command args was the way to go. This does not work in 10.11.2, I'm fairly sure it was working in 10.10.x, but cannot be certain. The likely-looking ...
3
votes
3answers
244 views

Can Safari's download popover window be made wider?

How can the max. width (fixed width≈425) of Safari's download-popover-window be made wider? Is there a way to get at Safari's "download pop over window" in any way so its max-size is larger than 425 ...
92
votes
9answers
167k views

Why doesn't .bashrc run automatically?

I put some alias commands in my .bashrc file, so that they might be loaded everytime I open a new Terminal window. Yet this doesn't happen. I have to select run script: in the ...
1
vote
1answer
89 views

What does “is not recognized as an internal or external command” error mean?

I have spun up a VM of OS X since my main user is not an admin and I need to do things that require admin access. My end goal is to install the Xcode command line tools into a VirtualBox VM I created ...
3
votes
3answers
52 views

Unexpected changes to command line

When I open up a command line on my Mac the welcome message is usually Last login date Johns-MacBook-Pro$ This now reads... Last login: Fri Dec 18 23:48:34 on ttys000 Johns-MBP-2:~ johnw$ What ...
0
votes
0answers
92 views

Compiling Ghostscript in El Capitan

I'm trying to compile Ghostscript-9.18 ( i need libgs ) and I've run into the new Rootless Security stuff when I try to install the libs. How do I change the target from /use/include to ...
2
votes
1answer
92 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 ...
1
vote
0answers
11 views

Why the service does not start after logging in

The service is jenkins installed with homebrew on Yosemite. I have this: ~/Library/LaunchAgents/homebrew.mxcl.jenkins.plist and this: % launchctl list | grep jenkins - 0 ...
4
votes
1answer
57 views

OSX: how to determine USB current draw?

I connected a device to my USB port, but it's unclear how much current it is drawing. Is there a way from the command line, or otherwise, to determine how much current that device is drawing?
2
votes
1answer
6k views

How to repair and/or reinstall Homebrew safely?

I am trying to repair Homebrew. I recently tried to reinstall it but when I typed "brew doctor" My output was: shell-init: error retrieving current directory: getcwd: cannot access parent ...
5
votes
2answers
630 views

grep: command not found

This is a very weird behavior. Lately, whenever I am trying to find a process on console with ps aux | grep foo, it is returning a grep: command not found. Ok, that could be something that I changed ...
3
votes
1answer
52 views

Why is the host name in the shell prompt “MacBook-2” instead of “MacBook”?

I opened Terminal on my MacBook Pro and the prompt read MacBook-2:~ myName$. Is there something wrong? Do I need to be worried about this? Why "-2"? Thanks in advance.
1
vote
1answer
255 views

How can I create bash_profile and bashrc [duplicate]

OS X 10.11.2 El Capitan I want to create some alias, so I go to ~/ folder and there is no .bash_profile or .bashrc. I have been looking for some info and I learn that .bash_profile is only read ...
2
votes
1answer
539 views

What's the BSD equivalent of the linux date command for adding subtracting days/weeks/months from a given date?

I have a given date, such as 2013-10-31 and I need to accurately determine the next day (taking into account DST, leap years, leap minutes, timezones, etc). I have no way of knowing whether the date ...
10
votes
4answers
3k views

How to deal with commands of conflicting names listed in `brew doctor`?

So after brew doctorI`ll get the following without any recommendation: Warning: You have external commands with conflicting names. Found command `brew-cask` in following places: ...
3
votes
2answers
437 views

How do I programatically kill the CCLibrary process by PID?

I need to know how to write a command or script to kill the CCLibrary and CCXProcess processes. They are part of Adobe's Creative Cloud, and since their previous update they keep respawning and ...
0
votes
1answer
22 views

'soft return' in iTerm2

I'm just wondering is there a way to enter a new line in iTerm 2 without executing the line being typed? I am looking to make use of some relatively long commands to automate some things, but not ...
4
votes
2answers
474 views

How to use cd with shell variable containing spaces

I am trying to create an environment variable for a path that is long, has a space, and syntax. I tried the following: export temp=/Users/username/Dropbox (Personal) And added it to my .profile. ...
1
vote
2answers
43 views

How do I remove multiple owners from a file/folder?

While trying to set up MAMP/PHPStorm, I CHOWNed the OWNER of my Sites folder to _www from myUser. Since this did not resolve the problem I was experiencing, I attempted to CHOWN myUser ...
0
votes
1answer
182 views

install libsoup on macbook pro

I have a shell script from a open source project, when I run it in terminal, I get the following error: ./configure: line 17678: syntax error near unexpected token `soup,' ./configure: line 17678: ` ...
2
votes
1answer
369 views

Terminal wraps at 80 chars even if window is wider

Problem description If I increase the width of a Terminal version 2.3 (309) window, and then use less (or some command invoking less, like man) in that window, I often get garbled output, since the ...
2
votes
0answers
48 views

How to customize drag-n-drop-to-Terminal path escaping results?

How can I change the way in which filenames are escaped (formatted) when dragged from applications and dropped into Terminal? For example, paths may be escaped with \, just spaces (), or other ...
4
votes
2answers
3k views

How can I update my version of `unzip` to version 6.00 or higher?

Its a common problem that, when unzipping (read: 'open by double-click'), some .zip files result in a similar sized .cpgz file. But you expected an unzipped file or folder instead. The default unzip ...
14
votes
2answers
1k views

Can I call a phone number from the Terminal?

In Yosemite, is there a way to start a phone call from the command-line aka Terminal? Something like: call +316123456789
0
votes
1answer
34 views

Adding a compiled application to $PATH. Understanding the problem

I'm trying to understand the whole $PATH problem but I've got no luck so far. Suppose that I've just compiled an executable with make and I need to launch it with the shell without using the full ...
3
votes
3answers
854 views

How to check installed OS X version from the command-line on each partition?

I'm managing a lot of Macs and each machines has several partitions with different OS versions. I would like to create a script that I could run to do an inventory of all partitions of all machines ...
1
vote
2answers
68 views

Shell script failing in Automator but works if I copy/paste into Terminal

Workflow I'm trying to achieve: Export SVG file from Adobe Illustrator to Desktop Drag SVG file from Desktop onto Automator Droplet Automator runs script (basic summary below) Script executes and ...
3
votes
3answers
2k views

How to enable/disable Do Not Disturb from shell on Mavericks

I would like to toggle the Do Not Disturb in the notification center with a keyboard shortcut. I am using better touch tool for some extra keyboard shortcuts but it does not support ...
8
votes
2answers
3k views

Adding a song file to iTunes via the command line without playing the file

I want to add song files to iTunes via the command line. open -a iTunes -g song.mp3 does exactly this. - However it starts playing the song, too. Any way to avoid this?
7
votes
6answers
41k views

How do I execute command line scripts?

In Windows, I can create .bat files. I double click it and all lines are interpreted as if I had entered it into the console. In OS X, what file or program do I have to use? If I want write a file ...
0
votes
0answers
12 views

How can I tell if a particular directory is connected to a remote machine?

I've found various ways to check if a particular directory is mounted under NFS (here, for example), but none of them seem to work on OS X. How can I check if a particular directory is an NFS ...
14
votes
4answers
6k views

Install shuf on OS X?

Ubuntu Linux has a great tool called shuf, which works like head except that it gives you ten random lines. I couldn't find it on Homebrew. What is the simplest way of installing it on OS X?
0
votes
0answers
61 views

Command line to disable full screen behaviour of green button in windows bar

Is there a command line to revert the behaviour of green button in 10.10 and later? I don't like the full screen approach and I prefer a maximize behaviour. I don't want to use an external tool like ...
4
votes
3answers
5k views

chsh doesn't change $SHELL

I'm having some difficulties in changing the value of $SHELL in OSX's iTerm app. iTerm is starting in /bin/zsh, but the value of $SHELL doesn't seem to change. What I've done: Changed "command" as ...
10
votes
3answers
4k views

Are the OSX Mavericks tags visible from the command line?

For example, suppose I have a directory structure such as /Users /tlehman /Math algebraic_varieties.tex [tagged: Math, Documentation] projective_geometry.pdf ...
1
vote
1answer
210 views

Mac play not added to path

I have installed the play framework using typesafe-activator. However, this does not appear on in PATH. Therefore, I can not use Play from the command line: Octavians-MBP:exericsePS octavian$ play ...
94
votes
17answers
107k 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 ...
1
vote
0answers
368 views

Does OSX 10.10.4 support LZMA compression at the individual file level (not tar files)?

From the command line, I would like to compress some database dumps using the LZMA algorithm. And, OSX adds XZ support (written in October of last year), claims " It turns out the XZ support in OS X ...
14
votes
3answers
8k views

Change default shell from bash to zsh

I've tried to switch my default shell to zsh, using chsh: chsh -s /bin/zsh and: chsh -s `which zsh` Both commands ended with: Changing shell for adamatan. Password for adamatan: chsh: ...
1
vote
1answer
310 views

How to send email from OS X command line

Dozens of tutorials followed and nothing works. msmtp doesn't work ("TLS certificate verification failed: unable to get local issuer certificate" (cert installed) postfix doesn't work (no way to ...
0
votes
0answers
25 views

How to see all services available for launching with launchctl?

I tried this on Yosemite: launchctl list but it doesn't show e.g. postfix which I have just launched with: launchctl kickstart system/org.postfix.master Is there any way of listing all the ...