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)

2
votes
1answer
331 views

Paste <TAB> into Mac OS X command line

I want to paste <TAB> into command line, in order to execute cut command with <TAB> as the delimiter. Everytime I try to do it, it simulates clicking the tab key and completes the command ...
1
vote
2answers
541 views

Use Cmd as Ctrl key in vim

How can I input commands such as <Ctrl-W> and <Ctrl-]> in vim using Cmd instead of Ctrl? The reason why I want to do it is because it's more comfortable. When I need to switch to a ...
1
vote
1answer
95 views

Backing up individual files with encryption

In addition to local Time Machine backups, I would like to automatically backup my working data from my Macbook to a remote FTP space. Because it's a location I don't control and sensitive data, I ...
2
votes
1answer
228 views

Why do debuggers need an admin password?

Why does running LLDB or instruments require elevated privilages?
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 ...
9
votes
3answers
17k views

What steps are needed to create a new user from the command line on Mountain Lion?

What commands (or script) can create a fully functional user account on Mountain Lion, running only from the command line via terminal or ssh. It looks like an existing pair of answers might work, ...
2
votes
3answers
1k views

How to determine the absolute path to a file in a shell script

I am writing a generic script that can get passed both absolute and relative (to the current working dir) paths to existing files. I need a fail-safe way to turn all those passed paths into absolute ...
1
vote
0answers
159 views

How to install Writer2LaTeX in command line

This is the app I want to install, in ubuntu it was done automatically, but somehow in Mac it seems that I have to install manually. Writer2LaTeX http://writer2latex.sourceforge.net/ In the ...
15
votes
1answer
1k views

Why is lsof on OS X so ridiculously slow?

I can't figure out why lsof on my Mac (10.8.2, MacBook Pro) is so slow. On my Mac, lsof takes more than a minute: $ touch /tmp/testfile $ time lsof /tmp/testfile real 1m16.483s user 0m0.029s ...
0
votes
0answers
20 views

How can I toggle internet sharing from the command line? [duplicate]

Possible Duplicate: Start/stop internet sharing from a script? There are applescripts / automator scripts that help to turn on / off internet sharing, but they do not work consistently ...
6
votes
6answers
6k views

