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.
2
votes
3answers
6k views
Change Command Prompt - Variables are literal, and changes to .bashrc or .bash_profile not making a difference
Trying to change my command prompt in OS X 10.8 / Mountain Lion. Changes to ~/.bashrc and ~/.bash_profile do not make any difference. Like:
export PS1="\W \$"
It defaults to the host name ("\h\%"). ...
0
votes
1answer
250 views
Backing up iPhoto pictures and folders from the command-line
I'd like to install a new OS X on a MacBook and I'd like to know what needs to be done to backup only the iPhoto pictures. I definitely do not want to backup the entire /Users/Cedric/ directory. All ...
0
votes
2answers
127 views
How to set iChat status from the command line?
I'm trying to sync my Last.FM last played track with my iChat status... right from the command line. I've come this far:
curl -s http://ws.audioscrobbler.com/1.0/user/Da3X/recenttracks.rss |
grep ...
4
votes
1answer
189 views
How can I open a file in its default application from the command line in OS X?
How can I open a file in its default application from the command line?
For example if I have a file foo.doc, can I type command ./foo.doc into the CLI and have that file open in Word?
Note: on my ...
6
votes
2answers
340 views
How can I kill a process using top on OS X?
On other Unixe,s I can use top and then hit K and type the process ID.
How can I do that in OS X?
I can type kill [the_pid] on its own at the command line and that works. However, I was wondering if ...
2
votes
3answers
4k views
Use curl to download images from website using wildcard?
Is there a way to use curl to download non-sequential images with a wildcard? I want to download all the panoramas I upload to my account at 360 Panorama to a local folder so I don't have to do this ...
0
votes
1answer
527 views
How to install ImageMagick on 10.6 (Snow Leopard) using a precompiled binary (without a package manager)?
The wish is to manipulate images from the command line using the ImageMagick tools.
No package manager because:
The MacPorts port and Homebrew brew package managers have Xcode dependencies.
Xcode ...
1
vote
3answers
570 views
Can grep highlight matching text without hiding file content?
I frequently use grep's context command line options (-A, -B, and -C), but occasionally I want to view the whole file with matching expressions highlighted. To accomplish this currently I simply ...
4
votes
3answers
283 views
How to stream radio from the command line?
There is an iMac in our lab at university, running Mac OS X 10.7 Lion.
It is never used, so we have taken to using it to play music, as we can SSH to it, and it does not require any permissions to ...
1
vote
2answers
129 views
Why does the Dock executable not yield any useful strings, unlike other OS X apps?
When I run the strings command on the executable file in most OS X apps (•.app/Contents/MacOS/•), I get a list of routine names, possible hidden preferences, etc. When I run the command on the Dock ...
6
votes
2answers
2k views
How does 'stuck' (in results of 'top') relate to 'not responding' (in Activity Monitor), 'spin' or 'hang'?
In results of top commands, I sometimes see stuck.
Apple's top(1) OS X Manual Page does not explain this use of the word.
How, if it all, does stuck relate to the following?
not responding – ...
3
votes
2answers
4k views
Can't install Xcode Command Line Tools on Mountain Lion
I try to install the most recent (july 25) version of Command Line Tools (xcode44cltools_10_76938107a.dm), downloaded from https://developer.apple.com/downloads/, but are stopped with the error ...
3
votes
3answers
4k views
Under 10.8 which file stores the environment variables?
This has been this way since 10.6. There is no .bashrc file in the home dictionary but the environment variable PATH indeed exists as the result of this command shows:
$ echo $PATH
...
8
votes
1answer
2k views
Why does it appear that I apparently “do not have access to Command Line Tools” in ML?
I just upgraded to Mountain Lion, and now gcc, make, g++, etc. are not found when trying to launch them in Terminal.
So I went to Xcode Preferences, Downloads, and clicked "Install" next to Command ...
1
vote
3answers
85 views
At the command line, how can I 'arrow along' faster using words instead of chr's
I am at the command line and I have
. /this/set/of/directory/this_command "parm1", "parm2", "parm3"
When I 'up-arrow' to recall previous lines, how can I move along the line from "word to word". ...
2
votes
2answers
206 views
Dia command line not working
I've got a problem with using Dia from the command line on OSX 10.7.4. I downloaded and installed the OS X dmg from http://dia-installer.de/download/macosx.html I've been using it to create graphics ...
0
votes
0answers
111 views
Changing a users desktop picture in terminal
just for fun, I'm trying to change the desktop picture in another account on my iMac (10.6.8) using a terminal command.
Is this possible?
Thanks
5
votes
1answer
139 views
How to pipe output of 'say' to another command
'say' has both -o and -n arguments for various ways to direct the output, but I don't see any way to simply pipe the output to another command (say, sox). Is this a limitation of say, or is there a ...
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 ...
0
votes
2answers
254 views
Executing program through Terminal
I have Sage (math program) and I want to execute it through terminal.
I know I can go to the directory and execute it with -
open Sage.app
But would I really want to do is simply type sage in ...
1
vote
1answer
190 views
Why doesn't the screen command source my .profile?
When I start a new screen, the aliases that I have set in my ~/.profile do not seem to be sourced.
Does anyone know where I can change this or which file is actually read when starting a new screen?
10
votes
2answers
410 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, ...
0
votes
1answer
510 views
How to create OS X Server Admin firewall rules using ip address groups by command line?
The (Lion) Server Admin.app has a nice ability to apply firewall rules to ip address groups without having to edit ipfw config files.
But having to enter large and long lists of IP addresses using ...
2
votes
3answers
378 views
Getting a list of currently running processes
I'd like to get a list of all the applications currently running on my machine using the command line. It should be similar to what you get when you open up Activity Monitor and choose to save the ...
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
1answer
691 views
How do I get a Unix Executable File to run from anywhere, like Java or Git?
I've just created my first Command Line Tool in Xcode.
What do I have to do, or where do I have to put the final output file, so that I can run it from anywhere from within terminal, without having ...
0
votes
0answers
136 views
Import and export chapter markers from garage band or using command line tool
I want to be able to import and export chapter markers to and from a garage band podcast.
There are several possibilities:
Use apple script to do this within garage band
Use a command line tool to ...
3
votes
1answer
78 views
What's the “@”mark at the file description?
I installed princexml for Mac. With ls -alF, I have -rwxr-xr-x@ 1 prosseek admin 14190120 Jun 8 16:11 prince*. What's the meaning of @ in -rwxr-xr-x@?
And when I tried to execute the binary, I got ...
2
votes
4answers
1k views
How to find all files that are larger than 1GB on the Mac HD?
It seems that either one of these commands can be used:
sudo find / -size +1G
sudo find / -type f -size +1G
But when it gets to /Volumes, it actually look at all the back up files by Time Machine ...
4
votes
1answer
218 views
Why does my Terminal command line screw up like this? (bash's fault?)
When I use the command line history ( CtrlR , CtrlP )
The command line screws up like this:
The cursor is supposedly located at the end of the line ( just pressed CtrlE )
If I press enter, just ...
1
vote
1answer
62 views
Installing gcc without admin?
Is there a place to install command line programs on OSX without an admin password? I've tried /bin and /usr/bin, and I have permission for neither. Like a ~/Applications, but for the command line.
4
votes
2answers
1k views
What is the difference between .bash_profile and .bashrc?
To make an alias for the Terminal in OS X, you can either put the aliases in .bash_profile or .bashrc. What is the difference between the two and why would I choose to put aliases in one and not the ...
1
vote
1answer
230 views
How do I make a shortcut command in terminal?
I want to have ll as a shortcut for ls -ll. How can I add it to my Termianl application? I use iTerm as my primary Terminal application. I wish there was a single line command solution for it.
20
votes
5answers
4k 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 ...
1
vote
1answer
661 views
Darwin/Linux/Unix command line email client that supports iCloud?
I need to access my iCloud email from a command line.
Is there a command line client for Mac OS X (and/or Linux and/or Unix) that can connect to Apple's (I assume it is IMAP) servers?
5
votes
1answer
831 views
Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?
When the Info window of Finder is used to associate files of a particular type with an application:
the preference is effective immediately.
When Terminal is used to make a comparable addition ...
4
votes
3answers
1k views
Change the default application (for a file extension) via script/command line?
Is there a way to define the default application for a file extension via an Apple script, command line command (like defaults write [...]).
I know that you can change it manually via the information ...
3
votes
2answers
2k views
How to change the creation date/time of a file in Lion?
touch(1) can only change modification and access times, but has no options for creation time. This does not work, at least not on Lion.
So how do I change the creation time, also referred to as ...
1
vote
1answer
531 views
Ejecting USB drive via AppleScript does not make drive power down
On startup, I eject my external USB disks with the following AppleScript:
try
do shell script "diskutil eject \"/Volumes/USB Backup\""
end try
This works as expected: the drive powers down. ...
4
votes
3answers
231 views
Detect single-user mode from the command line
Is there a way to detect single-user mode in OSX (Lion, specifically) from the command line?
I've tried who -r, which returns 3 in either standard or single-user mode.
I've also tried nvram ...
2
votes
2answers
1k views
How to change tap to click using “defaults write” from command line?
I want to change the trackpad tap-to-click property from the command line. Graphically, I can do it by clicking System Preferences -> Trackpad -> Tap to Click. How can I do it from the command line?
...
1
vote
1answer
222 views
Switching terminal styles in iTerm 2
Recently I've been trying to become more efficient at the command line, and stumbled upon iTerm 2 a couple days ago. One feature of iTerm 2 is that windows can appear from the top of the screen, so ...
0
votes
0answers
729 views
How to remove group membership from user using the Lion Terminal?
How to remove a self created daemon user named '_denyhosts' from group 1025(workgroup), 403(com.apple.sharepoint.group.2), 404(com.apple.sharepoint.group.3) and 405(com.apple.sharepoint.group.4) using ...
0
votes
1answer
769 views
jDownloader-like command line tool or lightweight GUI App?
I use jDownloader which works great, but takes a lot of time to load and surprisingly takes a lot of time also to start and stop downloads.
I'd like to have a similar functionality* but with a ...
7
votes
1answer
3k views
How to control Bluetooth wireless radio from the command line?
This question is almost the same as my previous question, but with one major difference; I want to turn on/off Bluetooth from the command line (bash or similar), NOT from AppleScript - the answers for ...
5
votes
1answer
2k views
How to control AirPort wireless radio from the command line?
I want to know how to control (specifically turn off) the networking (specifically AirPort - I want to turn off the radio) from the command line (specifically from bash in Terminal.app, being run by ...
3
votes
1answer
299 views
Is it possible to open in default browser a URL from command line reusing same tab?
I know that I can use open command to open a URL in a default browser like:
$ open http://google.com
But what I would like is to execute a similar or same command to open different URLs one after ...
0
votes
3answers
3k views
Access Applications directory in Terminal
I'm really new to command line and I'm trying to access my Applications directory within Terminal.
By default, I am stuck in my user directory but Applications is a child of the "Macintosh HD".
...
3
votes
1answer
2k 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 ...
5
votes
1answer
455 views
How can I update iTunes Match from the command line?
I use iTunes Match to access my iTunes library at work. I added some new music to my library (back at home) recently, but I forgot to run the "Update iTunes Match" command to ensure that the songs ...