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)

1
vote
1answer
279 views

Compile IMAP with certain PHP API version for MAMP

I've installed MAMP on Mac OS X (where PHP 5.3.15 with API version 20090626 is installed), but IMAP there is without SSL support. As long as MAMP using PHP v5.4.4 (API version 20100525) I've ...
1
vote
1answer
176 views

Rename directory based on date of file in directory

I am looking for a smart way to bulk rename directories in my photo library based on the date the pictures were taken. My specific use case: Export the image library from iPhoto or Aperture on OS X ...
2
votes
1answer
939 views

Can't delete symbolic links, permission denied

I try to delete all symbolic links pointing to Python3.2 with sudo ls -l . | grep '../Library/Frameworks/Python.framework/Versions/3.2' | awk '{print $9}' | xargs rm This just gives rm: 2to3: ...
0
votes
1answer
606 views

Recover files on unmounted partition

I have 2 partitions on my macbook, but I can't mount one of them. When I run the disk utility, the console (show details area) returns the message: Updating boot support partitions for the volume as ...
2
votes
2answers
2k views

Fetch values from plist file on Linux

I have bash script which was written for OS X and now ported to Linux. I don't have access to the Linux box. The bash script would read values from plist files using the defaults read and PlistBuddy ...
2
votes
0answers
241 views

Boot linux bootloader from Mac OSX

Recently I was running Fedora 17 on my computer which was an HP windows based machine. Unfortunately my computer has a malfunctioning motherboard and will no longer turn on. I removed the hard drive ...
7
votes
4answers
5k views

sed on OSX insert at a certain line

So I've been using 'sed' on linux for a while, but have had a bit of difficulty trying to use it on OSX since 'POSIX sed' and 'GNU sed' have so many little differences. Currently I'm struggling with ...
1
vote
2answers
668 views

ps aux |grep 'asdf' grep: asdf: No such file or directory

For some reason a while back, the behavior of my command line changed, and I don't know why. Using OSX, now Mountain Lion(although this behavior was present before the switch). Using standard ...
3
votes
0answers
163 views

Can I get WCHAN from ps on Mac OS X 10.7.4?

From the manual it seems that ps -AO wchan should tell me what everything is sleeping on, but everything comes up as -. (And nwchan as 0). Did they do away with the old sleep()/tsleep() interface in ...
2
votes
1answer
200 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 ...
0
votes
1answer
3k views

Unique lines based on the first field

How can you find unique lines or duplicate lines in a file based on the content of the first field, or the first n characters ? The uniq command on OS X lacks the -w switch that is available under ...
8
votes
1answer
2k 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
1answer
1k views

Finding corrupted files

I have a directory that have zillions of files. As soon as I try to copy this directory, I receive a message that a file could not be copied (corrupt ?) and the copy stops. Is there any command I ...
2
votes
2answers
884 views

Quickly check whether many network hosts are up-and-running

Objective: check if a host is up-and-running on the network, with a method that can be efficiently parallelized over many hosts. Emphasis on a QUICK turnaround of the check. Reason to emphasise ...
1
vote
2answers
759 views

My computer won't shut off normally

Every time I try to shut down my iMac it just stays on that loading circle forever. The only way I can get it to shut down is by holding down the power button. I checked the system logs (below) and I ...
5
votes
2answers
8k views

Global bash_profile

I realize there are /etc/profile and /etc/bashrc files for setting global environment variables and maybe I'm just misunderstanding their purposes, but... Is there a global bash_profile file? I'm ...
3
votes
4answers
16k views

How to put Mac OS X wireless adapter in monitor mode

I'm searching for a equivalent of "iwconfig eth0 mode Monitor" in Mac OS. From man iwconfig mode Monitor does the following: "the node is not associated with any cell and passively monitor all ...
3
votes
1answer
1k views

Closing socket connection on running console application

I am testing a chat bot and want to gracefully handle for times when the chat server isn't running so it can come back up when the service is available again. I have the programming handled. My ...
2
votes
2answers
386 views

