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
46 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
85 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
68 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
447 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
893 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
28 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
44 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
4k 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
315 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
4k 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
367 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
560 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
67 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
1k 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
511 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
73 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
81 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
4answers
2k views

How to use ifconfig to show active interface only

By default ifconfig will show me all available interfaces , but what if I just want to display active ones? Like, en0 only in below. en0: ...
3
votes
1answer
189 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
1answer
644 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
159 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
992 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
1k 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
802 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
0answers
130 views

Can't figure out why ssh_exchange_identification: Connection closed by remote host appear

At home, I have setup a Raspberry Pi with the latest version of Raspbian and with ssh enabled. I also use a Mac Book Pro with OS X 10.9.3. I use ssh pi@192.168.0.22 to do some work on the Raspberry ...
3
votes
0answers
61 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
196 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
0answers
141 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
186 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
538 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 ...
2
votes
1answer
49 views

Running a command without ./

I am trying to understand something that might be very simple for a lot of you but is quite puzzling from me as a daily Windows user. I am following the docker installation on Mac OS X. One of the ...
2
votes
1answer
175 views

Mac OSX vs Linux Unix-ness [closed]

So I know that Linux is considered "Unix-like" while OSX is Unix. Why is this? I feel like Linux is much more "Unix-like" than OSX is. What makes OSX more "Unix" than Linux?
2
votes
2answers
263 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. ...
2
votes
2answers
4k views

How to install tar file (jhead) on Mac or Linux machine

I'm new to Linux and tar balls and was wondering how to properly install them on a Mac or Linux machine. I would prefer to know how to install on a mac but I just need some help understanding them. I ...
2
votes
2answers
65 views

Read umask for a user

Plenty of examples on how to set umask for a user... but how do you read (or uncover) the default umask for a given user (say the logged in user)
2
votes
2answers
1k 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
2answers
307 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
2answers
90 views

Is there a way to get “top” to run exactly once and exit?

I find the output of the shell command top to be a simple and familiar way to get a rough idea of the health of a machine. I'd like to serve top's output (or something very similar to it) from a tiny ...
2
votes
2answers
80 views

“or” in shell glob

I want to ls the files containing the substring "s1r", "s2r", "s3r" or "s19r" in their filenames. I'm almost there! Botched attempts: ls *s[123][9?]r* The above gives me only files including the ...
2
votes
1answer
2k views

How do I parse namespaces from an XML file using XMLLINT and BASH

Below I have an example of an Adobe XML swidtag used to track inventory. I need to parse out relevant information using xmllint in bash and output that to a new text file. For example I would like ...
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
363 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 ...
2
votes
3answers
574 views

Command line friendly virtual machine

I've been using Virtualbox for a while now, but the only way I've learned to interact with it is through the graphical interface. Is there a way for me to send bash commands to the vm through the ...
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 ...
2
votes
2answers
70 views

In OS X Darwin, why can I interfere with text input across user sessions using cat?

OS X Darwin: Disrupting Terminal Sessions Across User Identities How, in Brief: with cat < /dev/ttys_, in Terminal. My Question This OS X 10.9.2 Darwin behaviour seems odd to me, and I would ...