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)

5
votes
1answer
15k 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 ...
5
votes
2answers
7k views

Why does Java SE 6 Web Start (javaws) not find the JRE with Apple's Java for OS X 2012-006 on Mountain Lion?

In brief The JRE is installed but javaws can not find the JRE. What can I do on the command line to re-enable the web plugin for Apple's Java 6 in Chrome or Safari? I want to avoid Java 7. (We're ...
4
votes
5answers
5k views

How do I get “wget” for Snow Leopard?

There's no wget command. How do I get it?
4
votes
3answers
2k views

Installing command line GNU utils

I've recently started using MacBook Pro with OSX, after years of developing under Ubuntu. I often use GNU command line tools like make and watch. How do I install these on my Mac?
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 ...
4
votes
2answers
442 views

Using grep on Mac-style text files

When I run grep on a text file, I get nonsense results. It seems as if the whole file is printed out but on one line overwriting itself. I read that on the Mac, text files use \r instead of the ...
4
votes
1answer
475 views

How do I prevent the permissions denied message from being displayed when I do a find command?

I'm trying to run a find command, aka: find / -name "some_file" -print and my results are full of permission denied messages: find: /.DocumentRevisions-V100: Permission denied How do I prevent ...
4
votes
2answers
649 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 ...
4
votes
2answers
1k 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 ...
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\%"). ...
4
votes
1answer
3k views

Is there a more-accurate indicator of an app download's progress than what appears in Launchpad?

While downloading an application from the Mac App Store, you are presented with a progress indicator in Launchpad, like so: For a large install (like Xcode, as shown) this doesn't provide a ...
4
votes
4answers
3k 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 ...
4
votes
1answer
201 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)
4
votes
1answer
2k views

Is there a command-line BitTorrent client preinstalled on OS X?

On a "bare" OS X 10.8 install, what is the easiest way to grab a largish torrent from the command line (MacTeX, 2.3 GB)? I can't use GUI-only clients, it's a headless system. If no such client is ...
4
votes
2answers
398 views

Can I extend Alfred with a command-line program to clean up the desktop?

I'd like to have something that I can run from Alfred or the command-line that can run "clean up desktop". What is a command-line program or apple script that will cleanup the desktop? Preferably ...
4
votes
1answer
344 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
1answer
6k views

Is there a Mac OS X equivalent of the Linux iwconfig command?

I'm looking for a command line tool in Mac OS X that performs the equivalent of the iwconfig command in Linux. Example: kirkland@x220:~/src/byobu/byobu$ iwconfig wlan0 wlan0 IEEE 802.11abgn ...
4
votes
2answers
3k 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? ...
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 ...
4
votes
1answer
274 views

How do I set an icon for a directory via the CLI? [duplicate]

Possible Duplicate: Changing a file or folder icon using the Terminal This is a continuation of this thread from Super User. The question is how to set an icon on a directory. At first I ...
4
votes
3answers
858 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 ...
4
votes
4answers
1k views

Temporary files listed by lsof don't exist

I like copying flash videos for offline viewing later. I used to do this by loading the video in the browser (Firefox or Google Chrome), then running this command to see where the flash file was being ...
4
votes
2answers
138 views

I added this to my .bash_profile but I neglected to label it and forgot what it means exactly

I remember broadly what it does, but not specifically: if [ -f ~/.bashrc ]; then source ~/.bashrc fi What is the exact purpose for it again?
4
votes
2answers
2k views

How to install CPAN modules from the command line on OS X?

Simple question: How to install CPAN modules on OS-X like normal Linux/Unix way? I just want to type in cpan something like install Perl6::Say for example.
4
votes
2answers
7k views

How to start OS X applications from the command line with optional arguments?

I am looking for an easy way to start different GUI OS X applications from the command line and with different parameters. If possible I would like to add them to the system PATH in order to call ...
4
votes
1answer
727 views

Enable/Disable power nap from within Terminal

How can I enable and/or disable OS X's power nap feature from within Terminal? I guess I can deal with it using some command-line programs such as defaults write ... etc, but don't know what the exact ...
4
votes
2answers
4k views

How to change the creation (st_birthtime) 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 ...
4
votes
1answer
2k views

How can I add all users to Print Administrator group but not full administrator?

Gordon Davisson offered a solution to a "standalone user" in another question I'm facing the same issue in an office environment. Printer paused and System Administrator needs to be called to enter ...
4
votes
2answers
282 views

