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
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
84 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
3answers
993 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
507 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
515 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
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 ...
3
votes
2answers
129 views

Is the power button on my iPhone being turned off programmatically?

I would like to know if there is a code / glitch to make the sleep/wake button on the iPhone 5/5S to stop working. i am almost 100% certain it exists due to some programmers making the code but i want ...
3
votes
1answer
303 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
167 views

How to kill the popup in OS X when a disk can't be ejected

With ZFS-OSX, sometimes when I try to force eject my HDD and it's failing, the following popup appears on my screen – floating on the top with all the buttons grayed out – and no possibility to close ...
3
votes
1answer
84 views

CLI softwareupdate does not find updates

I can see in the App Store that I have one application (Xcode 5.0.2) that needs to be updated. But if I run the sudo softwareupdate --list in terminal I get the message that there is "No new software ...
3
votes
1answer
218 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 ...
3
votes
1answer
259 views

Using the apple wireless keyboard with an iPad with PC/Mac-like keyboard commands

I have jailbroken iPad2 (iOS5.1.1) and an apple wireless bluetooth keyboard that I use for typing on the iPad. Although the keyboard is a joy to use, I can't use it for much else other than typing ...
3
votes
1answer
3k views

Command Line Tools fail to install OSX Lion 10.7.3 Xcode 4.3

I'm trying to install the command line tools to get gcc, make, and other goodies after a Lion upgrade. I went to preferences/Downloads in XCode and attempted to install the command line tools. At the ...
3
votes
1answer
51 views

open image full screen with “open -a Preview”

Using osx 10.9.3 I would like to write a script that opens images full-screen with preview but I can't seem to find the command line options for the Preview application.
3
votes
3answers
172 views

Command line tools available by default

In a unix based system a number of commands are available by default (either in /bin or /usr/bin). Suppose in some time I installed more tools like git, svn … In OS X if I install XCode and then the ...
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 ...
3
votes
1answer
193 views

Within Terminal, `date` command outputs a curious prefix where it should'n

I am using a Mac Mini running Lion (10.7.5) and zsh 4.3.12 (i386-apple-darwin11.0.1) with oh-my-zsh installed. In the Terminal.app I retrieve the UNIX timestamp using the following command date +%s ...
3
votes
1answer
488 views

Why doesn't tar recognize .iso files, even though the documentation says it should?

man tar says that OS X's tar implementation should be able to extract .iso files. tar creates and manipulates streaming archive files. This implementation can extract from tar, pax, cpio, zip, ...
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
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
1answer
856 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 ...
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 ...
3
votes
1answer
109 views

pbcopy exits code 1, no error message

I'm trying to use pbcopy and pbpaste to copy and paste to the clipboard from a shell. I read the man page to learn the syntax for these programs. However, no matter how I try to invoke pbcopy or ...
3
votes
2answers
1k views

Starting airplay from command line, to send output of 'Say' Mac OS X command to airplay

Ok, Sunday question :) Trying to make a little joke... 1) if you open a terminal, and type "say -a ?", Mac OS X will give you the list of devices it can send spoken words to. On mine, it says: 39 ...
3
votes
1answer
5k views

Update Xcode from 4.6.1 to 4.6.3 for Homebrew

I have installed Xode downloading the DMG (not from the Mac App Store). Now each time I run brew doctor it says: Your Xcode (4.6.1) is outdated Please install Xcode 4.6.3. But In App Store > ...
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 ...
3
votes
1answer
1k views

Is it possible to download Apple's Command Line Tools for Xcode from the command line?

Background My job gives me temporary MacBook Pros for travel purposes. I get them with a fresh OS install before I leave, and when I return, they blank the hard drive. The trips usually require some ...
3
votes
1answer
173 views

Does mac os x have any command tool like pidstat in linux?

It can tell me the current status of a process, for example, whether it is still running or has been terminated.
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 ...
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 ...
3
votes
1answer
499 views

Why setting image as its own icon with sips result a blurred icon? Are there any alternatives?

