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
44 views

mpg321 doesn't autoplay songs

I'm using mpg321 on OSX and I just try to play my songs with mpg321 *.mp3. It plays fine but doesn't play the next song automatically. I have to press some key for it to play which is kind of ...
1
vote
2answers
103 views

How to troubleshoot failed X11 forwarding with ssh?

When I try to establish an X11-forwarding connection to myserver, I get the following error: % ssh -X myserver xlogo X11 connection rejected because of wrong authentication. X11 connection rejected ...
0
votes
0answers
116 views

Rsync seems to back up files that haven't been opened or changed

I have started using rsync to back some data on my mac to an external HD. It works really well, but I have noticed something odd. Every time I run the command, I get a list of files that haven't been ...
0
votes
1answer
125 views

programming an Atmel Board with a USB to Serial converter, in Eclipse

I am actually trying to program an Atmel Evk1100 board directly from Mac OSX. My MCU is UC3A0512 I used to use Atmel32 Studio on Windows, but It looks like there no Mac Version. So, from what I've ...
3
votes
0answers
391 views

A real non-“better touch tools” solution for select-to-copy on Mac OS X

I recently moved to Mac. I am missing my X11 copy-paste style. I can't find a way to exactly emulate X11 behavior "select-to-copy", "middle-click-to-paste" globally on Mac OS X. I am aware that this ...
4
votes
2answers
704 views

remove duplicate files

On my Mac OS X 10.6.7, iTunes duplicated every single file in my music library. Now I have 3,840 files instead of 1,920. The problem is that iTunes didn't simply duplicate the whole folder, but each ...
2
votes
3answers
2k 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 ...
0
votes
1answer
76 views

Keep the ssh session

I am using Macbook developing a client application. I want to access server logs, so I opened a shell terminal and established a ssh connection to the server and access the log file there by ...
1
vote
1answer
401 views

Transferring Files SSH SCP Error Message: 'Stdin: is not a tty'

I am using a Macbook SSH terminal and generated RSA key pairs and uploaded remote id_rsa.pub with approved permissions. I can connect with remote Apache web server. I can create, open, move, modify ...
-1
votes
1answer
86 views

Why is ./filename required to run executable script? [duplicate]

After creating a Python script file, test.py, in my home directory, and running chmod +x test.py to make it executable, and placing #!usr/bin/env as the file header, I expected to be able to run the ...
0
votes
1answer
151 views

Can't use peewee on Mac OS X Mountain Lion

I am getting an error when I run Python programs that imports peewee: ImportError: No module named peewee The same program works fine under Ubuntu 12.04. I used pip to install peewee, and it ...
2
votes
1answer
154 views

Find out where $PATH got corrupted

I'm using OSX Mountain Lion 10.8.2 $echo $PATH prints this: /usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/opt/X11/bin:/Users/myusername/.rvm/bin I've commented out everything in ~/.bash_profile ...
1
vote
2answers
210 views

A bunch of files have 777 permissions

I have been learning Python and Bash scripting, and I up to now I have given my scripts 777 permissions. Having learned more about how to set permissions, and knowing this is a bad idea, I ran the ...
0
votes
1answer
1k views

Cannot execute binary file on Mac OS X Lion 10.7.5

I want to execute phylocon on a mac OS X lion but after changing the path and making the file executable, I get the error 'cannot execute binary file'. But the steps that I took to running the command ...
1
vote
2answers
434 views

OS X setting environment variables

