Questions about the command line and other Unix-like aspects of Mac OS X, including the Mach/BSD-based kernel and FreeBSD-based userland. You may want to consider using Ask Different instead.

learn more… | top users | synonyms (1)

3
votes
2answers
496 views

Total in `ls -l`

When I run ls -l, the following is displayed: >: ls -l total 320 -rw-r--r-- 1 foo staff 633 5 Apr 13:23 A.class -rw-r--r-- 1 foo staff 296 5 Apr 13:24 A.java ... What does the ...
5
votes
1answer
352 views

How to create yaboot partition using a ppc Mac

My computer g4 1.5 ghz PowerBook ppc I need to use this computer to make a yaboot partition on a USB stick. Here is documentation for making a yaboot partition with a Linux machine: ...
2
votes
2answers
2k views

How can I enable internet sharing without using the gui or apple script on snow leopard?

for some rather strange reason my sharing preferences tab crashes (it's a long story and there seems to be no good solution for it, it's looking for a ui object that no longer exists). Anyway, I want ...
5
votes
3answers
5k views

How to cd to a Windows file share?

At work, I spend a lot of time manipulating files on a networked computer that's running SME Server (but that's set up for Windows filesharing, if that somehow makes a difference). I have been ...
7
votes
2answers
230 views

Hibernate and security considerations

How do Linux and OSX handle sensitive memory pages (e.g. cryptographic keys) when running OS is suspended to disk? If the memory image written is encrypted, how are its keys handled?
2
votes
2answers
265 views

Different sleep binaries on Mac (Darwin) and in Linux. How to properly handle the differences?

In my Linux box, sleep accepts seconds, minutes and hours. So: sleep 10m Sleeps for 10 minutes (or 600s). sleep on Mac only accepts seconds as argument. sleep 10m doesn't work, only sleep 600s. ...
7
votes
4answers
3k views

Is there something like wine to run OSX apps on linux?

This question answers why Linux can't run OSX apps, but is there some application similar to Wine that allows one to do so?
0
votes
3answers
4k views

Why $JAVA_HOME does not persist on a mac?

On my mac os 10.6.6 I'm trying to persist env variable $JAVA_HOME but it doesn't stick! $ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home Once I restart it won't ...
1
vote
1answer
934 views

removing startup item from com.apple.launchd

Im not sure if this is the right place for this kind of question, but here it goes anyways... I installed a program a few months ago, it had a startup option that I did install. Later, I decided to ...
0
votes
2answers
816 views

Why curl -O -C on mac fails to download

The following script works on Ubuntu, but not on Mac. Why? How to edit it so that it would work there too? #!/bin/sh v=1.1 test_file="Test10.java" jar_file="dp4j-$v-jar-with-dependencies.jar" curl ...
3
votes
2answers
2k views

Dual-boot OS X and Fedora

I'm trying to install Fedora (dual-boot) on a brand-new MacBook Pro. The live/installer CD runs flawlessly on the machine, which was a nice surprise. But after the install is completed, I cannot ...
4
votes
1answer
190 views

terminal - having “$” instead of MyComputer:~ me$

Right now in my MacOS X terminal I have MyComputer:~ me$ before all the commands. In some videos I saw they have just $ - that's much less clutter, how is it done?
4
votes
1answer
148 views

I can't ssh on localhost at a certain port on os x

Here are basics information: $ which ssh /opt/local/bin/ssh It's like that because I'm using MacPorts and it did install there. I did the sudo port load openssh When doing a netstat -an | grep ...
2
votes
1answer
2k views

Multiple “-bash command not found” messages in Mac OS X Snow Leopard Unix

When I open terminal I get an automatic error message -bash: PATH command not found. then I am stumped in getting multiple -bash "x" command not found. messages, even to simple commands such as ls cd ...
0
votes
2answers
303 views

FreeBSD's kernel is 'locked'?

I happened to talk to a Mac Genius on the subject of viruses. He mentioned that the FreeBSD kernel on which the Mac OS is based is 'locked' and therefore no viruses can ever harm my Mac. I didn't ...
4
votes
1answer
2k views

Sharing Mac Snow Leopard directory via NFS

