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.
11
votes
6answers
1k views
Is there a root password on OS X and Ubuntu?
When you setup a new Ubuntu or OS X installation a user is generally created for you. On OS X it is whatever username you pick. On Ubuntu (the server version) usually the ubuntu user is created.
The ...
3
votes
1answer
141 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 ...
7
votes
1answer
353 views
Screen cuts off beginning of long command when accessed through bash history
I'm using the default versions of bash and screen in OS X Lion.
When I'm in a screen session and I scroll back through the bash history and I come to a command that is long enough to wrap.
I might ...
0
votes
4answers
333 views
NMAP probing VirtualBox Client
Cannot seem to probe virtual guests from the virtual host.
These guests can be probed from other devices on the same LAN/Network, but not the host. I can understand why it might be struggling, but I ...
2
votes
2answers
754 views
sv_SE.UTF-8 Problems with Bash and VIM in iTerm2
Two specific issues, despite me running iconv -f iso-8859-15 on my old files when converting from sv_SE.iso8859-15 to sv_SE.utf-8 I still get distorted characters. And I believe it's because of Vim ...
7
votes
2answers
306 views
Does OS X have its own line format?
Obviously there are at least two newline types: DOS and Unix. But does OS X have its own plaintext 'format'?
I opened a text file in nano and was surprised to see: [ Read 26793 lines (Converted from ...
4
votes
1answer
433 views
Printing the current date/time with sub-second precision
GNU date(1) understands the %N format spec, which outputs nanoseconds, so:
$ date +%H:%M:%S.%N
outputs 19:10:03.725196000
BSD date doesn't understand %N. How can I print the current time with ...
7
votes
2answers
423 views
How to use the SVN CLI effectively
How can I make myself more productive with the SVN CLI? I need to complete repetitive tasks like these:
find modified files in directory
commit only SOME of them
selecting them somehow other then ...
2
votes
2answers
1k views
Spaces as line breaks from inline for loop command
Someone care to enlighten me as to why the spaces in the first command seem to be interpreted as line breaks? Also occurs substituting print for echo.
$for l in $( find *.txt -exec head -1 {} \; ); ...
1
vote
0answers
97 views
Why does cd // work? [duplicate]
Possible Duplicate:
unix, difference between path starting with '/' and '//'
On my Mac OS X Lion box, with Bash:
$ cd //
$ pwd
//
$ ls
Applications System cores ...
7
votes
2answers
1k views
How can I determine the fs type of my current working directory?
I need a platform-independent and lightweight way of detecting the mount type of my CWD. Specifically, I need to determine if my CWD is in an SSHFS, NFS, CIFS, SMB, or local block store mount.
I need ...
5
votes
1answer
397 views
How can I search/browse in some process's memory?
I'm using MacOS X 10.7 and I'm not very familiar with unix. Is there a command for a search in some process's memory for a string?
4
votes
1answer
226 views
DTrace to trap any chmod applied to certain files
Underneath the Mac OS X directory /audit I have certain files which users can access and chmod to their liking.
I need to audit any chmod done on any files by recording the time, user and file being ...
6
votes
3answers
768 views
Directory size calculation difference
I need to get the size of directory in terminal for signing purposes. I'm using following command:
du -s /path/to/dir
I'm multiplying the result by traditional UNIX block size (512 bytes) and get ...
6
votes
1answer
1k views
Setting vim filetype with modeline not working as expected
As per the accepted answer to this question, I'm attempting to use modelines in vim to force filetype detection in some files.
For example, at the top of a file named gitconfig (note there is no ...
1
vote
1answer
53 views
Have to type out whole path in order to execute an application in OSX [duplicate]
Possible Duplicate:
How to run my own program without specifying its path
One of the applications that I want to use came in a tar.gz, and I unzipped it into my home directory. Well, in ...
4
votes
2answers
368 views
Tell if a folder/file is hidden in Mac OS X
I know you can set or unset the hidden flag of a folder/file by doing chflags hidden foo.txt and chflags nohidden foo.txt.
But is there anyway of telling whether the folder/file is currently hidden ...
2
votes
1answer
55 views
Creating Directories: with Permissions
I need to create a directory that is RW to all users using chown. what arguments should I pass chown to get a file with those permissions? Or maybe there is an even better way to do it......
9
votes
1answer
2k views
Why the value of VSIZE in top is different from the value of VSZ (Virtual set size) in ps?
I know VSZ in ps is for the total address space allocated for the app and is sometimes aliased as vsize (mentioned in man page of ps on linux), but what's the definition of VSIZE in top? This top ...
3
votes
2answers
169 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 ...
11
votes
5answers
964 views
Disable Keyboard & Mouse Temporarily
I would like to know how one can disable the keyboard & mouse temporarily in OS X.
1
vote
1answer
294 views
How to resume multiple instances of Screen from command line with minimal steps?
I have about 15 instances of screen running on my linux server. They are each running processes I need to monitor. I had to close terminal (hence the reason I launched screen).
Is there a way to ...
3
votes
1answer
298 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
385 views
How to change default “reading” program?
right now when I run man smth or similar less is used to view it. However, on Mac OS X, I really like scrolling with touchpad instead on up/down or page-up/page-down buttons. Is there a way to just ...
0
votes
2answers
228 views
Installing MySQL 5.5 on Mac OS 10.6
I am trying to install MySQL from source on my Mac OS. I've expanded the source code, and am now trying to configure it. However, I can't get past that step:
...
5
votes
2answers
206 views
Is it possible to record audio directly to a computer's optical drive?
There's a question over at audio.SE at the moment and I thought it may attract some answers here. I asked the user and he's happy to have it posted here to see if anyone has some ideas. Here it is ...
2
votes
1answer
296 views
How do I make a droplet/.app in platypus for my unix command?
This is my sample code from the platypus tutorial.
I am trying to make it work with a command named pymol, and I want it to open .pdb files or open just pymol. I know nothing about perl, but I have ...
1
vote
1answer
391 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 ...
8
votes
4answers
792 views
Why would vim return non-zero exit code if I exit immediately after opening?
I'm running into a bit of a strange problem w/ vim on Snow Leopard: I get a non-zero exit code from simply running vim and then quitting.
$ vim
# exit immediately using :q
$ echo $?
1
However, if I ...
3
votes
1answer
486 views
Bind unprivileged application to privileged port on Mac OS X
I'd like to create launchd.plist file for an httpd server. Problem is - when the httpd is run as privileged user it daemonizes, which is not allowed by launchd.plist manual page. If I don't run it as ...
4
votes
1answer
6k views
How to know when and which user logged into the system under Mac OS X? Last is not enough!
In Mac OS X, if I don't touch it for a while, it will lock the screen and one must use password to unlock it, but this kind of log in is not recorded by last command. I want to know if anybody tried ...
5
votes
1answer
1k views
Differences between sed on Mac OSX and other “standard” sed?
I am having some issues in using an answer provided on this site for this question about a sed command to replace a blank line with two other lines of content, and it was brought up if the sed command ...
7
votes
1answer
209 views
in zsh, how do I hide the backslashes in the completion menu
On Mac OS X 10.6, zsh. I have set in .zshrc:
setopt automenu
…to get a completion menu below the prompt. When I type:
cd <TAB>
I see a completion menu with all directories that have spaces ...
0
votes
2answers
288 views
Ruby and Git refuse to update. (Mac)
I've been trying to update Git for a while. I'm currently stuck on 1.7.3.4, and I've tried updating to 1.7.4.x, and 1.7.5.x but it never works.
Today I compiled and installed Ruby 1.9.2, but it still ...
5
votes
5answers
2k views
How to copy all html files from a directory tree to a single directory?
I want to copy all the .html files in myDir and its subdirectories to ~/otherDir. Here's what I tried (it doesn't work):
$ find myDir -name *.html -print | xargs -0 cp ~/otherDir
usage: cp [-R [-H | ...
1
vote
1answer
279 views
No exec permissions on programs in /usr/local/bin
I have installed the newest Erlang from source. As the final step I have executed
sudo make install
Among other things, it placed erl link in /usr/local/bin, but its permissions are insufficient ...
2
votes
1answer
547 views
how to detect a laptop hibernate/resume(close lid,open) in osx from a bash script
This is a follow on question to
how to trap a suspend a resume from a bash script
How do you a trap the event that occurs when you close the lid and later reopen it from a bash script?
6
votes
2answers
356 views
Which is the best practice when replacing a system binary?
I'm working on Mac OS X which is shipped with several binaries mostly located in /usr/bin/ and /usr/sbin/. Since it doesn't have a native package manager like some Linux distros, I got used to ...
3
votes
0answers
426 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 ...
4
votes
2answers
297 views
How to synchronize a networked drive and an external drive (Ubuntu & OS X)?
In light of a recent hardware failure, I've decided that it's time to be a little less lax regarding back-ups.
What I have:
An Ubuntu 10.10 'server/NAS'
A MacBook 5,2
A WD external HDD
The server ...
21
votes
7answers
7k views
dd: How do I know if it's still working?
I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
3
votes
2answers
360 views
Total in `ls -l`
When I run ls -l, the following is displayed:
>: ls -l
total 320
-rw-r--r-- 1 foo staff 633 5 Apr 13:23 A.class
-rw-r--r-- 1 foo staff 296 5 Apr 13:24 A.java
...
What does the ...
5
votes
1answer
278 views
How to create yaboot partition using a ppc Mac
My computer g4 1.5 ghz PowerBook ppc
I need to use this computer to make a yaboot partition on a USB stick.
Here is documentation for making a yaboot partition with a Linux machine:
...
2
votes
2answers
1k views
How can I enable internet sharing without using the gui or apple script on snow leopard?
for some rather strange reason my sharing preferences tab crashes (it's a long story and there seems to be no good solution for it, it's looking for a ui object that no longer exists).
Anyway, I want ...
5
votes
4answers
3k views
How to cd to a Windows file share?
At work, I spend a lot of time manipulating files on a networked computer that's running SME Server (but that's set up for Windows filesharing, if that somehow makes a difference).
I have been ...
8
votes
2answers
198 views
Hibernate and security considerations
How do Linux and OSX handle sensitive memory pages (e.g. cryptographic keys) when running OS is suspended to disk? If the memory image written is encrypted, how are its keys handled?
2
votes
2answers
197 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.
...
7
votes
4answers
2k views
Is there something like wine to run OSX apps on linux?
This question answers why Linux can't run OSX apps, but is there some application similar to Wine that allows one to do so?
0
votes
3answers
2k views
Why $JAVA_HOME does not persist on a mac?
On my mac os 10.6.6 I'm trying to persist env variable $JAVA_HOME but it doesn't stick!
$ export JAVA_HOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
Once I restart it won't ...
1
vote
1answer
720 views
removing startup item from com.apple.launchd
Im not sure if this is the right place for this kind of question, but here it goes anyways...
I installed a program a few months ago, it had a startup option that I did install. Later, I decided to ...