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 (1)

1
vote
1answer
21 views

Lock Screen from Command Line? [duplicate]

I have activated the Keychain Menu Bar icon so I can relatively easily click Lock Screen to lock the screen of my MacBook. Is there a way to do this with a shortcut or via the command line? I know you ...
0
votes
1answer
33 views

grepping /Library and “Too many levels of symbolic links”

I'm trying to clean up remnants of an application that was removed: $ sudo grep -R "iNet Network" /Library ... grep: ...
1
vote
1answer
9 views

generic approach to finding the correct name to run an app from the command line

Whenever I am not in a browser or in my text editor, most of my time on my mac is spent on the terminal. What's a quick, generic way to figure out how to run a gui program from the bash shell? It ...
1
vote
0answers
20 views

Command line tool installed, but gcc/g++ compiler not working

Heads up, I have a similar problem such as in this question, but it wasn't resolved: how to debug configure.sh errors when compiling rsync on Yosemite So basically I am looking to compile code via ...
1
vote
2answers
248 views

Is there a command similar to Linux's command-not-found?

Most Linux operating systems have a package like command-not-found (http://packages.ubuntu.com/utopic/command-not-found), which provides suggestions when a shell command was not found, e.g. because ...
2
votes
2answers
71 views

How to find .bashrc or .zshrc?

I just got a MacBook Pro and am in the process of trying to get GNU commands installed. I'm following this guide, but I don't know how to do: Then add the following line to your .bashrc or .zshrc: ...
1
vote
1answer
22 views

How to list audio card IDs from terminal

I am developing a script which deals with sound recording. As user potentially can have multiple sound cards attached, I would like to give him/her a chance to select desired one. The software I use ...
2
votes
4answers
99 views

How to go to alias from terminal?

By alias, I mean the folder shortcut created when you right-click a folder in Finder and select "Make Alias". I can traverse symbolic links in Terminal with cd, but it doesn't work on aliases: bash: ...
-1
votes
1answer
27 views

Command to find out the version number of a .pkg file

Does anyone know how to retrieve the version number of a .pkg file which isn't installed yet? I'd like to use something like pkgutil --pkg-info, but that only works for installed packages. I've ...
0
votes
0answers
15 views

-bash: /Users/[me]/.rvm/scripts/initialize: No such file or directory

I was in a directory where I had a ~ and I went to remove it by doing rm -f ~ for which it said it was a directory. So I made the really silly move of doing rm -rf ~ and suddenly I get the error ...
0
votes
2answers
49 views

How can I create a script with multi command

I tried to create a script on OS X. I do something wrong. I want to execute 2 command: defaults write com.apple.finder CreateDesktop -bool true and killall Finder I saved and chmod the file but ...
1
vote
1answer
29 views

CLI options do not work if passed at the end of command [duplicate]

In brief: ls -a /tmp works but ls /tmp -a does not. I recently started using Macbook Pro. Coming from a Linux background, command like ls /tmp -a seems perfectly fine to me. But for some reason ...
0
votes
0answers
45 views

How to disable Bluetooth Sharing via terminal?

I want to disable the Bluetooth Sharing that is located in the sharing preference section. I want to be able to disable it via terminal, does anyone have an idea on how to do that?
0
votes
0answers
16 views

mdimport - bad packing

While forcing the index of a folder on an external drive through the command line (mdimport), I get "bad packing" pushed to stdout. Anyone have an idea what this rather cryptic error means?
1
vote
1answer
56 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 ...
0
votes
1answer
29 views

mysql: command not found [duplicate]

How do I use MySQL from the CLI? When I use the terminal, I get: Darrens-MacBook-Pro:~ thufir$ Darrens-MacBook-Pro:~ thufir$ mysql -bash: mysql: command not found Darrens-MacBook-Pro:~ thufir$ ...
1
vote
0answers
56 views

Cannot compile anything anymore after upgrading to Yosemite

I noticed after upgrading to Yosemite that none of my upgrades in homebrew would work anymore. I noticed that it was a problem in general with compiling any kind of C code. The error I get is: In ...
1
vote
1answer
37 views

How do I get the name of the wifi network I'm connected to?

I know how to find it out in Objective C, but I need to do this in a shell script. (I could compile and install one of the example programs given in the link, but surely there is already a command ...
1
vote
0answers
11 views

Preventing less from quitting when I scroll down

I don’t know if it was a change to less itself or to the Terminal app, but when I upgraded to Yosemite I noticed that I could use the mouse scroll wheel to move around in less. Whenever I use this ...
2
votes
0answers
86 views

Finder gets confused after using the mv command in the Dropbox folders

I should mention I'm new to command lines. I want to rename files using the mv command in the Terminal. I type: mv oldFileName.pdf newFileName.pdf Afterwards, I use the ls command to check whether ...
1
vote
1answer
34 views

Preview image from pipe

I have a command line utility, let's called as: produce_image. So i can do the following in the Terminal: $ produce_image > some.jpg $ open some.jpg #opens Preview.app also, I have ImageMagick ...
0
votes
1answer
31 views

Is there a way to make `open -a` pass command line arguments to the app it launches?

I'd like to run OpenSCAD from the command line with some arguments. $ open -a openscad myfile.scad works as I expect. $ open -a openscad --args --help reports LSOpenURLsWithRole() failed for ...
2
votes
1answer
67 views

Mac terminal prompt's machine name becomes “bogon” after using traceroute

I was doing some traceroute test yesterday, and today, my Mac terminal's user prompt becomes `bogon:~ myUserName$` Also when I'm doing traceroute like: traceroute www.google.com it stops with ...
0
votes
0answers
47 views

Use fswatch to make files that changed

I am using the following command to run make automatically when less files in my project change. But right now make runs on all the files whenever any file changes. Is there a way to make only the ...
0
votes
1answer
112 views

Yosemite supplied curl does not support https

I am having the issue that curl is failing to deal with https, and thus I cannot update Homebrew: brew update && brew upgrade fatal: unable to access 'https://github.com/Homebrew/homebrew/': ...
1
vote
0answers
24 views

How do I configure CURL to use the same root certificates as Safari?

It seems that CURL on OS X (10.10) is broken because it does not contain the same set of root SSL certificates as Safari. Due to this it seems that there is a high chance for your to be unable to ...
0
votes
1answer
51 views

ss (netstat alternative) for OS X

How do I install ss on OS X? I couldn't find the iproute package in homebrew. Red Hat recommends ss over netstat in Red Hat Enterprise Linux 7. ss is provided by the iproute package. Red Hat ...
1
vote
2answers
133 views

How to remove space character (whitespace) from end of filenames and foldernames?

Problem with mac is that it allows space character at end of file or folder. If this file or folder with space character in end is beeing copied to FTP using Filezilla or Dropbox then mac makes ...
0
votes
1answer
38 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?
4
votes
1answer
84 views

Install Xcode without admin

Is there any way to use Xcode on a computer that I don't have admin permissions for? Is there a way to at least use command line tools like git and gcc?
1
vote
1answer
56 views

Terminal command ncdu

I've seen the terminal command ncdu is available in various flavors of UNIX. Does anyone know if the same terminal command is available in OS X? Thanks for any help. It is greatly appreciated.
1
vote
1answer
18 views

Skip first terminal beep and to display ambiguous filename expansions

Pressing TAB in the terminal (and in fact some surprise places in OS X's GUI!) either completes the only filename with the prefix provided to the immediate left of TAB, and when there are several such ...
0
votes
0answers
71 views

Why can I not create a directory on my external hard-drive?

When I try to make a new directory on my external hard-drive I get a message saying that it is a "Read-only file system" LU06296APPLE:~ fortinok$ mkdir /Volumes/Seagate\ Backup\ Plus\ ...
0
votes
0answers
28 views

How can I change the keyboard shortcuts in Terminal.app for the application commands normally invoked using the unmodified ⇡ and ⇣ keys?

That is, how can I change the keyboard shortcuts for the application commands (I say application commands in an attempt to avoid confusion with the use of the term "command" in the shell command ...
2
votes
0answers
21 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 ...
1
vote
0answers
286 views

Install multiple different versions of Xcode

I am on Yosemite and trying to compile a software package using g++. Compiling this particular package has previously worked on Mountain Lion under Xcode 4.6.3, but now I have Xcode 6.1.1, and the ...
0
votes
0answers
89 views

How to adjust a desktop picture through the command line (terminal)?

So after some research, I came along this wonderful little gem for setting a desktop background through the command line. osascript tell application "Finder" set desktop picture to POSIX file ...
2
votes
1answer
27 views

From the command-line, how can I set all accounts to Available in all Messages.app

Is there a scriptable way from the terminal I can tell Messages.app to take all my accounts online?
0
votes
1answer
132 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 ...
3
votes
1answer
58 views

Osascript Compile Application

Is there a way to compile an an applescript from the command line similar to the following.
0
votes
1answer
32 views

Recursive set creation date of pictures and videos based on filename

I have a folder structure of thousands of pictures and videos. They are all exported and therefore have the same creation date, time. I would like to set the creation date for all the files according ...
1
vote
1answer
60 views

tmux hangs when re-attaching session after logout

Since Yosemite, my tmux, which I installed via MacPorts, "hangs" when I re-attach it after my user has logged out and logged in again. I.e. it cannot start new processes, like a new command line. The ...
1
vote
2answers
45 views

find -printf work around

I'm trying to use a script to call compare file size. Unfortunately the version of find on my mac does not support the -printf switch. Any suggestions?
1
vote
0answers
26 views

determining Preferred Language in OS X via cli

I was hoping to do something like: defaults read -g AppleLanguages | awk -F, '/[^(]/{print $1;exit}' but if only one language is listed in "Preferred Languages", then defaults read -g ...
0
votes
0answers
76 views

Missing hard disk space

I'm trying to figure out where my missing hard disk space is going. I'm using du and df from the command line and there seems to be a clear discrepancy. So here's the du output: $ sudo du -h -d 1 / ...
0
votes
1answer
75 views

Can I copy a file to iCloud drive from the command line?

I'd like to write a script to backup some files to my iCloud drive. The drive shows up in the Finder, but I don't see it from the command line. Is there a way to do something like: cp mystuff.tgz ...
2
votes
3answers
153 views

Why are my command line utilities running so slowly on my Mac?

I have just noticed that command line utilities such as ls (/bin/ls), touch (/usr/bin/touch), cat (/bin/cat), etc. are very slow when I run them from Terminal or iTerm on my MacBook. For example: ...
0
votes
0answers
65 views

Urxvt on homebrew ignoring certain .Xdefaults and .Xresources settings

I have a .Xdefaults and a .Xresources that I use on my Linux setups that I want to also use on my OSX setup. However, the Urxvt I installed on homebrew is not picking up certain settings from both ...
1
vote
2answers
71 views

Batch repack of mkv files

Can anyone tell me how to batch repack a bunch of mkv files to mp4 keeping the same file names using the Mac command line.
0
votes
0answers
18 views

Modify plist.info so program uses different icon based on command line arguments

I have an application, Firefox, I launch it with different command line arguments: -P "dev profile" -no-remote -P "ext testing" -no-remote -P "Main" -no-remote I would like to tell the plist.info ...