I am running a Mac Pro using Snow Leopard (not server). I would like to share a directory with a linux machine. I have edited /etc/exports on the Mac to: /Volumes/mstore/home/sdavis -maproot=root ...
4
votes
1answer
243 views

Diacritics do not work in GTK+ applications running on Mac OS X Snow Leopard

I am using some GTK+ applications in Mac OS X Snow Leopard. My MacBook is configured for using the Brazilian layout, which allows it to enter diacritics as dead keys (so I can write á typing ' and ...
2
votes
2answers
846 views

Simple terminal emulator that supports cut/paste with other programs?

Coming from Mac OS X, I've enjoyed being able to cut/copy/paste text to and from its built in Terminal application. Now, I am planning to migrate to a tiling window manager like scrotwm, xmonad, ...
4
votes
3answers
249 views

Best way to work through / display a tree of images sorted by size

I've got a deep directory tree containing .PNG files. I'd like to find all the .PNG files in the directory, sort them in order of size from smallest to largest, and then display every 50th image. ...
3
votes
3answers
2k views

Discovering the number of running and blocked processes in Mac OS X

In Linux, I could discover the number of running and blocked processes running grep "procs_running" /proc/stat and grep "procs_blocked" /proc/stat Is there a way to do it in Mac OS X? ...
18
votes
3answers
13k views

Open a RPM on a Mac?

I am on a MacBook Pro running Apple Leopard (Mac OS X 10.5.8). I would like to unpackage a RPM and view the files contained within the wget-1.11.4-2.el5_4.1.src.rpm . I don't need to install the ...
17
votes
6answers
9k views

Why Mac applications never get “closed”?

I'm a Linux/Windows/Mac user. I like all systems, *nixes more than Windows, but I like all nonethless. I started using a Mac this year, and a difference between Linux and Windows that I can't ...
3
votes
2answers
900 views

Motd doesn't show up

I'd like to set a custom motd ("message of the day") on my machine (currently Mac OS X 10.6.5 using Bash with Terminal.app). In /etc/ there was no motd file so I created one with some sample text. ...
6
votes
1answer
3k views

Calculate the date from 1125 days ago on non-GNU systems?

On the Unix Bash commandline, I want to calculate the date from 1125 days ago using the base operating system (e.g. No Perl or Python). On systems running GNU Date, I can do something like this: ...
3
votes
2answers
2k views

In OSX ssh-keygen creates a key but then the session won't connect

I made a key, but it logs me back out as i try to setup passphraseless logins to localhost: $ rsa-keygen -t rsa $ cat id_rsa.pub > authorized_keys $ ssh localhost The authenticity of host ...
20
votes
4answers
6k views

What makes OSX programs not runnable on Linux?

I know there are many differences between OSX and Linux, but what makes them so totally different, that makes them fundamentally incompatible?
3
votes
1answer
1k views

ZSH to auto-complete directories in command-line arguments?

Transferred from regular StackOverflow... I'm a new ZSH convert on OSX (git status in the prompt was my main driver to make the leap). Everything seems to be working swimmingly but I'm missing ...
5
votes
2answers
1k views

How similar is Apple's terminal.app to a bash terminal on Linux?

I know that Apple's Terminal.app provides a bash shell. Are there any differences between this and a bash on Linux?
5
votes
1answer
582 views

How do I share applications windows between OS X and Linux?

I originally asked this question over on Super User, but I didn't get any answers. I'm trying to set up Xdmx on my Macbook Pro and my Ubuntu 10.04 workstation so that I can share my MBP's keyboard ...
8
votes
2answers
474 views

Prevent disk renumbering on reboot in OSX

I have 3 physical drives in my Mac Pro with OSX 10.6.4. Occasionally after rebooting the machine, the disk numbering changes such that the /dev/disk# does not reference the same drive as it did before ...
1
vote
1answer
109 views

XForwarding Applications from OSX

Using XForwarding, you can access GUI applications over ssh between two Xorg-powered machines (and sometimes even from a windows machine). Is there a way to access OSX applications (like Finder) from ...
12
votes
4answers
2k views

OS X: how to keep the computer from sleeping during a ssh session

When I ssh into a OS X computer on my network the session lasts until the OS X goes into sleep mode. Is there a way to prevent this from happening during my SSH session, apart from physically bumping ...
4
votes
1answer
5k views

+ or @ mark after running 'ls -al'

In Mac OS X, run 'ls -al' gives me something like this. drwxrwxrwx+ 4 smcho staff 136 May 5 09:18 Public drwxr-xr-x+ 6 smcho staff 204 Feb 1 2010 Sites drwxrwxrwx 9 smcho staff ...
27
votes
5answers
6k views

Is Mac OS X UNIX?

I have this argument recently saying Mac OS X was not UNIX, but Unix-like. I know there is a Single Unix Specification and those spec complaint could use the UNIX trade mark. Is Mac OS X an UNIX ...
1
vote
3answers
501 views

Help with a find command

I have a bunch of directories. Inside these directories is a cover letter and a zip archive of work. I wanted to run a quick and easy query to open up all the cover letters so I can decide if it's ...
33
votes
6answers
7k views

Software developer switching from Linux to OS X, what are the gotchas?

I have used Ubuntu/Fedora/Red Hat/Suse but haven't used OS X at all. If I have to start using OS X regularly, what are the things I should look out for? Tools I use are GNU tool chain, C++/Boost, ...
0
votes
3answers
2k views

How can I (and should I) use my Linux file server as a Time Machine backup server for my Macs?

I have two Macs that I'd like to start backing up using Time Machine, but all of my storage is attached to my Linux file server. How can I use my Linux file server (which happens to be running Ubuntu ...
22
votes
3answers
7k views

Where does Mac OS X come from?

Discussing with Mac owners, I got several versions of where Mac OS X comes from. It is known to have some root in BSD, but how much, and where? Some say that Mac OS X has a FreeBSD kernel, with all ...
15
votes
5answers
6k views

How can I tell what version of OS X I'm on from the command line?

I frequently find myself SSHing into various OS X machines, and it'd be useful if I could tell what version of OS X I was on when I'm doing that. uname -a doesn't quite work, since Darwin kernel ...
3
votes
2answers
528 views

Accessing a remote OSX system from OSX, Linux, Windows

Is it possible to connect to a remote OSX machine using OSX, Linux or Windows in a way similar to Windows' remote desktop?
18
votes
5answers
2k views

What is the architecture of Mac OS X's windowing system?

I am familiar with how the X11 system works, where clients connect via a socket to the server process and send operations to the window server to perform certain operations on their behalf. But I do ...
5
votes
3answers
527 views

Any tips for surviving Terminal.app?

I've recently switched to using a Mac full-time, and am having trouble getting used to Terminal.app after years of loving gnome-terminal. I miss having URLs show up underlined, using alt+arrow to ...
9
votes
5answers
2k views

Using text from previous commands' output

I know this is not how terminals work, but I find myself often wishing there was an easy way of using text (copying it, modifying it, etc) that is already on my terminal window history from some ...
14
votes
8answers
8k views

pgrep and pkill alternatives on mac os x?

Are there alternatives to pgrep and pkill commands on Mac OS X or should I just create aliases for them using other commands available for me?
5
votes
1answer
469 views

Explain to a Linux user how do BSD/OSX drivers work

Linux drivers come in a form of kernel modules (*.ko files), which can be given parameters when loaded into the kernel and usually live in /lib/modules/<kernel version>. What's the similar ...
10
votes
9answers
2k views

What features does Darwin have that other Unixes don't, or vice versa?

Does Darwin have any features that are specific to it? Do other Unixe(s) have features that Darwin lacks?
20
votes
6answers
11k views

How do you create a user with no password?

In os X it's possible to have users without passwords. If you inspect them with dscl their password show up as *. This is used for system users such as users for databases like mysql, pgsql etc. ...
26
votes
6answers
5k views

what does the @ mean in ls -l?

I am using Mac OSX. When I type ls -l I see something like drwxr-xr-x@ 12 xonic staff 408 22 Jun 19:00 . drwxr-xr-x 9 xonic staff 306 22 Jun 19:42 .. -rwxrwxrwx@ 1 xonic staff 6148 25 ...