I have OSX 10.8.2 with ZSH as my shell and iTerm as a terminal (don't know if the last thing is relevant). I have to mention that I'm relatively new to OSX. I'm trying to set up some environment ...
1
vote
1answer
97 views

zsh completion: getting file names from a specific directory

OK, a little background: I use a Mac, and I do as much as possible in the CLI. In particular, I frequently pop in a USB stick, cp or mv a file over, and then immediately wish to eject (unmount and ...
8
votes
1answer
1k views

git diff displays colors incorrectly

In order to get coloured output from all git commands, I set the following: git config --global color.ui true However, this produces an output like this for git diff, git log whereas commands ...
3
votes
1answer
173 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 ...
1
vote
1answer
45 views

How to revert to the original config files in OS X?

How can I revert config files in OS X 10.8.2 to their original state? I want to discard any changes made to /etc/hosts, /etc/sshd_config, etc.
2
votes
1answer
315 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 ...
1
vote
2answers
546 views

Unix: find directory filenames listed in a text file and move to new directory

I'm a command line novice trying to figure out the appropriate command to execute the following within the Terminal in Mac OS X. Assuming I've placed all files in the same directory, I want to ...
2
votes
1answer
212 views

How are default permissions determined (on OS X)?

My (limited) understanding of basic Unix is that any files that are created will be created based on the permissions of the creating user. In particular, the group assigned will be the creating user's ...
1
vote
2answers
55 views

What permissions should I set if I'm the only user?

I'm the only user on a OS X machine and am wondering what the best practice is for setting permissions on my sensitive files. Specifically, are there reasons to prefer one of the following -rw------- ...
2
votes
2answers
58 views

Why does “User Contributed Perl Documentation” show up when I look for 'man' pages

When I man -f <some string> in addition to the expected Unix man pages, I get a bunch of odd looking entries that all have the header "User Contributed Perl Documentation". For example man ...
0
votes
1answer
50 views

Installing Ruby on Mac OS X

I had ruby installed in /usr/local/bin/ but it was outdated, so I installed newer version using brew. Now I have two installations of ruby in different dirs. Should I remove one? And how do I update ...
1
vote
3answers
264 views

Print files with file size less than 100 bytes

Basically this script is just supposed to print out the file size and the name of all files in a directory that are under 100 bytes. This script I wrote works perfectly on my Ubuntu, but wont work on ...
4
votes
1answer
1k views

Does Windows recognize Linux's symbolic links?

I was just wondering how a Windows system handles symbolic links. My best guess is that it will not recognize them, but I'm not entirely sure. Also, what do Macs do when confronted by one?
2
votes
2answers
62 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)
4
votes
5answers
113 views

Tool to compare files on one disk with registry information on another?

Been a long time since I got very far under the hood in Unix so I'm probably not even using proper terminology when I say 'registry,' but here's the situation. I have a disk thats dying. Lots of i/o ...
3
votes
2answers
337 views

Installing gcc without root?

I'm running OSX, and I don't have root, or an existing compiler. Is there any way I can install gcc? Are there official or trusted unofficial mach-o binaries that can be downloaded for a certain ...
5
votes
2answers
365 views

FHS differences between OS X, Linux and FreeBSD

I've read that there is a different behavior between FreeBSD and Linux with the /usr/local, in FBSD ports are installed there, in Linux not, can someone explain more on this? I'd like to know where ...
2
votes
2answers
411 views

Find files given an exact filename with mdfind

Is there a way to ask mdfind to search for filenames with an exact filename ? At some point in a pipe I have this: (filenames are produced here) | while read f; do mdfind -name "$f" | grep -E "/$f"; ...
2
votes
2answers
127 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
2answers
162 views

Make copies of a single directory to multiple directories with different names

I'm trying to replicate a single directory (with sub-directories) to a bunch of new directories based on a list. For example I can: mkdir Fred Barney Thelma Louise Foo Bar How would I copy a premade ...
1
vote
2answers
575 views

What is wrong with this call to sed -i?

I have this line find . -type f \( ! -name '*.plist' \) -and \( ! -name '*.mp4' \) -and \( ! -name '.DS*' \) -print0 | xargs -0 sed -i 's/AAA/BBB/g' my intention is from the current directory ...
5
votes
3answers
983 views

How to make bash put prompt on a new line after cat command?

What I get: host:~ user$ cat example.txt some texthost:~ stas$ What I want to get: host:~ user$ cat example.txt some text host:~ stas$ Is there a way I can make cat behave like this? I'm using ...
2
votes
1answer
1k 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 ...
2
votes
3answers
2k 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 ...
1
vote
1answer
264 views

Block Internet Connection through Terminal on OSX

Even though I don't have administrative privileges, can I block Internet connection on my Mac OS 10.8 machine, through the terminal? I want to do this because I am too lazy to disconnect ethernet ...
2
votes
1answer
116 views

dd is crashing after a few hours of transfer

I am trying to clone a external hardrive ( 1.5T ) to a second one ( 3T ) with dd. I am working on Unix and want to create a disk image. Here is the command I am using : dd if=/dev/disk1 ...
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 ...
1
vote
1answer
1k views

How can I get my Mountain Lion Mac to have Apache serve up content on port 80?

There might be more than one problem here, but I got my Mac back from the shop after the hard drive was failing, and the new hard drive reproduced my home directory but not httpd.conf. Since I have ...
1
vote
0answers
81 views

Readline menu-complete on OS X

I'm trying to test out using the menu-complete on OS X 10.8, and it's just not working. I have it in my .inputrc as such: "\M-s": menu-complete I then tried to do C-x C-r to reload the .inputrc and ...
2
votes
1answer
503 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 ...
1
vote
0answers
274 views

os-prober not detecting Arch install

I'm triple booting osx, win 7 and arch on an apple macbook pro 8,2 I've followed the guide specific for my macbook pro here: Macbook Pro 8,2 Arch Installation As well as the beginners install guide ...
1
vote
1answer
4k views

Booting Ubuntu from usb on a Mac

I have a Macbook pro (late 2009) running OSX 10.6.8. I want to partition a flash drive and install my Ubuntu iso image onto it. Then I want to boot up from it by (restarting my computer and) holding ...
1
vote
2answers
391 views

How to Kill Difficult Task in Mac Terminal

I ran this grep: grep -r "\-\-\-foo\-\-\-" * | grep -vi bar For the past 5 minutes my Mac has been running hot (I can hear the fan) and I can't hit Ctrlz or x or c to kill the current task. Even ...
1
vote
1answer
121 views

How to change the current directory graphically using the keyboard only?

There was a program named NCD (Norton Change Directory) a few years ago that did a good job at helping me change directory back in the DOS days. This programs displayed a tree, and you could navigate ...
3
votes
1answer
989 views

Why is zsh (oh-my-zsh) completing directories that don't exist?

UPDATE 3 I've worked out that these annoying autocomplete options are actually usernames. I.e. they exist in /etc/passwd I have users such as _kadmin_admin and _kadmin_changepw and many others ...
2
votes
0answers
46 views

How do I detect a copy event in Finder?

I am trying to strip formatting from text copied from my Illustrator docs. Someone accurately pointed out to me that running pbpaste | pbcopy via command-line will perform this action on text in the ...