I've successfully changed icons using the procedure described in an another question: Changing or setting a file or folder icon programmatically. Either my sips (or Finder) got broken afterwards or I ...
3
votes
0answers
33 views

Get ambient light sensor value from ioreg

I'm using the ioreg command line tool to try and read sensor information available on my computer (iMac). Particularly, I'd like to read the current value of the ambient light sensor. So far, I have ...
3
votes
1answer
981 views

How can I use RSVG with ImageMagick?

I'd like to use the RSVG for SVG processing in ImageMagick (the included library is fairly incomplete). RSVG is a supported delegate but needs to be installed separately. I've installed librsvg and ...
2
votes
4answers
2k views

How to correctly pipe output into “say” in terminal

I realized that the "say" command can be great when combined with another command/program because it can read you the output. I tried to pipe the output from "leave" to "say" by typing the following ...
2
votes
3answers
2k views

Can grep highlight matching text without hiding file content?

I frequently use grep's context command line options (-A, -B, and -C), but occasionally I want to view the whole file with matching expressions highlighted. To accomplish this currently I simply ...
2
votes
3answers
288 views

How to determine out what Wi-Fi channel is used from the command line?

If I hold Alt/Option and click the Airport icon at the top, I get a bunch of extra data about the access point I'm connected to. Most interestingly for me right now is the Wi-Fi channel. ifconfig ...
2
votes
2answers
967 views

Getting launchd to read program arguments correctly

I have a launchd script where the command I'm trying to run is erroring (apparently that's not a word, it is now), complaining of improper usage. The specific error I'm getting is the command's usage ...
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 ...
2
votes
4answers
2k views

How to run Wireshark in the background without the GUI?

I am trying to run Wireshark on Mac OS X in the background. I installed the command line utilities, and so I am able to start Wireshark and capture packets using the command line. The only thing I ...
2
votes
1answer
49 views

Size in bytes is significantly less ( half the size) then size in MB in get info window

In the get info window it says 387,037,139 bytes which is 387 MB whereas the size on disk is 716.9MB which is 716,900,000 bytes. du -sh paramgen result (in MiB) 684M paramgen Why is there such ...
2
votes
3answers
22k views

How to run .exe files on Mac without virtual machine?

I do have one software(.exe) file which I need to run on my macbook pro. For that I need cross platform application just like wine in Ubuntu. Can anyone suggest me the application?
2
votes
4answers
4k views

How to find all files that are larger than 1GB on the Mac HD?

It seems that either one of these commands can be used: sudo find / -size +1G sudo find / -type f -size +1G But when it gets to /Volumes, it actually look at all the back up files by Time Machine ...
2
votes
3answers
1k views

How to manually trigger background image change?

I have set the wallpaper to change every hour and have enabled it to cycle them in a random order. Sometimes the background image changes to an image that was set just few rounds ago and I'd like to ...
2
votes
4answers
76 views

Get Info of a hidden file (to change its default app)

I have a hidden file (.htaccess). When I double click it I would like it to open with a certain app (Sublime Text for this particular file type). In order to set the default app I have to open the ...
2
votes
2answers
175 views

make it easier to call often used terminal commands

I have a java tool that I use quite often from the command line but to use it I have to type java -jar dsim.jar. I want to make it so that I can call it just by typing dsim regardless of what ...
2
votes
2answers
389 views

Terminal : needs full path to execute a command

Let's suppose i have an application in /Applications/MacPorts/KDE4/myapp.app/Contents/MacOS/myapp. When i use cd to reach the directory 'MacOS' and then issue the command myapp it says command not ...
2
votes
3answers
1k views

Getting a list of currently running processes

I'd like to get a list of all the applications currently running on my machine using the command line. It should be similar to what you get when you open up Activity Monitor and choose to save the ...
2
votes
2answers
500 views

Unix command to recursively copy JPG files in a complex directory tree

I have a large directory tree structure that contains multiple JPG files in each directory root and their subsequent subdirectories. I need to recursively extract a single JPG file from each directory ...
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 ...
2
votes
1answer
343 views

Play .ogg on command line

How can I play a .ogg music file on the command line? On Linux I can use ogg123, but what about on Mac?