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)

5
votes
3answers
5k views

/etc/shadow on Mac

I've been trying to run this Linux passwd-generator file on my Mac. I modified enough the script to make it to work well with directories under OSX: #!/bin/sh # build-passwd.sh - creates a password ...
2
votes
1answer
626 views

Permissions corrupted?

A few weeks ago, I installed Linux Mint on a USB flash drive. I used it to copy the contents of my HFS+ external hard drive to my Windows drive on my desktop. Then, I formatted the external drive to ...
0
votes
3answers
111 views

Weird behaviour case insensitivity with bash on MacOS

~/testing $ echo Hello > hello.txt ~/testing $ echo Goodbye > goodbye.txt ~/testing $ cat goodbye.txt hello.txt > HELLO.txt ^C ~/testing $ ls -l total 9056 -rw-r--r-- 1 user user 8 ...
1
vote
1answer
786 views

How should I check to see if the remote smb serv is mounted?

I'm pretty new to mount. Basically, I have a remote SMB serv on the local network that I want copy images from a directory on, then repeat every 5 min. I think what I need to do is make a script that ...
1
vote
0answers
93 views

How do I fix my FastCGI Pinax / Django deployment?

I'm running OSX Lion (posted here because this is a Unix-specific question), and am trying to deploy a Pinax project via FCGI. I have the FastCGI daemon running: $ ps wwaux | grep fcgi jonathan ...
1
vote
1answer
238 views

How to prevent fs unmounting?