Am I using bash after this ordeal?

On Mountain Lion, host Coguaro, I login as user coconutpowder using bash: Coguaro:~ coconutpowder$ echo $0 -bash I need to run a command with elevated privileges so I try to su switch to root but ...
3
votes
1answer
2k views

How to get wireless access point information from MacOS terminal

I'm trying to gather information about surrounding access points but can't find the right tools to do that. For Linux there are tools like iwconfig and iwlist, but it looks like they are not ...
1
vote
0answers
74 views

How to prevent ELinks from staying in scrollback buffer?

After quitting elinks, the browser page history is lingering in my scrollback buffer, and therefore not returning to whatever was buffered on screen when I launched elinks. Inside a GNU screen with ...
2
votes
1answer
13k views

access external hard drive to delete folder on terminal Mac

I want to delete a folder of portable hard drive on terminal in Mac. Are there any command line ?
3
votes
1answer
2k views

Connect to Webdav (https) with domain\user

I have a problem trying to connect with our network webdav share on mac osx. I can connect from windows, so it's working. On Mac OSX I have set the routes, and I can connect when using "Transmit" but ...
5
votes
1answer
1k views

Where to install applications

I'm a long-time Windows user in the middle of a multi-year personal migration to Linux-based development. On Windows when I installed an application it got put in the Program Files folder and I'd ...
5
votes
2answers
457 views

Zsh: Automatically modify executed command

