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)

3
votes
2answers
246 views

How can I determine if the screen is asleep in Mountain Lion, from the command line?

I have a script that needs to run every so often, but only if the screensaver is active or if the screen is asleep (to make sure nobody is actively using the computer first). I need to have a way to ...
3
votes
1answer
5k views

No GDB in the new Command Line Tools (OS X Mountain Lion) for Xcode - September 2013?

I've recently formatted my Mac and when I reinstalled the command line tools, I installed the new Command Line Tools (OS X Mountain Lion) for Xcode - September 2013. I've just typed gdb in my ...
2
votes
3answers
3k 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 ...
0
votes
1answer
244 views

Check Camera Path through command line

is that a command to type in terminal that lists all the webcams connected to my computer? Maybe using ffmpeg package?
2
votes
1answer
85 views

How can I wipe an encrypted volume when the password is forgotten?

I have encrypted disk volume that is in the way and the passphrase is gone. How can I erase the contents and reuse the disk space?
1
vote
0answers
40 views

Command-line cloud file backup?

Is there a free cloud file server for personal files with shell commands like Unix ls, cp etc. ? Along the lines cloud ls [-options] pattern cloud cp-up pattern cloud cp-down pattern My ideal would ...
46
votes
5answers
75k 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?
2
votes
1answer
225 views

How can I run a command that requires user input through oh-my-zsh alias?

I'm trying to add Reminder.app items through the command line by invoking an alias. I use the Automator workflow solution from this question: How can I add reminders via the command line?, which ...
6
votes
1answer
148 views

Verify Time Machine Encryption from the Command-Line?

Is it possible to verify whether a given Time Machine volume (for example, returned by tmutil machinedirectory) has encryption turned on? This is for regulatory compliance, so it needs to be fully ...
13
votes
1answer
16k views

How do I launch Finder from terminal or command line [duplicate]

I use command line a lot, like most programmers. I want to be able to launch Finder, Safari or any other application for that matter from command line e.g. finder . where it will start Finder ...
1
vote
0answers
49 views

Is there another way apart from screencapture to take a screenshot of a background window?

I'd like to take a screenshot of a background window given its title. I know this can be made with screencapture -l idwindow output but unluckily I can't use this method because I'm on a 10.5.8 ...
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 ...
0
votes
1answer
116 views

screencapture -l not working: illegal option

I've wrongly opened the same question on StackOverflow. I hope to find a better explaination here. I've seen in many pages (for example here: How do I find the windowid to pass to screencapture -l?) ...
58
votes
7answers
30k 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. ...
0
votes
2answers
41 views

wacked a directory from the command line

I was copying a file to /usr/local/bin from the commandline on a Snow Leopard Server 10.6 ... anyhow i typed the following ... sudo cp ./le /usr/local/bin Ouch ... that missed last forward slash ...
2
votes
0answers
310 views

How to execute a Parallels Windows application with command line parameters from Mac?

I am trying to call Beyond Compare Windows app to perform a file compre directly from Mac but I am block with command line argument passing. You can call Windows applications from the OS X command ...
8
votes
2answers
9k 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 ...
6
votes
4answers
2k views

How can I set Spotlight metadata to files?

I am looking for a command line utility (I need to use it in a script) that can set Spotlight metadata to files.
1
vote
1answer
61 views

How do I find links for iTunes U Videos to download using the 'resume' feature in curl

I have a flaky internet connection and I was trying to download some course videos on iTunes U. Three attempts to download 800 MB files failed because the connection was reset. So I'm now trying to ...
0
votes
0answers
14 views

How to create aliases in the terminal? [duplicate]

I tried two methods: With nano created a ~/.bashrc file in which stored my aliases from linux mint, after used source command and after it all work fine until i exit the terminal. Found in the ...
0
votes
1answer
312 views

Why did Apple Decide not to install Command Line Tools as default? [closed]

Why did Apple Decide not to install Command Line Tools which now have to be installed through xcode?
3
votes
1answer
2k 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 ...
1
vote
2answers
392 views

How to make a command line executable an application?

I have a command line executable (specifically JMeter), which opens a GUI application when launched from the terminal. However, I would like to create a link to it that would wrap it up to become a ...
4
votes
4answers
9k 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
2k views

Mac OS X Terminal: -bash: $: command not found

While trying to install pagekite on OS X Snow Leopard using the following command: $ pagekite.py --signup I got: -bash: $: command not found I am a noob with the terminal but after reading a bit ...
33
votes
2answers
695 views

