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
2answers
33 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 ...
2
votes
3answers
542 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 ...
0
votes
0answers
11 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 ...
6
votes
2answers
4k views

Command Line Tools fail to install OSX Lion 10.7.3 Xcode 4.3

I'm trying to install the command line tools to get gcc, make, and other goodies after a Lion upgrade. I went to preferences/Downloads in XCode and attempted to install the command line tools. At the ...
1
vote
0answers
81 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 ...
7
votes
1answer
263 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 ...
8
votes
6answers
715 views

Where can I find a comprehensive and detailed technical software manual for OS X?

Are there books written for OS X (particularly the most current version) like the hundreds of thousands written for Unix? I'd like to know about the command-line utilities and the locations of system ...
1
vote
1answer
27 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 ...
0
votes
1answer
1k views

Disabling the trackpad from the command line

How can I disable the trackpad (without restarting my computer) from the command-line on OS X Mavericks?
1
vote
0answers
59 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 ...
5
votes
1answer
1k views

How can I use RSVG with ImageMagick?

I'd like to use the RSVG for SVG processing in ImageMagick (the included library is fairly incomplete). RSVG is a supported delegate but needs to be installed separately. I've installed librsvg and ...
1
vote
1answer
24 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 ...
2
votes
2answers
1k 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 ...
0
votes
1answer
37 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
11 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 ...
2
votes
2answers
97 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
2answers
250 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 ...
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
1answer
7k views

How to open a file in Excel from the command line

Is it possible to tell Excel to open a file from the command line? In Linux, I could do this using the command libreoffice --calc test.xlsx
2
votes
4answers
110 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
vote
2answers
928 views

How to install and setup s3fs on OS X 10.7 (Lion)

I installed s3fs, a tool that allows mounting Amazon S3 buckets as a file system. I created folder for mounting in /mnt/s3 then I created a file in /etc/passwd-s3fs with the content ...
-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
17 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 ...
1
vote
1answer
64 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 ...
25
votes
11answers
41k 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 ...
51
votes
10answers
19k views

How to move files to trash from command line?

I do a lot of terminal work, and today had the experience of typing rm fileInQuestion.txt Before finding out that I did actually need fileInQuestion.txt. If I'd deleted in the GUI then I would have ...
5
votes
3answers
2k views

How can I add reminders via the command line?

Once in a while it may be useful to add some reminders to Reminders.app from the command line — especially because they are synced to iCloud. Is there any way to do so? A solution that does not rely ...
0
votes
2answers
50 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
1k views

Alternative to additemtodock from Henri Shustak

I am using a commandline script to add items to the dock via scripts http://www.macupdate.com/app/mac/23653/add-item-to-dock But it seems to have a lot of bugs and maybe even "kills" my Dock config ...
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
53 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?
19
votes
4answers
66k views

Why does OS X Mavericks block the purge command in Terminal?

When I try the purge command on my terminal, OS X Mavericks gives me the following message: Unable to purge disk buffers: Operation not permitted This hasn't been the default behavior until now. I ...
1
vote
2answers
111 views

iTerm - going one word backwards and forwards

Would it be possible to configure iTerm 2 to go backwards and forwards one word through the curent text in the command line using a keyboard shortcut?
2
votes
2answers
145 views

Make a file a Stationery pad via command line

Is there a way to set make a file into a Stationery pad from the command line? You can do it by clicking "Get info" on a file and checking the box, but I would like to do it without clicking. An ...
0
votes
0answers
18 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?
26
votes
6answers
8k 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
309 views

Add printer via lpadmin with custom queue

Is there a way to add a printer via the command line that has a custom queue that has two words separated by a space? My command so far is below but does not set the custom queue. Without the queue, ...
0
votes
1answer
30 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$ ...
56
votes
9answers
104k 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 ...
5
votes
6answers
3k views

Why use the terminal in daily non-programming life

Disclaimer: I'm a Windows boy awaiting his first mac. I never bothered learning/using command-line interfaces. I've been looking at the Terminal Tips and Tricks topic and I don't see how any of those ...
2
votes
4answers
3k views

How to correctly pipe output into “say” in terminal

I realized that the say command can be great when combined with another command/program because it can read you the output. I tried to pipe the output from leave to say by typing the following in ...
2
votes
3answers
613 views

Editing iPhoto-specific metadata

Perpetua:2011-01-16 ashley$ mdls IMAG0107.jpg ... kMDItemComment = "Cat with is tongue out." So, here's my question. xattr can be used to modify some ...
78
votes
16answers
70k 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 ...
11
votes
3answers
3k views

How can I force command-line arguments to a program shortcut in the dock?

I have Chrome installed in Applications, and a shortcut to it in the Dock. How can I achieve to force some command-line arguments to each start-up of this app? Let me be clearer, in the Terminal, I ...
1
vote
1answer
38 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 ...
4
votes
1answer
95 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?
2
votes
0answers
90 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
34 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 ...