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)

22
votes
6answers
4k 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 ...
22
votes
4answers
4k 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 ...
14
votes
8answers
7k 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?
3
votes
2answers
1k views

How to repair a corrupted HFS+ partition from a damaged hard-disk?

I have a friend's Mac OS X disk that comes with an HFS+ partition. I am supposed to recover the personal data from this disk, and I'm not yet sure if the filesystem is corrupted or the disk is dying). ...
38
votes
8answers
17k views

dd: How do I know if it's still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
9
votes
4answers
4k views

If I connect a physical device, how can I ever know which device file belongs to it?

Say I plug in several USB drives which don't get automatically mounted. How can I find out which device file belongs to which physical device, so I can mount it for example? I'm running Mac OS X but ...
16
votes
4answers
769 views

Finding command execution time in hindsight

I've just executed a long-running process from the bash prompt. In hindsight, I wish I'd run time on it, or noted down the time at which I kicked it off. Is there any way of getting this information ...
7
votes
1answer
907 views

Bash history with timestamps

I would like to keep timestamps on the commands logged in my Bash $HISTFILE, is it possible? I did not manage to set it up using man bash as an information source. My other options are as follows: ...
2
votes
2answers
428 views

Key mappings in Linux

What do people mean when they point out that the "keys are not properly mapped" in a Linux installation when working on the command line? Isn't the default installation OK? What extra/specific ...
22
votes
2answers
5k 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 ...
13
votes
6answers
1k views

Is there a root password on OS X and Ubuntu?

When you setup a new Ubuntu or OS X installation a user is generally created for you. On OS X it is whatever username you pick. On Ubuntu (the server version) usually the ubuntu user is created. The ...
5
votes
2answers
519 views

What should I be aware of when installing Linux on a Mac?

I have a Macbook Pro and I am loving it, though I still miss my Linux box, there are many things I need which are not completely compatible with Mac OS X. I heard many stories about installing Linux ...
8
votes
3answers
1k views

Directory size calculation difference

I need to get the size of directory in terminal for signing purposes. I'm using following command: du -s /path/to/dir I'm multiplying the result by traditional UNIX block size (512 bytes) and get ...
2
votes
1answer
243 views

Best options for mounting Mac OS X hard drive on my Linux box?

I have a new 3 terabyte external USB hard drive (Seagate ST3000DM001 in an enclosure). I hope to use it on both my iMac (OS X 10.6.8) and my Linux machines (Kubuntu). Right now this drive will ...
4
votes
1answer
259 views

Mac OS X Darwin: how to reset admin password?

Today I bought an ibook G4 from a garage sale. The people who sold it to me didn't know the password for the 2 accounts on it. Apparently it was the guys late father's laptop. Any suggestions on how ...
0
votes
3answers
1k 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 ...
14
votes
3answers
2k views

File system compatible with all OSes?

I use Linux and Mac OS X on a regular basis, and sometimes I have to use Windows. I need to use a flash drive on all three, and I need a filesystem that will work well on all of them. None of the ...
19
votes
4answers
5k 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?
9
votes
5answers
1k 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 ...
1
vote
4answers
5k views

How can I page up or down in tmux with Terminal.app?

I have tmux installed. But I can not scroll up or down. I.e. as soon as I tmux I get only a portion of the screen and can not scroll up. crtl-b + Page Up does not work since I am in Mac and I can not ...
8
votes
1answer
2k views

Differences between sed on Mac OSX and other “standard” sed?

I am having some issues in using an answer provided on this site for this question about a sed command to replace a blank line with two other lines of content, and it was brought up if the sed command ...
10
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 ...
7
votes
4answers
2k views

pv for directory copy