I've recently installed grc (generic colorizer) to my system via MacPorts, giving me the ability to get colorized output for plenty of commands which by default don't support it (see screenshot ...
1
vote
2answers
4k views

Why the differences in color between SSH terminal sessions in OSX?

I'm trying to get the colors in an SSH terminal session with a CentOS machine to look the same as it does when I'm SSH'd into my Ubuntu server. If I run echo $TERM in both I get xterm-color as ...
12
votes
2answers
8k views

rsync “skipping non-regular file” when cloning my Aperture library

I am trying to use rsync to maintain a backup copy of my Aperture library. When I run the sync command to see what would happen this is the outcome: rsync --dry-run -r "/Volumes/Data/Aperture ...
10
votes
3answers
5k views

Why can't tr read from /dev/urandom on OSX?

A colleague suggested creating a random key via the following command: tr -dc A-Za-z0-9_\!\@\#\$\%\^\&\*\(\)-+= < /dev/urandom | head -c 32 | xargs It gave me the error: tr: Illegal byte ...
2
votes
0answers
2k views

IPSec VPN Debian Squeeze Server for Mac OS X

I'm trying to get an IPSec VPN set up on my Debian home server, so that I can access my home network and browse without having my internet filtered by my college network, and so that I can perform ...
2
votes
0answers
676 views

Finding/Mounting USB Device in Mac OS X 10.8

I've looked all over and found similar questions and answers and none seem to work for me or match what I see. I should add I'm new to UNIX and the OS X command line but have got a basic overview to ...
3
votes
2answers
2k views

List all chflags file flags?

Is there a way to see a file's flags, such as hidden, schg, etc? I've got an rwxrwxrwx file that I can't edit, and I think a flag might be responsible.
2
votes
0answers
211 views

Does HylaFax server run in OS X?

From their FAQ: HylaFAX is intended to run on any UNIX system that supports a particular set of features: FIFO special files, BSD-style sockets and the TCP/IP communication protocols, BSD-style ...
1
vote
1answer
401 views

Rsync keeps writing

I just recently updated my macbook pro to Mountain Lion. I use rsync to make backups of certain directories on my macbook pro my timecapsule wireless router with build-in harddisk. rsync -avzm ...
0
votes
1answer
423 views

Install of Gentoo: Can't find root device (boot of LiveCD from HardDrive)

I am attempting to install Gentoo on my PowerPC Mac. I have reached the point where I can boot the LiveCD (I have no CD Drive, so it is from my Hard Drive), but after the kernel is loaded, I get a ...
18
votes
4answers
2k 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 ...
5
votes
2answers
812 views

emacs - paste text from clipboard without formatting

I am using Emacs 24 for MacOSX and having some problem with pasting code from clipboard to Emacs. The code that I selected usually already nicely formatted (with tab, ident, ...). However, when I ...
5
votes
3answers
4k views

/etc/shadow on Mac

I've been trying to run this Linux passwd-generator file on my Mac. I modified enough the script to make it to work well with directories under OSX: #!/bin/sh # build-passwd.sh - creates a password ...
2
votes
1answer
579 views

Permissions corrupted?

A few weeks ago, I installed Linux Mint on a USB flash drive. I used it to copy the contents of my HFS+ external hard drive to my Windows drive on my desktop. Then, I formatted the external drive to ...
0
votes
3answers
110 views

Weird behaviour case insensitivity with bash on MacOS

~/testing $ echo Hello > hello.txt ~/testing $ echo Goodbye > goodbye.txt ~/testing $ cat goodbye.txt hello.txt > HELLO.txt ^C ~/testing $ ls -l total 9056 -rw-r--r-- 1 user user 8 ...
1
vote
1answer
727 views

How should I check to see if the remote smb serv is mounted?

I'm pretty new to mount. Basically, I have a remote SMB serv on the local network that I want copy images from a directory on, then repeat every 5 min. I think what I need to do is make a script that ...
1
vote
0answers
92 views

How do I fix my FastCGI Pinax / Django deployment?

I'm running OSX Lion (posted here because this is a Unix-specific question), and am trying to deploy a Pinax project via FCGI. I have the FastCGI daemon running: $ ps wwaux | grep fcgi jonathan ...
1
vote
1answer
214 views

How to prevent fs unmounting?

(Apologies in advance for giving so few details below, but trust me that the set-up and the problem I'm dealing with are truly baroque, and even a superficial description would result in a far ...
8
votes
3answers
3k views

How can I print well formatted 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 ...
1
vote
1answer
1k views

How can I force LXDE to have a transparent background when connecting with X/X11?

Just got my Raspberry Pi in the mail and I've started playing around with it. After getting LXDE up and working working in desktop mode (i.e. monitor and keyboard plugged in) I decided I wanted to ...
0
votes
1answer
160 views

Linux Mint freezes while downloading eclipse

I installed linux mint on parallels on my mac computer. It seemed to work fine and then, while downloading eclipse from Software Manager the entire system froze when it got to 40%. I've tried ...
3
votes
1answer
171 views

On OS X, how do I log in interactively as root starting from my normal user account?

I have been doing this for a while: sudo su - but it uses 'sh' rather than 'bash', which is what I'd like to do. Which command will log me in as root and get me a bash shell even if that's not the ...
2
votes
2answers
353 views

Bash Process Substitution does not work as 'root' on OS X

OS X 10.6.8, if I use Bash Process Substitution as 'root', it just doesn't work. Is it supposed to be so? Why? Note: here's what I mean... "<(list)" mysql -D robottinosino < <(echo ...
2
votes
0answers
453 views

How to fix link error under CMake for class QX11Info on Mac OS X

I'm trying to build kxstitch, which is designed for Linux, on OS X. I've gotten most of the way there by installing MacPorts, XCode, KDE, etc. and making minor changes to the build file, but am ...
1
vote
4answers
2k views

Best rolling release distribution for MacBook Pro

I got a macbook pro 7.1 wich is running OSX, i'm looking for the most compatible distribution to dual boot. Here's my criteria : I don't want to reinstall my system every 6 month, so I'll prefer a ...
1
vote
1answer
499 views

Automatically dim the backlight of a secondary monitor on MAC [closed]

I have a 2010 iMac 27" as well as a 27" Apple Cinema Display. The iMac will auto-dim on inactivity, I'd say around 5 minutes. When the iMac dim's the Cinema Display is still bright. There is no ...