Tagged Questions
6
votes
4answers
271 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
2answers
18 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
90 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 ...
2
votes
2answers
92 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
56 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 ...
1
vote
0answers
592 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 ...
1
vote
2answers
93 views
Use Cmd as Ctrl key in vim
How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a ...
1
vote
0answers
215 views
Is it possible to download Apple's Command Line Tools for Xcode from the command line?
Background
My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
2
votes
1answer
2k 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, ...
2
votes
6answers
541 views
Improved Terminal autocomplete funcionality (similar to Matlab's)
If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal.
It works like ...
0
votes
1answer
67 views
Set Keystroke for Service from Terminal
I created some services to be used in Finder. Now I wanted to create some keystrokes to call these services. That would be easy in the System Settings, however, I would like to add them from the ...
3
votes
1answer
147 views
Within Terminal, `date` command outputs a curious prefix where it should'n
I am using a Mac Mini running Lion (10.7.5) and zsh 4.3.12 (i386-apple-darwin11.0.1) with oh-my-zsh installed. In the Terminal.app I retrieve the UNIX timestamp using the following command
date +%s
...
1
vote
0answers
142 views
Resource efficient way to monitor file change and execute shell scripts on change
I know at least three ways to monitor a folder/file for changes and execute a shell script on change.
First, use "Folder Actions" of Automator
Second, the launchd.plist approach but it seems the ...
2
votes
2answers
172 views
Terminal : needs full path to execute a command
Let's suppose i have an application in /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp.
When i use cd to reach the directory 'MacOS' and then issue the command myapp it says command not ...
6
votes
1answer
204 views
Incorrect Terminal.app output for long lines with tabs
When I run the following command in Terminal.app:
echo -e "a\tb\tc\td\te\tf\tg\tyo"
I should get the following output (using a 40-column window so that lines don't wrap here, and replacing tabs ...
5
votes
1answer
176 views
Completely clear all output from a Terminal window
I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab.
I can ...
3
votes
1answer
490 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 ...
1
vote
2answers
196 views
Terminal in full screen mode: how do I recover from “cat /dev/random”
What are the ways I can regain control over my computer when I have terminal in full screen mode and type:
cat /dev/random
0
votes
3answers
187 views
I have lost the prompt on Terminal on my Mac; unable to get commands to work
I was trying to launch a few Java applications using the terminal. The command that I was instructed to launch it with (I was following a guide) was the following:
#!/bin/bash
cd "$( dirname "$0" )"
...
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 ...
18
votes
3answers
7k views
git auto-complete for *branches* at the 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
268 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
216 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?
11
votes
2answers
453 views
cd to a directory by typing its name?
For example if a directory 'blob' exists and I just type 'blob[return]' then the system cds into the blob directory for me.
In Linux (Ubuntu) I can add shopt -s autocd to my .bashrc file, but on OS X ...
1
vote
1answer
725 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 ...
4
votes
1answer
227 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 ...
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
240 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.
1
vote
1answer
230 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
1answer
829 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
4k 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
310 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
4k 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".
...
4
votes
2answers
444 views
Is there a better way to shutdown/restart OSX?
Whenever I want to shutdown/restart OSX I click on the menu, select shutdown, and then click the box for not saving the session, and then click OK. Then there's always at least one program that ...
8
votes
4answers
2k 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 ...
4
votes
4answers
1k views
Monitor a folder for changes, and run a command when a change is detected
Is there a simple way to automatically run a (Terminal) command every time a file is changed in a specific folder?
This should be possible via the command line, or a system built-in application, no ...
0
votes
2answers
241 views
Run java bundled in .app from command-line
The question is how do I run some application written in java and bundled into .app package from command-line?
The main purpose of this is to run an application under JDK7. So I will start it with ...
2
votes
1answer
416 views
How can I kill or refresh Desktop Wallpaper with a Terminal command?
Is there a command for refreshing the Display Settings? Or, in specific, refreshing the Desktop Wallpaper?
1
vote
2answers
306 views
How do you list items with and without labels from the terminal?
Is there a command that can tell the label status (labels as applied in the info menu in the finder cmd+i) of an item from the command-line in OS X? Essentially, I just want to list all the items with ...
4
votes
5answers
17k views
How can I list all user accounts in the terminal?
How can I list all local user accounts (whether logged in or NOT so 'users' or 'who' is no good) in the terminal on a mac? OS X version is 10.6.8.
I have seen this suggested - dscacheutil -q group
...
4
votes
4answers
1k views
Creating a virtual serial port
I'm trying to create a pair of virtual serial ports on my mac. This is fairly easy to do with many shareware programs on a PC. I figured there would be some uber-powerful shell command to do this in ...
1
vote
0answers
156 views
Signals sent to command-line programs when exiting terminal.app
When using tmux, if I CMD-W, or otherwise quite out of terminal, my tmux session persists, as it should. However, it still lists itself as "attached", whereas on other platforms, (e.g. Ubuntu) when ...
4
votes
1answer
169 views
Command line utility to create screenshot
Is there some command line utility to create a screenshot of the my screen and store it as png? (Preferably one in the system, without need to install anything new)
1
vote
1answer
226 views
Correct syntax for bash grep function?
I'm trying to set up a function to make certain grep command easier.
gr() { grep -r --include=*.\{m,h,xib\} $1 \* ; }
The end result should be a recursive grep of all *.m, *.h, and *.xib files, for ...
20
votes
4answers
32k views
Can I open files in TextEdit from the Terminal in Mac OS X?
I frequently find that a terminal command to open a file in TextEdit would be very handy. Does such a command exist on Mac OS X?
30
votes
7answers
12k 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.
...
7
votes
2answers
2k views
What is the difference between .command, .tool, and .sh file extensions?
I saw a couple of questions about executing command line scripts? I saw that the .command and .tool extensions were mentioned. I have always used .sh. What is the difference between these different ...
4
votes
1answer
11k views
How do I remove a user via single user mode in 10.7?
I occasionally will setup a user's machine that has been in for repair beyond the simple re-install of the OS. For example: install a new hd, install the OS, create a user, install updates and then ...
4
votes
3answers
638 views
How do I delete a locked, invisible file in the Trash?
On an external disk (that contains a clone), the /.Trashes/501/Users/myusername/Desktop folder contains (within some subfolders) a locked invisible file that I cannot delete. The whole folder starting ...