I need to copy a very large directory (talking in terabytes here) and want to monitor the progress. I found that pv is a nice utility, but how can I use it for copying directories recursively? (pv ...
5
votes
5answers
3k views

How to copy all html files from a directory tree to a single directory?

I want to copy all the .html files in myDir and its subdirectories to ~/otherDir. Here's what I tried (it doesn't work): $ find myDir -name *.html -print | xargs -0 cp ~/otherDir usage: cp [-R [-H | ...
11
votes
5answers
1k views

Disable Keyboard & Mouse Temporarily

I would like to know how one can disable the keyboard & mouse temporarily in OS X.
4
votes
5answers
716 views

If Mac OS X is UNIX, why is it that it is not open sourced and the license is proprietary?

If Mac OS X is a Unix, as answered in this question, why is it that it is not open sourced and the license is proprietary, as stated in this Wikipedia article? According the the genealogy from this ...
9
votes
1answer
4k views

Why the value of VSIZE in top is different from the value of VSZ (Virtual set size) in ps?

I know VSZ in ps is for the total address space allocated for the app and is sometimes aliased as vsize (mentioned in man page of ps on linux), but what's the definition of VSIZE in top? This top ...
6
votes
3answers
1k views

How can I print good looking code

Similar to using markdown on Stack Overflow to create monospace output, how can I do that for my programs. I tried lp filename.txt and was pleasantly please to find that it was able to use the local ...
3
votes
2answers
236 views

Ruby update not working using two methods

I tried to install ruby version 1.9.3 with this on my mac 10.6.8: $ \curl -L https://get.rvm.io | bash -s stable --ruby Oskar-Niburskis-MacBook-Pro:~ oskarniburski$ rvm install ruby-1.9.3-p362 ...
3
votes
2answers
194 views

How to bind “ß” to Meta-s?

I am using Carbon-Emacs on MacOS X 10.6 with the US-International keyboard layout. Usually, I can use Alt+s to print the letter "ß". However, Emacs interprets this as Meta+s and complains that there ...
2
votes
1answer
36 views

/etc/paths in OS X and other Unices

Is /etc/paths read by every shell that I run in OS X? For example, if I use zsh, will it parse /etc/path to populate $PATH? What exactly is the sequence that OS X follows to populate $PATH? Does it ...
2
votes
1answer
315 views

How can I create a shortcut to resize panes in a tmux window?

I am having lots of issues with tmux in mac. Another problem I have is that I can not bind a key in my tmux.conf to be able to resize my panes. What I need is the CTRL-b: resize-pane -U 10 I currently ...
2
votes
1answer
156 views

Stop tab completion suggesting 'messagebus'

I've got a directory called build, which I cd into quite a bit. If there isn't any directory bu* in the current directory, zsh tab completion: cd buTAB suggests messagebus/, which isn't in .. If I ...
2
votes
3answers
905 views

Issues with .bash_profile and terminal commands

I added some data to my .bash_profile to run two aliases ruby version 19 and the proper gems. As soon as I added the data I could not longer run any commands such as the MacPorts command port nor the ...
2
votes
0answers
329 views

Dual boot Fedora 16 with OS X refit

Having trouble with installing Fedora 16 on my Macbook Pro. While the installation itself completes without and issues, the bootloader doesn't install correctly. I have rEFIt, which I already have ...
1
vote
2answers
278 views

Automatically disable Linux extensions for Samba mounts

Samba enables Linux Extensions by default, which can be checked via /proc/fs/cifs/LinuxExtensionsEnabled On Mac OS X (10.8.5 or older) as well as older CIFS shares, mount.cifs will fail with a ...
1
vote
1answer
533 views

How do I create a local copy of a complete website section from OSX using curl?

I'm trying to download Mathematics of the Discrete Fourier Transform so that I can read through it off-line on my iPad (which doesn't have an Internet connection) I have used wget in Linux. It seems ...
0
votes
1answer
56 views

where is the user content on a Mac OS X disk?

I have a friend's Mac OS X disk that comes with an HFS+ partition. I am supposed to recover the personal data from this disk (it's not yet clear if the FS is corrupted or the disk dying), but for the ...