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
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
2answers
1k 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 ...
1
vote
1answer
146 views

macbook - low power from the command line

I often (for example on the train) want to put my macbook into a state that will maximise the amount of time I have before the battery runs out - so far example I'll switch off the bluetooth, then ...
2
votes
2answers
134 views

Open app in current directory when another app with the same name exists, from command line

I have an app name foo.app I want to open from command line (using open). My folder structure is like this: ~ +---bar +--- foo.app +---baz +--- foo.app I want to open the app located in ...
4
votes
3answers
860 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 ...
2
votes
2answers
240 views

How to investigate fragmentation of one file?

I'd like to see if one of my file is "all over the place", ie fragmented in little pieces at different locations on my hard drive. I'm not looking for a software like iDefrag but rather a command ...
0
votes
1answer
490 views

Command line brightness (Lion) [duplicate]

Possible Duplicate: How can I dim the screen from Terminal? Is there a command I can execute to modify screen brightness? Interested to see if the min/max are hardware or software ...
7
votes
1answer
334 views

How can I log into the desktop environment as Root on a new mac running 10.6 or 10.7 without creating a user account?

Under Mac OS 10.5, you could boot a fresh-out-of-the-box Mac into single user mode, mount /, set the root password, and touch .AppleSetupDone - this would allow you to log into the desktop environment ...
3
votes
1answer
3k views

Is there a way to minimize open windows from the command line in OS X Lion?

Just wondering if there is a way to retrieve open windows and minimize them from the command line in Lion? I have an AppleScript that does this, but it kind of slow, so wanted to know if there was ...
1
vote
1answer
2k views

Foolproof way of extracting .pkg files

I know there are some paid GUI tools that let you do this, but I'm not interested in those. Currently, I'm doing this: gzcat Contents/Archive.pax.gz | pax -r However, there are some pkg files that ...
0
votes
1answer
217 views

NAS recommendation [closed]

I'm wondering if anyone can recommend a 4-bay NAS with AFP/TimeMachine support and the ability for me to install s3cmd (a utility for simple S3 syncing). The reason I ask is simple: just having a ...
4
votes
1answer
563 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?
2
votes
1answer
619 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?
2
votes
1answer
1k views

Open source iSightCapture?

Is there an open source program like iSightCapture?
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 ...
6
votes
1answer
6k views

How to initiate VPN conection from command line?

I would like to save some mouse clicks and keystrokes by initiating VPN connection from command line. Is there tool for this in Mac OS X? Ideally, it should accept VPN connection name and password and ...
1
vote
2answers
601 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 ...
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 ...
0
votes
2answers
294 views

command line ps has stopped working correctly after an update

I use to be able to run this ps command from the terminal: ps -u whoami -o pid,rss,command But recently the RSS size returned are all 0! ps -u `whoami` -o pid,rss,command 158 0 ...
0
votes
2answers
547 views

CLI - how can I specify a screen saver with the following options?

Through the CLI, I would like to select the flurry screen saver set to activate in 15 minutes and show the clock.
1
vote
0answers
202 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
204 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
335 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 ...
2
votes
1answer
353 views

Is it possible to set a Custom quick look preview image in OS X?

Is there any way to set a custom quick look image in OS X? I'd like a command line tool or applescript to change or embed a custom preview for a file using a jpeg.
7
votes
1answer
2k views

Ubuntu-like bash completion in Mac OS X?

I work in the terminal a fair bit, and one thing I really miss from the servers I usually work on is the comprehensive autocompletion bash provides on Ubuntu servers. Are there any readymade tools ...
10
votes
3answers
1k views

What is the “+” mark at the end of file description?

When I execute 'ls -al~', I see + marks, and it prevents me from moving/deleting files. drwxr-xr-x+ 5 prosseek admin 170 Oct 5 03:43 Desktop drwxr-xr-x+ 17 prosseek admin 578 Sep 25 ...
11
votes
2answers
4k 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 ...
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.
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 ...
5
votes
3answers
710 views

How can I initiate a modem connection from the command line?

