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)

4
votes
1answer
312 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
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
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
193 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
310 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
3answers
822 views

How to view man pages in a web browser?

Which .conf file do I need to edit in order to view man pages in a web browser? I'd like to use Google Chrome to do this. Is this possible?
4
votes
1answer
5k 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
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
263 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
817 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
132 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
1k 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
2k views

How do you record audio from command line with osx?

I've tried ffmpeg but there is no /dev/dsp device.
4
votes
2answers
6k 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
324 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
3k 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
263 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
519 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
14k 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
523 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
215 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
157 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
7k views

How to add user to a group on command line?

With Linux/Unix, I can use useradd -G developers vivek to add vivek to the developer group. How can I do the same thing with Mac OS X? Then, how do I check if vivek is in developers group?
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
4k 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
3answers
9k 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
1k 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
7k 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
1answer
459 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
442 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
61 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
151 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
269 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
2answers
352 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 ...
3
votes
3answers
6k 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 ...
3
votes
1answer
83 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 ...
3
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 ...
3
votes
1answer
958 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 ...
3
votes
3answers
807 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 ...
3
votes
3answers
460 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 ...
3
votes
1answer
8k 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 ...
3
votes
2answers
2k 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? ...
3
votes
1answer
459 views

Printing the current date/time with sub-second precision

GNU date(1) understands the %N format spec, which outputs nanoseconds, so: $ date +%H:%m:%S.%N outputs 19:10:03.725196000 BSD date doesn't understand %N. How can I print the current time with ...
3
votes
2answers
978 views

Package command line tools into an automator script or app?

I'd like to know if there's a way I could package compiled command line tools together as part of an automator script or an app. Let's say, for example, I want to use a command line tool called foo ...
3
votes
1answer
116 views

Command Line: create a link to folder and access files in this folder

I want to do this thing: Create a link to a folder. Put this link in home (~) directory Access files in linked folder from home directory (~/LinkToFolder/file) What is the best way to it? Main ...
3
votes
1answer
166 views

List of GNU packages for homebrew

My team is working with Mountain Lion MacBook Pros, and we're using the GNU CLI tools, like wget and watch, intensively. Whenever a new team member joins us, we tell the new hire to install homebrew ...