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)

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
587 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
291 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
536 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
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)
1
vote
1answer
329 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
350 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
702 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
280 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
4k 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
670 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
137 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
400 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
472 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
123 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
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 ...
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
841 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
737 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
873 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
368 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
411 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
343 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 ...
1
vote
2answers
276 views

Creating a wget OSX Service

I want to create a service to copy the URL and subsequently download it via wget. How would I go about creating an OSX service to wget arbitrary urls from a browser or system wide. I believe it'd be ...
3
votes
1answer
855 views

Connect to Server as guest from command line

I have a SAMBA share I mount on my Mac from time to time. I do this in Finder with Go > Connect to Server..., typing smb://192.168.1.1 into the Server Address field and pressing Connect. On the ...
5
votes
1answer
15k views

How do I format a disk partition from the command line on OS X?

How do I format a disk partition from the command line on Mac OS X? In case someone wonders why: because for some people Disk Utility fails.
1
vote
3answers
333 views

How to force a diff format for TextMate?

I have this alias: alias hgd='hg diff|mate' The problem is that for some reason the temporary file thus created will be a .txt, while I'd need it to have the diff syntax highlight. If I manually ...
5
votes
6answers
2k views

Why use the terminal in daily non-programming life

Disclaimer: I'm a Windows boy awaiting his first mac. I never bothered learning/using command-line interfaces. I've been looking at the Terminal Tips and Tricks topic and I don't see how any of those ...
9
votes
2answers
12k views

How do I create a symbolic link to a directory with a space in it?

I was trying to create a symbolic link using the following command: ln -s "~/Foo Bar/" Foo ... but it didn't work (i.e. when I go into finder and try double clicking it, it says that it's pointing ...
0
votes
2answers
2k views

Setting a custom log

I have to get all the chromium and firefox info logs out of /var/log/system.log and into a nice quiet /var/log/{chromium,firefox}.log. However I can neither recall or find how to set that in ...
2
votes
1answer
205 views

How can I run a shell command at login time without showing a Dock entry? [duplicate]

Possible Duplicate: How to run something automatically when the system boots or a use logs on? I need to automatically run a command when I log in but I don't want to add an item to the ...
1
vote
1answer
251 views

How to disable coalescing of log messages in OS X?

I've been using Console to debug some things on my Mac, and I keep seeing --- last message repeated one time --- in the log. Apparently it's not really essential, and you can turn it off on the ...
3
votes
3answers
270 views

How to make preview jump to a specific line on startup

I am using TexLipse for working with latex, producing pdfs as output. I have configured it to use preview as viewer using this command line: open -a "/Applications/Preview.app" %fullfile Where ...
6
votes
1answer
5k views

What command combo at terminal will output a list of directories with human-readable sizes?

I'd like to open Terminal.app and enter a command like: my-macbook-pro:~ my-username$ ls -lh Instead of seeing the size of the folders in bytes that are in my current working directory, I'd like to ...
2
votes
1answer
317 views

Remember desktop state after reboot

Does anyone know if desktop switching can be done programatically? Exposé activation and deactivation? I know of the screencapture command for the last part of my proposed solution. I would like to ...
8
votes
3answers
412 views

Drag & Drop vs mv - Any difference?

Is there a difference between bulk-moving files with Drag & Drop vs mv? Use case: Volume External_Drive_A has about 8000 files totalling 9GB. External_Drive_B has 74GB of free space. The ...