Improved Terminal autocomplete funcionality (similar to Matlab's)

If any of you ever used Matlab, you might have noticed the command window functionality in that program. I wonder if it is possible to enable the same functionality in Mac Terminal. It works like ...
6
votes
2answers
3k views

Child process exited with status 254 error when extracting a tar.xz file

I'm trying to extract a tar.xz file with tar in Mac OS X Lion. I'm using bsdtar 2.8.3 - libarchive 2.8.3. I'm able to use tar to extract anything else I've tried (.zip, .tar, .tar.gz, etc.), but when ...
4
votes
1answer
8k 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 ...
17
votes
14answers
8k views

Lock Screen Command One-Liner

I'm trying to find out whether there is any kind of equivalent command line one-liner which replicates the exact identical functionality of the 'Lock Screen' menu option available via the Keychain app ...
0
votes
1answer
257 views

Set Keystroke for Service from Terminal

I created some services to be used in Finder. Now I wanted to create some keystrokes to call these services. That would be easy in the System Settings, however, I would like to add them from the ...
1
vote
2answers
741 views

Can not successfully re-install MYSQL 10.8.2

Removed the old installation as explained here: http://superuser.com/questions/129193/how-do-i-uninstall-mysql-on-mac-os-x-snow-leopard Installed the package contained in the mysql 5.1.67 DMG ...
1
vote
1answer
613 views

What's the difference between device file and its raw version?

It's convenient to use dd to write image file to USB sticks. But I find sometimes people write dd of=/dev/disk1 and there is alos dd of=/dev/rdisk1. e.g. The arch wiki dd if=image.iso ...
4
votes
1answer
248 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 ...
3
votes
1answer
205 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 ...
1
vote
2answers
3k views

How to set alternatives in 10.8?

On Linux you can use update-alternative to change the version of a command. Which command in OS X (10.8) will switch the alternative of the current command?
1
vote
0answers
246 views

Resource efficient way to monitor file change and execute shell scripts on change

I know at least three ways to monitor a folder/file for changes and execute a shell script on change. First, use "Folder Actions" of Automator Second, the launchd.plist approach but it seems the ...
3
votes
3answers
547 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 ...
6
votes
1answer
385 views

How do I emulate Internet Sharing from the command line?

I'm trying to set up my Macbook Air to share an OpenVPN connection for use while I'm on the road and don't want my iOS traffic to go over the open Internet. Sadly, Mountain Lion's Internet Sharing ...
0
votes
1answer
65 views

Bug in 'file' command on 10.5.8? (Or am I doin' it wrong?)

On my OS X 10.5.8 system, the man page for 'file' says: -h, --no-dereference option causes symlinks not to be followed (on systems that support symbolic links). This is the default if ...
10
votes
2answers
1k views

why does OSX add extra '._<filename>' when I tar a directory?

I'd just like to know why if I "tar -czf" a file/directory, osx adds a: ._ for each file? I see these when I untar in linux. Or when I work with the uncompressed project in eclipse as it doesn't ...
3
votes
1answer
531 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, ...
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.
3
votes
2answers
355 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 ...
0
votes
1answer
136 views

Using dictation in the command line (e.g. transcribe an audio recording to a text file)

I have some audio recordings and would like to transcribe them into text files. I was wondering whether there is a command line tool that could use the built-in Dictation to do that? And if so, is ...
3
votes
2answers
294 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 ...
2
votes
2answers
423 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 ...
6
votes
2answers
226 views

How do I “Get Info” from the command line?

Related to this question: http://superuser.com/q/514528/90435 Via http://osxdaily.com/2010/10/12/find-out-where-a-file-was-downloaded-from/ I find out that you can use 'get info' though Finder to ...
2
votes
3answers
23k 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?
4
votes
3answers
4k 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 ...
7
votes
3answers
4k views

How does Mountain Lion set the default text editor for the “open -t” terminal command?

OSX seem to offer open -t command line shortcut to open arbitrary files in the system default text editor. Where is this default text editor set? Can I change it from the command line (if possible) ...
1
vote
2answers
2k views

Display dialog from command line (like xmessage does)

Background I'd like to be able to display a notification window in OS X from within a script. The script will be running in background, so the notification should not go to the terminal but instead ...
5
votes
1answer
505 views

Can I play chess on my Mac from the command line?

If I were feeling insufficiently geekish on any particular day, and thus found the GUI Chess App to lack an appropriate amount of tech credibility, is there a way to play chess on my Mac from the ...
6
votes
1answer
280 views

Incorrect Terminal.app output for long lines with tabs

When I run the following command in Terminal.app: echo -e "a\tb\tc\td\te\tf\tg\tyo" I should get the following output (using a 40-column window so that lines don't wrap here, and replacing tabs ...
1
vote
3answers
661 views

Moving a folder with “sudo mv”, how to preserve ACLs?

I'm moving a whole folder from one volume to another (both HFS+), using sudo mv, and thought ACLs would be preserved. However at the end of transfer I see that they haven't been kept, and since mv ...
1
vote
1answer
378 views

How do I command Automator to convert the multiple images from PNG to ICNS once at all? (Solved)

I use OS X Mountain 10.8.2. I used Automator and added AppleScript, copying the command from the old app's developer at the Iconoodle - Convenient ICNS to PNG image conversion (Iconoodle isn't ...
4
votes
2answers
428 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 ...
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
1answer
766 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.
2
votes
2answers
6k views

Restore disk in single user mode

I wonder if it is possible to restore one partition to another in command line? The similar operation can be performed with Disk Utility, but unfortunately I cannot boot in graphics mode (even safe ...
0
votes
2answers
472 views

adding a secondary group for user via CLI in Lion is not working

I need to assign a secondary group membership to a user on a client machine running 10.7.4. In CLI edit3:~ admin$ sudo su - edit3:etc root# dseditgroup -o edit -a userA -t user QC edit3:etc root# ...
0
votes
1answer
202 views

When I close the lid and open it later in the day, will command line programs resume?

I've been running a python script from the command line that's inserting data in a database for a couple of hours now. It will take at least half a day more before it's finished. However, I want to ...
-2
votes
1answer
522 views

Running *ix Commandline tools in Macbook Air? VNC? Virtual-machine? Usable or too slow? [closed]

I haven't used OS X since an awful experience with its commandline tools and CD Xcode about 2009, that time getting rid of all Apple stuff but coming back after iPhone/iPad/FaceTime/iCloud/etc. Now I ...
6
votes
2answers
3k views

What is the preferred method of command line domain name lookup (DNS)?

What command line command do I use to lookup a domain address? When looking at the man pages for nslookup and dig I can see a section saying that these utilities do not use the Mac OS methods of ...
3
votes
1answer
215 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.
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 ...