Where should I store command line applications?

When I download command line applications they are located in my ~/Downloads/ directory. But I feel this is wrong place to have a command line application located. Where in the Mac OS X filesystem ...
6
votes
4answers
915 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 ...
0
votes
1answer
211 views

Changing the background image in all spaces

I'm running Max OSX Mountain Lion, 10.8.4. I have tried several solutions to change the background image in every space/desktop, but can only get one. I have tried this shell script, have tried using ...
1
vote
1answer
521 views

How to I display the current DNS servers from the command line under OS X?

I want to display the DNS serververs that are used by the current network setup on OS X, from the command line.
4
votes
6answers
9k views

How do I execute command line scripts?

In Windows, I can create .bat files. I double click it and all lines are interpreted as if I had entered it into the console. In OS X, what file or program do I have to use? If I want write a file ...
0
votes
0answers
33 views

Why nc doesn't response even if the “w” option set?

For some servers: nc -w 1 -z x.x.x.x 22 doesn't work. It has no response, but is looking like very busy: only ctrl + C can help. So -w 1 seems to be a useless option, to specify the timeout. Does ...
0
votes
2answers
452 views

Script or workflow to modify find and replace text in clipboard

I need give unique names to many, many files as part of my job. I download dozens of PDFs from a research database which all come with the same name (date of download). I have to open the file, select ...
1
vote
2answers
3k views

How to get Apple Command Line Developer Tools without App Store?

I got a mid-2013 MacBook Air for UNIX development. I'm disappointed that it came with no C/C++ compilers and with no make, which are apparently part of Apple Command Line Developer Tools, which is ...
6
votes
2answers
627 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. ...
7
votes
3answers
3k 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 ...
3
votes
3answers
404 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 ...
3
votes
4answers
2k views

Using locate.updatedb doesn't work in Lion

A week ago I upgraded to Lion from Snow Leopard. I want to use the locate command, but the locate database has not been built yet. So I tried running sudo launchctl -w ...
1
vote
2answers
98 views

Terminal path bar style for prompt

I recently saw this in a demonstration online in someones Terminal: Notice the path-bar-like style of the prompt, any ideas how you can get that? Some kind of customisation I'd assume?
0
votes
1answer
234 views

Changing OS X command line language

On Debian I managed to change it using dpkg and now UNIX commands, manual pages and supported packages are in my native language. Is there a way to do this also on OS X? I already have the locales set ...
34
votes
6answers
12k 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 ...
0
votes
2answers
251 views

Visually distinguish different lines (for long wrapped lines) in iTerm2 / Terminal

I'm using an application that outputs very long lines. It's fine - it means things aren't cut off at 80 characters - but the default Terminal and iTerm2 config makes it hard to distinguish between: ...
5
votes
2answers
3k 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
5answers
2k 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 ...
1
vote
1answer
415 views

Disable loopback interface lo0 on 10.8.4?

For testing purposes (testing raw network speed over a number of cables) i have equippped my Mac Book pro with a Thunderbolt to Gigabit Ethernet Adapter besides the built-in gigabit ethernet ...
2
votes
1answer
152 views

UTF8 filenames and shell utilities

Try the next commands from the terminal: touch á.txt $ ls á.txt find . -name á.txt -print prints nothing. My Terminal.app settings are utf8 - see here: The question: How to achieve to work ...
1
vote
2answers
528 views

How to properly register a file extension on mac so it will also work by running open from the command line?

I have the following problem, I registered a file extension to be opened by a Mac Application by clicking on the file in Finder and selecting to always use the target application to open the files. ...
0
votes
1answer
2k views

Server certificates are not properly validated by subversion/openssl

I noticed that the svn cli fails to validate https certificates and always ask for manual validation using the certificate fingerprint: mbp:~ user$ svn co https://svn.mysite.com/svn/testrepo Error ...
8
votes
6answers
665 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 ...
0
votes
1answer
57 views

Run a program without networking?

Is there a way to run a program on OS X (e.g., from the command line) but without letting it see the network? I can turn off and disconnect all networking, but then all my other processes will be ...
1
vote
1answer
75 views

prevent doubleapple files creation when tarring directories (Snow Leopard)

I'm looking how to prevent tar from saving or creating .AppleDouble shadow files and preferably do it in an automated manner. There are a few questions asking why this happens, but I want a solution ...