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
1answer
2k views

how to remove quarantine from file permissions in os x

I downloaded a .pem file and my Mac OS X (10.8.2) added an @ sign at the end of the file permissions. This is causing file permission issues. I can't seem to remove the quarantine flag. I even tried ...
3
votes
3answers
3k 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? ...
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 ...
3
votes
1answer
2k views

How do I start a virtual machine in background upon OSX system start?

I have a virtualbox machine on a OSX 10.9.2 host. I do not want to open VirtualBox everytime and start the machine there. Also, I do not need the the screen output as I will just ssh from OSX terminal ...
3
votes
3answers
494 views

Rename multiple files, sub directories, and insert characters at specific location on OSX

I have files and directories starting with "cateory-icon-" in many sub directories. I am trying to rename them recursively to "category-icons-". Please note that I added missing "g" to the category ...
3
votes
1answer
484 views

How to set the path OSX applications use

I'm running Mountain Lion 10.8.4, and have my environment all customized through ~/.profile so that when I run GUI apps like Sublime Text or Eclipse from the command line open /Applications/Sublime\ ...
3
votes
3answers
3k views

Can (CUPS) ppd files for Mac OS X be used for linux?

I am looking at buying a printer (actually an all-in-one I prefer for the features it provides, but I want to focus on the printer part here) which does not provide linux drivers, but does provide Mac ...
3
votes
1answer
1k views

Mac OS X partition type problem

As a 2 decades of MS-Windows user I have switched to Mac OS X a month ago. And my knowledge is not enough to fix my big problem which I encountered yesterday and my brand new MBPro is dead now. I ...
3
votes
2answers
1k 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.
3
votes
2answers
2k views

Why isn't my environment variable visible from the command line?

I'm trying to run the James SMTP server on Lion (Mac OS X 10.7.2). When I do this: sudo JAVA_HOME=/Library/Java/Home ./james-2.3.2/bin/run.sh it works fine. However, I'd like to make JAVA_HOME an ...
3
votes
2answers
225 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 ...
3
votes
2answers
64 views

How can I list the info for an array of /dev/disks using bash expansion or substitution?

I want the output of: diskutil list; diskutil info [multiple devices] Without having to do: diskutil info disk0; diskutil info disk0s1; diskutil info disk1 ...etc For example, with many builtin ...
3
votes
1answer
55 views

Apropos always returns several duplicate matches from whatis

When I run apropos or man -k in bash, it always returns the same item (at least one) twice: Question Why is it doing this; and would it indicate that there's a possible configuration issue with my ...
3
votes
1answer
152 views

How to change the default editor for a file type in Mac OSx?

The default editor for java files on my Mac seems to have been set to Xcode, but I want to change it to be the basic TextEditor. I've looked in preferences for the association, but it's not there. ...
3
votes
1answer
71 views

stat on an encrypted volume in osx takes a long time

My workstation is a MacBook Pro with an SSD. For security reasons, my main volume is encrypted. I ran this command on a folder: time find . -exec stat {} + >/dev/null real 0m5.205s user ...
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 ...
3
votes
1answer
521 views

Verbose DNS query to see DNS query order?

I typically determine the IP of a host by doing: $ host -t A example.com. Is there a more verbose version of this that tells me whats happening in the background, specifically the order of what is ...
3
votes
2answers
964 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. ...
3
votes
1answer
1k views

Reading FreeBSD UFS formatted external drive in Mac OS X

I have an external USB drive with backup files formatted in FreeBSD's UFS file system. When I plug it into a computer running Mac OS X 10.9.4, I cannot read the drive's contents, and I don't have ...
3
votes
1answer
49 views

**/ not working with a mounted volume

I'm trying to recursively extract a set of .jpgs from a mounted volume using SMB1, to a folder on my computer. Here's what I've got: cp -a **/97*.jpg /Users/.../All_Covers This works as long as my ...
3
votes
1answer
5k views

Customize Top Panel / Global Menu / Super-Wingpanel in Elementary OS Luna

How on ElementaryOS change Wingpanel on Top Panel / Global Menu / Super-Wingpanel like OS X ?
3
votes
2answers
405 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
3answers
6k views

Unix mail command not sending email

I'm having trouble trying to send email with the unix mail command. Currently I'm trying this: echo "something" | mail -s "test mail" email@address.com But when I check my email, I haven't received ...
3
votes
1answer
418 views

Tmux status bar question

I'm fairly new to tmux and to truly master and learn it, I decided to make myself a fresh .tmux.conf I was wondering, though, if it's possible to hide a path in the status bar. For example, I have ...
3
votes
2answers
692 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 ...
3
votes
1answer
2k views

Move position of an application window from the command line on OSX

An application — iA Writer — somehow got stuck off screen with only the corner showing. I can't grab it or use other means to move it from that position. All new windows open in that position, ...
3
votes
1answer
68 views