I am looking for a way to initiate a PPP connection with my EVDO modem from the command line instead of having to go to System Preferences -> Network and hit "Connect".
4
votes
2answers
284 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 ...
5
votes
1answer
5k views

How do I change back from MacPorts Python to system default version?

I used MacPorts to install a newer version of Python on my system (10.5.8 PPC), and then used the MacPorts select command to change the default invoked version of Python to the MP version. Now I want ...
0
votes
1answer
686 views

Is it possible to switch from Safe Mode to Normal and back without a reboot?

Since 10.6.3, Apple has decided change the AppleIntelCPUManagement kexts, which leave me stuck with a kernel_task that pegs out at 135-185%, generating a lot of heat. Anyway, since I doubt anyone has ...
7
votes
4answers
1k views

What's the best way to install command line utilities such as GIT?

I'm a Windows/Linux guy that just got my Macbook Air. I do web dev, and am currently trying to setup this machine for some on-the-go development. After some research attempts, I'm wondering: what's ...
0
votes
1answer
138 views

How do I list the plugged memory sticks on Mac OS

How can I list all the currently memory devices on MacOS X? I need to do this by command, because I have an Java application that needs this information. Thanks
9
votes
3answers
2k views

How can I force command-line arguments to a program shortcut in the dock?

I have Chrome installed in Applications, and a shortcut to it in the Dock. How can I achieve to force some command-line arguments to each start-up of this app? Let me be clearer, in the Terminal, I ...
2
votes
1answer
401 views

Mac Terminal: emacs-style command editing messed up

This has been a "quality of life" issue for me for a while now- command-line editing in the Mac terminal is messed up for me. If I type a few chars, and then hit CTRL-A to move to the beginning of ...
1
vote
1answer
477 views

using gcc, g++ outside of xcode on mac

I'd like to spend some time aside from the IDE for a bit and use command line gcc, g++ compilers. When i use my terminal, they however, can't be found. How can i install them? I honestly am ...
1
vote
1answer
124 views

Adding Mac-specific directory to PATH when home is shared

My /home/myusername/ directory is provided through a network, and looks exactly the same on my Linux machine and my Mac Mini. I'd like to add to PATH a directory of Mac-specific software in my home, ...
4
votes
2answers
444 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 ...
1
vote
2answers
84 views

Regarding groff - where is the config file and will this work?

I've been reading Terminal Tips and Tricks For Mac OS X when I came across this. bman () { gunzip < `man -w $@` | groff -Thtml -man | bcat } Apparently I should be able to view man pages ...
1
vote
1answer
846 views

“readlink” gets the original path of a symlink; what's the equivalent for Mac aliases?

In the terminal, I can use readlink on a symlink and it prints the target path of the symlink. E.g. ln -s original.txt symlink.txt readlink symlink.txt # prints original.txt How do I do this for ...
1
vote
0answers
743 views

curl gives error - possibly fink related?

When I try and run curl in the OS X Terminal I get the following error: dyld: Library not loaded: /usr/local/lib/libcurl.4.dylib Referenced from: /usr/local/bin/curl Reason: Incompatible library ...
5
votes
3answers
883 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?
0
votes
3answers
17k views

How to send text with telnet in Terminal?

I would like to send some text to a port on my machine using telnet in the Mac OS X Terminal. I start telnet using: telnet localhost 8080 Then I type some text. Is that text send automatically or ...
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 ...
0
votes
1answer
374 views

Is there any way to change the output filename for qlmanage?

Is there any way to specify the output filename and directory that qlmanage uses? We are using qlmanage to convert word documents to HTML, and it writes Preview.html to its temp directory. You can ...
1
vote
1answer
420 views

dd to ISO from disc drive makes unmountable / unburnable image?

I'm trying to dd from a disc in my DVD drive on my MacBook to an ISO, but the image always ends up as unmountable and unburnable. The disc is unmounted when I start the process. I've used dd many ...
6
votes
3answers
9k 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?
1
vote
2answers
350 views

Force simple UNIX path names for optimal us of command line apps?

I want to force myself to use folder/file names without spaces etc. so I'm 100% certain I can open and run them from the command line. Some terminal apps which I use frequently hava a hard time ...