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.
39
votes
12answers
23k 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
2answers
11 views
Is there a way to set an Application Shortcut in the Keyboard Preference Pane via Terminal?
I'd like to have a bootstrap for my custom keyboard shortcuts to use on multiple machines...
1
vote
3answers
40 views
Change file association in terminal?
Is there a method for associating file types with applications via terminal? I thought ~/Library/Preferences/com.apple.launchservices.plist might do it, and I also have seen: Why is a command line ...
10
votes
1answer
8k views
Can I get the CPU temperature and fan speed from the command line in OS X?
Is there a command I can run from the command line in OS X to get the current CPU temperature and/or the fan speed(s)?
To be more specific, I'd like to be able to get the same info available in the ...
1
vote
2answers
265 views
Why do I keep getting this error message after updating to OS X 10.8.1?
After I updated to OS X 10.8.1, I keep getting this error message when I execute purge:
[ERROR] The device-file for this operating system, 'osx-12.1.0.xml', was not found. An attempt to revert ...
2
votes
2answers
63 views
Is it possible to get the full suite of unix options for the command line tools on OS X?
I follow Unix Tool Tip on Twitter and it is interesting that many of the tips that are posted are not available on OS X.
For example:
cp - u will only copy files that don't exist, or are newer ...
0
votes
1answer
362 views
Can not successfully re-install MYSQL 10.8.2
Removed the old installation as explained here:
http://superuser.com/questions/129193/how-do-i-uninstall-mysql-on-mac-os-x-snow-leopard
Installed the package contained in the mysql 5.1.67 DMG ...
8
votes
8answers
3k views
How to retrieve current wattage info on OS X?
Is there a way to retrieve the current watt usage info on OS X Snow Leopard? I'm using mid-2010 iMac, so I'm not looking for just battery-related apps.
Does OS X even monitor power usage? Do I need ...
2
votes
3answers
773 views
How to manually trigger background image change?
I have set the wallpaper to change every hour and have enabled it to cycle them in a random order. Sometimes the background image changes to an image that was set just few rounds ago and I'd like to ...
7
votes
3answers
1k views
Can Finder and the “open” command treat files with .sh or other typical extensions just like .command files?
I am looking for a way to inject some more extensions into the OS X launch services database systematically so that when clicked, they execute in the terminal app just like .command files do by ...
2
votes
1answer
91 views
Controlling iOS apps via command line
I have jailbroken iPad (iOS5.1.1) with the shell utility installed.
I'd like to be able to launch and control applications via the command line, as I would normally do in Unix or Linux. Say I want to ...
16
votes
2answers
6k views
How can git auto-complete branches at the terminal command line?
On my linux machine I have autocomplete for branches with git.
For example I can type git checkout [TAB] and get a list of branches.
Or I can type git checkout feb* [TAB] to get all branches that ...
-1
votes
0answers
48 views
How to compile LaTeX on Mac OS X? [closed]
How can I compile LaTeX on Mac OS X Mountain Lion? I know there are pre-compiled version of the soft that can be found on the Internet, but I actually want to compile LaTeX (to be able to test some ...
10
votes
2answers
409 views
cd to a directory just by typing its name?
For example if a directory 'blob' exists, I just type 'blob[return]' and the system cds into the blob directory for me.
In Linux (Ubuntu) I can use shopt -s autocd and I add it to my .bashrc file, ...
3
votes
2answers
230 views
Is there a htop-on-linux like alternative for top / Activity Monitor on OS X?
I'm looking for a better alternative for top. Both top and Activity Monitor are highly limited with regards to features. In particular, I'm interested in the following features:
Limit processes by ...
16
votes
1answer
8k views
MacPorts vs. Fink vs. Homebrew
I always used MacPorts to install and maintain my GCC compilers (4.4, 4.5, 4.6, 4.7, ...) and gnuplot. Now I've heard about Fink and Homebrew. I think these two utilities are gaining ground in the Mac ...
6
votes
1answer
110 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?
2
votes
1answer
37 views
Play .ogg on command line
How can I play a .ogg music file on the command line? On Linux I can use ogg123, but what about on Mac?
1
vote
1answer
52 views
Where do I find the full man page for afplay
In Terminal afplay -h shows full help text but the man page shows hardly nothing.
Is there any way to get a longer help page for man afplay?
I never use Terminal and it would be much easier if i ...
0
votes
1answer
54 views
Using dictation in the command line (e.g. transcribe an audio recording to a text file)
I have some audio recordings and would like to transcribe them into text files. I was wondering whether there is a command line tool that could use the built-in Dictation to do that? And if so, is ...
0
votes
1answer
52 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
1answer
346 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 ...
8
votes
4answers
12k views
How do I start TextEditor from the command line?
I work a lot at the command line in a Terminal and would like to start a text editor on a certain file. I'm from Linux Land and normally use kwrite or gedit from a bash shell. Trying to find the Mac ...
1
vote
2answers
119 views
Converting Audio to AC-3 using afconvert?
I'm trying to use afconvert to convert an audio file to AC-3 format. It's 5.1 audio, having already been converted from DTS to WAV (using ffmpeg, since afconvert doesn't seem to deal with DTS).
As ...
5
votes
3answers
626 views
Updating modifier key mappings through defaults command tool
I am trying to automate the inital setup of my macbook, that includes installing software and changing OS X configuration to my needs.
I have tried to update the modifier keys with defaults, the ...
0
votes
1answer
94 views
Temporarily disable Notification Center in Mountain Lion from command line?
I've been trying to create a script to disable/enable the Notification Center, even if it's temporary. It should do the same as manually sliding the Notification Center, scrolling up, and toggling the ...
27
votes
7answers
11k views
What is the difference between iTerm2 and Terminal?
I keep hearing that iTerm2 is much better than Terminal. I downloaded iTerm2 today and played around with it, but I couldn't see what is so much better about iTerm2. iTerm2 seemed just like Terminal.
...
1
vote
3answers
232 views
Files synced by Synk Pro have wrong owner on both synchronized Macs – how can I fix it?
I sync some folders within my Home folder between two Macs (running Lion and Mountain Lion) using Synk Pro, a commercial live file sync application. I have the same account name on both computers.
...
0
votes
1answer
187 views
How to remove xattr com.apple.quarantine from all .webarchive files with that extended attribute?
Spread across multiple file system I have numerous .webarchive files that were saved by OmniWeb. So for example:
sh-3.2$ ls -@ 2012-03-19.webarchive
2012-03-19.webarchive
sh-3.2$ ls -@l ...
1
vote
3answers
130 views
Find/Unrar/Delete Script
I'm a PC convert, and quite novice when it comes to shell/bash scripting, but I really want to learn/understand more.
My need: I need to be able to scan a folder, find any .rar files, extract the ...
1
vote
1answer
49 views
What does it mean when a process is surrounded by parens in `ps`?
I sometimes try to kill -9 Finder.app when it's misbehaving and I'm in a Terminal. This normally works but every once in awhile it leaves behind the pid, even when run with sudo, and the COMMAND ...
0
votes
1answer
53 views
Why would SetFile be unavailable after upgrading to Mountain Lion?
I have Xcode installed, and have used the SetFile command (installed with Xcode) for some time. I just upgraded to Mountain Lion, though, and find that it is suddenly unavailable. I verified that ...
0
votes
0answers
59 views
GDB (GNU Debugger) with TUI (Text User Interface, or 'layout' command) on Maountain Lion
Anyone who has tried GDB's nifty layout interface must be impressed by its convenience. Unfortunately, however, Apple developers never realized this, so Xcode, even with its optional command line tool ...
3
votes
1answer
150 views
Using the apple wireless keyboard with an iPad with PC/Mac-like keyboard commands
I have jailbroken iPad2 (iOS5.1.1) and an apple wireless bluetooth keyboard that I use for typing on the iPad. Although the keyboard is a joy to use, I can't use it for much else other than typing ...
2
votes
4answers
1k views
How to run Wireshark in the background without the GUI?
I am trying to run Wireshark on Mac OS X in the background. I installed the command line utilities, and so I am able to start Wireshark and capture packets using the command line.
The only thing I ...
9
votes
4answers
3k views
Changing a file or folder icon using the Terminal
How can I change or set the icon for a file or folder, in the terminal, do I need to use a scripting language?
5
votes
2answers
293 views
“Airplane Mode” in OS X. Alternative command for `rfkill`?
This question is an exact duplicate of this post from
superuser.exchange.com. I believe this is a valid question for both of sites
and hope I am not (if any) violating stackexchange policies.
...
1
vote
3answers
83 views
Can I list files ordered by date added to a folder from a command-line tool like ls?
I need to build a script that shows files in the same order as the default Downloads folder in the dock, ordered by Date Added, newest first. I can't seem to find the option in ls.
Any other way to ...
0
votes
1answer
41 views
PageUp and PageDown keys for Irssi (IRC) in Macbook?
I cannot find the keys on my mackbook. I need them to go page-up and page-down in irssi (IRC). I have tested the tips here but they do not work. They model some different Up/Down, not the traditional ...
1
vote
2answers
1k views
Restore disk in single user mode
I wounder if it is possible to restore one partition to another in command line? The similar operation can be performed with Disk Utility, but unfortunately I cannot boot in graphics mode (even safe ...
0
votes
0answers
20 views
hdiutil(1) and I/O errors: how to debug with “ifd-ignore-io-errors” = 0;
Observation
Debug output from hdiutil (example) typically includes
"ifd-ignore-io-errors" = 1;
In that context, I guess the 1 means that I/O errors are ignored.
The question
If that guess is ...
0
votes
1answer
124 views
How do I install handbrake cli?
I've downloaded the Handbrake CLI. What's the best place to install a command line app on my Mac?
0
votes
1answer
47 views
How can I get tab completion back?
In terminal, if I try tab completion in a directory e.g. Movies, instead of the movies beginning with S (if I type S followed by tab, I see SetFile, Splitforks and SystemStarter. I suspect I installed ...
2
votes
0answers
59 views
“df” command making network requests?
I was watching Little Snitch for another process, and noticed df was making requests to various servers. I thought df was only for checking free disk space locally, but it appears to be doing more ...
1
vote
0answers
383 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 ...
6
votes
9answers
738 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 ...
2
votes
1answer
1k views
What steps are needed to create a new user from the command line on Mountain Lion?
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, ...
0
votes
0answers
70 views
Adding Ricoh C4501 printer via command line - Installable options
I need to deploy one Ricoh MFP to ~50 Mac users. I thus wan't to do this through ARD/CLI. I'm looking for the correct lpoption tags for the Ricoh MP C4501. I want to set the "Finisher" (SR3020) and ...
3
votes
1answer
516 views
Child process exited with status 254 error when extracting a tar.xz file
I'm trying to extract a tar.xz file with tar in Mac OS X Lion. I'm using bsdtar 2.8.3 - libarchive 2.8.3. I'm able to use tar to extract anything else I've tried (.zip, .tar, .tar.gz, etc.), but when ...
4
votes
2answers
1k views
How do I change the time format used by ls command line on osx?
I want to make ls display time in ISO format (military format). How can I change this behavior?
On Linux I knew that I could force ls to display time in long format by usin --full-time but this ...