Is there a way to integrate the unix “man pages” into OSX's Dictionary app?

I was thinking it would be cool to be able to look things up in the man pages the same way one looks up words with the "Dictionary" app. Is there a way to add the man pages that OSX supplies into ...
3
votes
3answers
2k views

In Mac OS X Snow Leopard, how can one file's permissions be matched to another?

I need to make the permissions of a file exactly match the permissions of another file in OS X 10.6. I don't see 'getfacl' or 'setfacl' as suggested in some other posts for Linux. And, it doesn't ...
3
votes
1answer
593 views

Routing Tables: What is the effect of the RTF_IFSCOPE flag?

(Related to this question I posted a while ago on apple.stackexchange.) What is the difference between the following two routing table entries: default E.F.G.H UGSc 0 ...
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 ...
3
votes
1answer
111 views

Differences between dd in Mac OS X and Linux

When using Linux (Debian), I often use dd to copy a disk image to an SD card. I have written a script that throws an error if the device file specified in the "of" option is too large. This keeps me ...
3
votes
1answer
101 views

Is this a so-called “Hybrid” Mac Partition table, and how can I mount this in Linux?

I would like to better understand what is on this hard disk, and how I can mount it into Linux (specifically Debian GNU/Linux, Stable): It was created on a Powerbook g4 "alu book" with the default ...
3
votes
1answer
137 views

Spawn a new terminal window from the terminal

Is there any terminal command I can execute that will pop open a new terminal window? I need something that will work in OSX' Terminal.app, but it would be nice if there were a way to do this that ...
3
votes
1answer
428 views

Why a sleep 300 (5 minutes) can last several hours some time? [closed]

I have a MiniMac with the OSX system. My script is: while true do echo "Sleep 300 seconds = 5 minutes" date sleep 300 echo "end of sleep" date done I want it to repeat every 5 minutes; ...
3
votes
2answers
374 views

See extended attributes with coreutils ls on Mac

I have coreutils installed via MacPorts on my Mac running OS X 10.8.4. I have ls set to use the coreutils version of ls [(GNU coreutils) 8.21] when available: if [ -e /opt/local/libexec/gnubin ]; ...
3
votes
1answer
925 views

sudo: unable to initialize PAM: No such file or directory

While trying to build the NumPy Python math module with Intel's Math Kernel Library (MKL) on OSX 10.8.3, I was running into some problems with the Accelerate and vecLib frameworks overriding the MKL. ...
3
votes
1answer
1k 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 ...
3
votes
1answer
163 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 ...
3
votes
3answers
1k 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 ...
3
votes
1answer
2k views

How do I make all current and future files in a directory readable by a certain group/user?

I have a "Drop Box" directory for students to submit assignments. Its permissions are set to "drwx-wx---" where all of the students belong to the group. This lets them write to but not read from the ...
3
votes
1answer
900 views

Running vim on a remote Linux machine “freezes” OS X SSH connection

(cross-posted this from SuperUser as the question seems more relevant to this audience) I am attempting to SSH to a Linux (Fedora 14) machine and then open up vim to edit a file, however on my new ...
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 ...
3
votes
1answer
63 views

Changing the spacing between files in ls

This is more of a cosmetic question but this is really bugging me. On OS X, when I run ls -G (or use CLICOLOR=1) instead of regular ls it changes the spacing of the columns, as you can see in this ...
3
votes
0answers
64 views

OS X-like deadkeys behavior on Linux

I'm on Debian (actually Crunchbang), and my notebook has a default US layout keyboard. My native language is Brazilian Portuguese (pt-BR), so I've changed my layout with setxkbmap -layout us -variant ...
3
votes
1answer
211 views

IPFW Port Forwarding

This is my situation: I want to connect to an OpenVPN server from my office (we're using a proxy, only ports 80 and 443 are allowed). Server IP address is: 176.31.250.232:843 My static IP address ...
3
votes
3answers
214 views

Change routes for VPN

I need to use for some things a cisco VPN connection, but I don't want to route all my trafic over the VPN but only that traffic, that is send to a specific network. How does a script look like, that ...
3
votes
0answers
152 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 ...
3
votes
1answer
2k views

Sound volume control does not work in Ubuntu

My sound volume control does not work when I'm logged in with my regular user, though the sound works correctly. What's weirder is that the sound control works when I'm logged in as guest. With my ...
3
votes
1answer
195 views

Restricting access to files on an external drive

I was wondering how to restrict access to a specific drive in Unix on the Mac. I was thinking to do this in Terminal where I create a file like this mkfile 6k secure_access. And where secure_access ...
3
votes
0answers
571 views

WPA pre-shared key format in linux and macintosh

I'm temporarily in a situation where the wifi network I need to use is implemented using Macintosh equipment. They have encoded their network using WPA and TKIP. I can't seem to get onto their network ...