Mac OS X is a series of Unix-based operating systems and graphical user interfaces developed, marketed, and sold by Apple Inc. Named Darwin, it has a Mach kernel and FreeBSD heritage.
0
votes
0answers
65 views
Replacing Ubuntu 12.04 with Backtrack 5 R3 dual boot with Mac OSX Mountain Lion
I installed ubuntu 12.04 to run alongside my osx on my 2011 macbook air and would like to remove ubuntu completely to boot replace it with backtrack. I deleted the partition where ubuntu was located ...
0
votes
1answer
60 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
52 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
29 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 ...
2
votes
1answer
29 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
0answers
50 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
32 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.
1
vote
1answer
72 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
93 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 ...
1
vote
0answers
46 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
35 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------- ...
-1
votes
2answers
67 views
Do BSD sockets give better performance than others eg. POSIX and other? [closed]
I am searching cross-platform techniques to write client-server applications on Mac. I used BSD sockets, Cocoa APIs but I need to know which would be better at performance.
2
votes
2answers
45 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
39 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
63 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 ...
2
votes
1answer
89 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
40 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)
3
votes
3answers
53 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
1answer
141 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 ...
4
votes
2answers
102 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
76 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";
...
1
vote
1answer
38 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
66 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
82 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 ...
2
votes
3answers
157 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
77 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 ...
1
vote
2answers
163 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
142 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
69 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 ...
12
votes
3answers
560 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
354 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
49 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
158 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
142 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
577 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
104 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
88 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 ...
2
votes
1answer
306 views
Weird autocomplete behaviour in ZSH / oh-my-zsh for 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
26 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 ...
1
vote
0answers
75 views
Display 'PRI' and 'NI' via 'top -stats'
I'm trying to create a script that prints top stat for some specific fields (e.g. pid, command, priority, nice value). I can print most of them by using -stats option, but there is no arg for ni and ...
2
votes
1answer
210 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 ...
1
vote
2answers
141 views
Linux guest VM on mac host - Keyboard
I use a Mac as a development box, but am slowly transitioning to Linux. So I am spending the majority of my time in the Linux guest VM while working. But I still spend a fair amount of time in Mac ...
2
votes
1answer
363 views
What happened to ~ when updating oh-my-zsh?
Not sure what changed the meaning of the home path ~ in my zsh.
So when I do cd ~ , I dont cd into my home but it gives me an error that /Users/carlos does not exist.
How can I reset ~ to refer to ...
2
votes
1answer
146 views
Stuck process: is it a bad sign?
Sometimes a few process are in a stuck state. For example:
PID COMMAND %CPU TIME #TH #WQ #POR #MREGS RPRVT RSHRD RSIZE VPRVT VSIZE PGRP PPID STATE
99357 plugin-container ...
1
vote
0answers
129 views
Triple Boot - Mac, Windows, Backtrack
This was the closest stackexchange site I could find to something of this nature.
Currently, I own a Macbook Pro with a Bootcamp Partition (Win7), a Mac Partition (OS X Lion), and the Recovery ...
4
votes
2answers
251 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 ...
1
vote
1answer
78 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
93 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 ...
1
vote
1answer
201 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
206 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 ...