(Apologies in advance for giving so few details below, but trust me that the set-up and the problem I'm dealing with are truly baroque, and even a superficial description would result in a far ...
8
votes
3answers
4k views

How can I print well formatted code

Similar to using markdown on Stack Overflow to create monospace output, how can I do that for my programs. I tried lp filename.txt and was pleasantly please to find that it was able to use the local ...
1
vote
1answer
1k views

How can I force LXDE to have a transparent background when connecting with X/X11?

Just got my Raspberry Pi in the mail and I've started playing around with it. After getting LXDE up and working working in desktop mode (i.e. monitor and keyboard plugged in) I decided I wanted to ...
0
votes
1answer
164 views

Linux Mint freezes while downloading eclipse

I installed linux mint on parallels on my mac computer. It seemed to work fine and then, while downloading eclipse from Software Manager the entire system froze when it got to 40%. I've tried ...
3
votes
1answer
173 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 ...
2
votes
2answers
385 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
0answers
499 views

How to fix link error under CMake for class QX11Info on Mac OS X

I'm trying to build kxstitch, which is designed for Linux, on OS X. I've gotten most of the way there by installing MacPorts, XCode, KDE, etc. and making minor changes to the build file, but am ...
1
vote
4answers
2k views

Best rolling release distribution for MacBook Pro

I got a macbook pro 7.1 wich is running OSX, i'm looking for the most compatible distribution to dual boot. Here's my criteria : I don't want to reinstall my system every 6 month, so I'll prefer a ...
1
vote
1answer
526 views

Automatically dim the backlight of a secondary monitor on MAC [closed]

I have a 2010 iMac 27" as well as a 27" Apple Cinema Display. The iMac will auto-dim on inactivity, I'd say around 5 minutes. When the iMac dim's the Cinema Display is still bright. There is no ...
2
votes
1answer
300 views

FTP timeout FIRST time [closed]

I'm using PureFTPd on MacOSX (Snow Leopard, not server version). When trying to access the FTP account from the outside via dyndns (e.g. using https://www.wormly.com/test_ftp_server) the connection ...
1
vote
2answers
2k views

How to bypass youtube's local cache?

Youtube performance here in Brazil has been terrible lately. Checking my browser's activity I can see that my ISP has a local Youtube cache and serves videos in 1.7 MB chunks. Talking to some friends ...
1
vote
4answers
3k views

Remove directory in ftp

This is probably very simple, but I really can't get it to work. I have an old directory with a symlink in it. I need to delete the directory, but it says it is not empty when I try: rm -f dirname ...
1
vote
1answer
1k views

How to fix this mysql permission problem?

I'm trying like mad to get rails dbconsole to work (Rails 3.2.6, if that helps). The problem is that when I run the command, I get: gems/railties-3.2.6/lib/rails/commands/dbconsole.rb:81:in `exec': ...
6
votes
2answers
2k views

SSH LocalCommand on exit

In ~/.ssh/config you can use the LocalCommand directive to execute a local command whenever you connect to a remote machine via SSH. But how do I execute a command when I exit an SSH connection? It ...
0
votes
1answer
711 views

OSX : rmdir “permission denied” but directory removed

This is a question from a newbie trying to learn UNIX commands. I was trying to test the rmdir command by removing a test directory located in my Downloads directory. I have read and write rights on ...
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 ...
1
vote
1answer
280 views

Re-install ssh-keygen on unix/mac

Something is wrong with the way my Mac generates ssh keys. This has been the second time where I've created a key with ssh-keygen -t rsa. When I paste the created id_rsa.pub to use in a connecting ...
1
vote
1answer
818 views

Append timestamp to top command output

All, I'm using top -l 0 -s 1 -pid XXX -stats rsize | awk 'NR%13==0; fflush(stdout)' > output.txt to store the rsize value of a process in a file. Currently the contents of output.txt look ...
3
votes
1answer
1k views

Vim script check running platform

" Get running OS let os = "" if has("win32") let os="win" else if has("unix") let s:uname = system("uname") if s:uname == "Darwin" let os="mac" else let os="unix" endif ...
4
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, ...
2
votes
1answer
236 views

Should 'LC_ALL=fr_FR.UTF-8 date +%x' give consistent results across machines?

The %x format specifier to the date utility should, according to the man page, use the locale specific date format. However, when I specify the same installed locale and try this on two different ...
1
vote
1answer
177 views

OSX top command shows 5 running on a quad core

When trying to run the top command on my quad core mac, I see periodically that there are 5 running processes. How could it be possible to have 5 running processes on a quad core machine?
3
votes
2answers
8k views

Bypass ssh password prompt from a shell script

I've got a shell script that ssh'es into a server using public key authentication and runs a command on that machine. This works fine on machines where the users have installed the public key on the ...
5
votes
2answers
1k views

On Mac OS X, how to encrypt a small folder and copy that to Google Drive or DropBox?

On Mac OS X, right now I use the following to back up a small project folder to a USB Flash drive: alias a='alias' a dateseq='date "+%Y-%m-%d %H:%M:%S"' a backup_proj='cp -a ~/code/MyProj ...
4
votes
4answers
245 views

Restrict search of locate to specific directories

Is there a way to restrict locate output to specific directories on Mac OS X Snow Leopard? I read about using regex on a Ubuntu forum. However, on my mac locate does not accept -r option. I also ...
5
votes
1answer
13k views

chmod: What does the `+a` parameter mean?

I was following a tutorial and it told me to run sudo chmod +a "SOME_PARAMS" some/dir I was surprised to see that fail telling me chmod: invalid mode: `+a' So I wonder: What does the +a mode ...
4
votes
4answers
8k views

How can I check if mysql is installed using a bash script?

I need to check if mysql is installed from within a bash script. What would be an efficient way of doing that? I thought I could do this: if [ ! -f `which mysql` ] ; then echo "foo" fi But I ...
2
votes
1answer
2k views

Is it possible to make a chroot -bind with debian under mac os x lion?

Within Linux (e.g. Ubuntu), it is possible to mount partitions like /home, /etc, /lib from another Linux machine and bind them to /proc /sys /tmp to the host's to actually take control of the mounted ...
17
votes
3answers
7k views

How do I configure Emacs to use 'ispell' on Mac OS X?

I'm using brew as my package manager for both Emacs and ispell. I have both installed. Doing a quick google, I was unable to figure out how to tell Emacs where ispell is and to load the appropriate ...
2
votes
5answers
3k views

Unable to delete directory

On my OS X host, I am having trouble deleting the directory "foo". mymac:.Trashes joe$ ls foo mymac:.Trashes joe$ ls foo/ Ảnh011.jpg Ảnh012.jpg Ảnh013.jpg mymac:.Trashes joe$ ls -l foo/ ls: ...
3
votes
1answer
629 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 ...
0
votes
1answer
2k views

Can the Linux kernel be compiled on Mac OS X 10.6.8?

I have a Macbook Pro and I want to build the Linux Kernel. Can I build 3.3.6 on my Mac? How?
13
votes
5answers
1k views

How to remove the (1) from filenames using the find command

I recently converted all of my FLAC files to a lower sampling rate of 44.1 kHz and bit depth of 24 bits (because iPhone/iPod don't support anything above that) using XLD on my Mac OS 10.7 (Lion). ...
2
votes
1answer
2k views

Error with fetchmail and SSL certificates

I have a problem configuring my mail client on my Mac OS 10.6.8. These were the steps I did: # touch ~/.fetchmailrc I edited the file and created the contents: poll pop.gmail.com with proto POP3 ...
1
vote
2answers
2k views

I accidentally deleted the sudoers file on Mac OS X; is there any way to recover it?

I accidentalley deleted the sudoers file on Mac OS X; is there any way to recover it? And once you've recovered it, how do you set it to mode 0440? I presume not but I am desperate to get it back!
2
votes
2answers
537 views

dd copies more data than exists in .img?

I'm trying to dd an .img file over to my micro sd (8 GB). The rom (.img) is 2.66 GB, but in my output of DD (live) it says its transfered 9 GB. I don't get how it's turning a 2 GB image into 9 GB. I'm ...
0
votes
1answer
98 views

Alt-Left on OSX to behave like Alt-Left on Ubuntu [duplicate]

Possible Duplicate: How to change previous/next word shortcut in bash? When connected to a ubuntu server bash shell, I can hold alt key and press the left or right keys to move forward or ...
1
vote
1answer
1k views

What does @ sign mean in 'ls' output on Mac OSX Lion terminal? [duplicate]

Possible Duplicate: what does the @ mean in ls -l? What does the @ sign mean in the following "ls" output? -rw-r--r--@ 1 root wheel 489 Jan 4 13:14 boot.plist
4
votes
3answers
6k views

Fork bomb on a Mac?

I just learned about a fork bomb, an interesting type of a denial of service attack. Wikipedia (and a few other places) suggest using :(){ :|:& };: on UNIX machines to fork the process an infine ...
1
vote
3answers
1k views

Dual booting on a Macbook Pro 7,1.

I'm looking to install Linux on my Macbook Pro in a Dual Boot config. I've previously asked this question in a different fashion here: Dual Boot Fedora 16 with OS X rEFIt. However, it didn't really ...
1
vote
3answers
1k views

Is there any way to set Mac OS X to use xinetd instead of launchd?

Can Mac OS X run xinetd instead of launchd and if so, how do you do it?
1
vote
2answers
2k views

How do you install mutt on Mac OS X?

Is there any way of installing Mutt on Mac OS X without using a compiler, homebrew or MacPorts?
4
votes
1answer
5k views

find & sed (search and replace)

I'm using the following command on my mac: $find . -name “*.java” -exec sed -i ’s/foo/bar/g’ {} \; and it seems to have no effect. I have two files in the directory that end in .java, which both ...
4
votes
1answer
307 views

Where does GCC look for its internal executables?

I have installed GCC to a custom prefix. When it is invoked, it complains that it cannot find some of its internal binaries. My computer's "official" GCC keeps them here: ...
2
votes
0answers
355 views

Dual boot Fedora 16 with OS X refit

Having trouble with installing Fedora 16 on my Macbook Pro. While the installation itself completes without and issues, the bootloader doesn't install correctly. I have rEFIt, which I already have ...