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)

1
vote
1answer
86 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 ...
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 ...
6
votes
1answer
243 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 ...
5
votes
2answers
2k 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 ...
8
votes
2answers
1k views

Can user accounts be managed via the command line?

Is there any way to add, remove, or modify user accounts via the command line? I'm not talking about an account for a system process or daemon, I mean is there any way to add a user account, change, ...
2
votes
3answers
812 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 ...
13
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 ...
1
vote
0answers
88 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 ...
0
votes
0answers
19 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 ...
4
votes
6answers
4k 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 ...
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 ...
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 ...
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 ...
1
vote
1answer
358 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 ...
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
1answer
188 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
2k 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
213 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 ...
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 ...
3
votes
1answer
438 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
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.
2
votes
3answers
2k 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 ...
2
votes
2answers
357 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
176 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 ...
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.
5
votes
1answer
387 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 ...
1
vote
3answers
496 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
274 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 ...
0
votes
2answers
405 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# ...
6
votes
2answers
1k views

How can I kill a process using top on OS X?

On other Unixe,s I can use top and then hit K and type the process ID. How can I do that in OS X? I can type kill [the_pid] on its own at the command line and that works. However, I was wondering if ...
2
votes
0answers
473 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.
0
votes
1answer
157 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
451 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 ...
3
votes
1answer
149 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
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
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 ...
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 ...
5
votes
1answer
846 views

Completely clear all output from a Terminal window

I would like to clear all output from a Terminal window (including all historical output) to get it back to a clean state as if you had just opened a new Terminal window, or a new Terminal tab. I can ...
2
votes
2answers
2k views

Is there a free command line program for converting PDF files to SVG?

Once upon a time I used Corel Draw to edit vector graphics. Now I'm looking at using Sketch. I previously converted all my old CDR files to PDF but Sketch doesn't seem to like to open PDFs containing ...
8
votes
4answers
6k views

How do I take a steathy picture with my iSight camera from the command line?

Is there a command line utility that allows me to take a picture from the built in camera? Something like screencapture allows for, well, screen captures. The reasoning for a command line tool is I ...
0
votes
0answers
247 views

curl installed but ec2 api could not find

I am trying to get the ec2 command-line api work on my OS X 10.7.4 without much success. The commands are complaining about curl but it looks like curl is installed and is available. See below: ...
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 ...
1
vote
2answers
102 views

How can I do the equivalent of a Unix find / -print [under user permissions] under Mountain Lion?

I am doing, or trying to do, a 'find /' which I would like to recursively list every file the user has permission to access under the volume "Macintosh HD" and nothing else. I am presently filtering ...
2
votes
1answer
91 views

cpio's file on disk is not older; skipping — how to suppress this warning?

I create shadow copies of a directory containing 50K+ images (I don't remove them from the card until they're in three other places). Every time I add images to the master, I update the shadow copies ...
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 ...
2
votes
3answers
476 views

Editing iPhoto-specific metadata

Perpetua:2011-01-16 ashley$ mdls IMAG0107.jpg ... kMDItemComment = "Cat with is tongue out." So, here's my question. xattr can be used to modify some ...
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 ...
1
vote
2answers
313 views

Terminal in full screen mode: how do I recover from “cat /dev/random”

What are the ways I can regain control over my computer when I have terminal in full screen mode and type: cat /dev/random
0
votes
1answer
351 views

Add Chrome to dock with parameters via Automator with chrome icon

I need to have started Chrome without the build in Flash via console you add the Parameters --disable-internal-flash which works fine, now i would like to have a Dock Icon which passes this ...
5
votes
1answer
2k views

Why is a command line change to ~/Library/Preferences/com.apple.LaunchServices.plist not effective immediately?

When the Info window of Finder is used to associate files of a particular type with an application: the preference is effective immediately. When Terminal is used to make a comparable addition ...