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)

2
votes
1answer
21 views

How can I take selfie by running a console command on Mac?

I know I can take selfie by built-in camera by the PhotoBooth app. However, is there a way how to do it from command line, in sort of lolcommits style?
5
votes
3answers
456 views

Can I use GNU ps on OS X?

We can install GNU coreutils via brew. But there's no ps in the utils. Can we use gnu ps in OS X? I'd like to use GNU ps as it has more options and features.
3
votes
0answers
28 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
16 views

Modifing a preference via applescript changes file group

I recently request help about modifying firewall settings via command-line (see my previous question). Everything is working, but I have noticed that whenever I use this command in an applescript, the ...
1
vote
2answers
23 views

Automated screensaver configuration in command line/shell script

So I'm configuring some Default User Template LaunchAgents to configure a default screensaver for some of my company's most popular fan art. (It's actually been really well received by the team). ...
0
votes
0answers
13 views

Yosemite command-line tool update programs

What command-line tool update programs are there in Yosemite? I've used: pip (for Python packages; seems to be built-in, unlike the following) brew (homebrew for application installation) gem (for ...
2
votes
2answers
25 views

How to renice by process name?

I am trying to Launch a process using NICE but this process is starting other process by itself and they are not affected by the priority of the main process ( main process has the correct nice but ...
0
votes
2answers
61 views

Howto run a Terminal command using shortcut or a button

I always have the problem in my dock, where the download bar just stops and stays froze. I know you can do a killall -KILL Dock and it will fix the issue. Is there a way to click a button or do a ...
1
vote
2answers
63 views

How to dump the content of keychain from the shell?

I'm testing the following command-line in the Terminal: sudo security dump-keychain -d login.keychain which I'd like to use to save all my passwords into a file. However when I run it, it keep ...
0
votes
0answers
18 views

What is CIFS mount command line?

Mavericks, 10.9.5, I need to connect to a DFS share with CIFS rather than SMB, but the following command gives me error: mount -t cifs //myserver/mydir/mylink /Volumes/SpareDisk/mnt Error is No ...
8
votes
1answer
298 views

OS X terminal “open” command and keeping focus on the command line

I appreciate the "open" terminal command to launch OS X apps. When invoking the open command for any purpose, it is overwhelmingly likely that I will have at least one other command I would like to ...
1
vote
1answer
33 views

Can I open a file in Preview from the Terminal?

I know that I can open a file with an external program from the Terminal with open, and that works for most applications. However, when I try to use a command like open -a Preview info.txt, it ...
1
vote
1answer
27 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
42 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
14 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
133 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
251 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
152 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
24 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
117 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
29 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
22 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
54 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
31 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
66 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
23 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
83 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
40 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
66 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
45 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
12 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
99 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
41 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
84 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
70 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
181 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
34 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
70 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
233 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
46 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
108 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
76 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
22 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
97 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
31 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
28 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
319 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
170 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
28 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?