Is there a way to provide a sort order to an mdfind query?

In trying to get a list of all music files from a particular album using mdfind I see that the files aren't necessarily returned in any order. I'd prefer album/track order if possible, but can't find ...
4
votes
1answer
47 views

Graphical man pages viewer in Terminal.app

There is a feature in terminal to view man-page of selected string in external window with ⌃⌘? shortcut. But it has a priority to display preinstalled man pages. So for example I've installed gnu ...
4
votes
1answer
552 views

How do I find the current Mission Control space number from the command line?

Is there any way to determine the number of the currently active Mission Control space/desktop in Mac OS X Lion from the command line?
4
votes
4answers
2k views

Copy to network share using local disk cache in Mac OS X Lion

I'm using rsync in Mac OS X Lion to copy a backup directory from my local HD to a network mounted share (local LAN). My goal is to archive the local backup to the network drive, thereby freeing up ...
4
votes
1answer
623 views

Is there a OS X equivalent for iproute2?

I am searching a command line tool collection like iproute2 on Linux. Network Utility is OK, but I would like it on the command line.
4
votes
3answers
580 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 ...
4
votes
1answer
230 views

How do I monitor the total physical and virtual memory usage of a process and all of its descendants?

From the command line, how would I get the total physical and virtual memory usage of a process and all of its descendants (not just 1st-level children)? This is useful when you want to monitor the ...
4
votes
0answers
158 views

“Open with” in Finder.app gives duplicate entries [duplicate]

Possible Duplicate: How to omit apps from external drives in “Open With” menu? in finder's open with menu are a lot of dups. I am running latest OX X and patches. I googled and found ...
3
votes
3answers
3k views

Is there a command to install a dmg

I want to install a dmg file on a remote server. All I have is an ssh access. Since a DMG is a disk image, I tried to mount it, but mount does not seem to recognize its format. file says my dmg file ...
3
votes
3answers
2k views

.tar files on OS X Lion

How am I supposed to deal with .tar files with OS X Lion? I'm trying to install Ruby Version Manager, but Lion is throwing a fit about not being able to expand the tar file. This isn't the first time ...
3
votes
1answer
5k views

Is it possible to view passwords through Terminal?

Does anyone know how to view passwords in Terminal? Maybe by accessing the Keychain data or something? I want to be able to view passwords in Terminal with just a series of commands.
3
votes
1answer
3k 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 ...
3
votes
3answers
10k 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 ...
3
votes
2answers
2k views

Disk utility in command line

I'm looking for the CLI equivalent of "Check disk" and "repair disk" in Disk Utility. I think fsck is involved but I don't know with which options, and if it's the only program run.
3
votes
3answers
8k views

Netcat -e on Mac OS X

I'm a newbie macuser coming from Debian, and I'm a big command line user. One one my preferred one is netcat (aka nc on mac). I especially loved the -e option which enabled to create a process that ...
3
votes
3answers
94 views

locate & updatedb - files not found

I ran sudo /usr/libexec/locate.updatedb then locate Radium3 but it returns nothing! but $ ls ~/Library/Containers/com.catpigstudios.Radium3/ Container.plist Data So why doesn't locate see ...
3
votes
1answer
520 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 ...
3
votes
2answers
502 views

How do I set the creation time of a file?

I have a script that converts a file to another format, and I want the resulting file to have the same timestamps as the original, including the creation time (as shown by ls -lU). I can use touch to ...
3
votes
2answers
118 views

How to have locatedb created / updated automatically?

I ran locate blob.txt and I got: $ locate .bashrc WARNING: The locate database (/var/db/locate.database) does not exist. To create the database, run the following command: sudo launchctl load -w ...
3
votes
2answers
220 views

Mac OS X UNIX-oriented Tutorial

Is there any Mac OS X tutorial/book that covers the UNIX part of this operating system? Topics like: Managing daemons from the command-line Package management Install/Remove dmg's from the ...
3
votes
2answers
310 views

How to drop a file onto a GUI app from command line?

I've got a tool to normalize WAV audio files, but it only works by dragging and dropping the file either onto the GUI or onto its dock's icon. As far as I know the app doesn't have any option to pass ...
3
votes
1answer
10k views

Create new partition in unallocated space with diskutil

I have deleted the first partition on my external HD such that it now has 100GB of free space at the beginning of the partition. I'd like to reclaim that space, but Disk Utility doesn't let me create ...