John Chase’s Blog

The Personal Blog of John Chase

Archive for the ‘linux/BSD’ Category

OSX Terminal Cursor Movement

without comments

To configure it to Alt + left and right: - Open Terminal preferences (command + ,); - At Keyboard tab, select “control cursor left (or right)” and doubleckick it; - Left: Select the combo “modifier” to “option” and the action to \033b - Right: Select the combo “modifier” to “option” and the action to \033f

Written by admin

January 27th, 2011 at 6:11 pm

Posted in linux/BSD

Macports Mysql Error: ‘./mysql/host.frm’ (errno: 13)

without comments

Annoying error after installing mysql server via macports. The fix is updating the owner of the mysql directory. Hopefully this will be fixed in new releases of the port.

sudo chown -R _mysql /opt/local/var/db/mysql5/

Written by admin

December 7th, 2010 at 10:05 am

Posted in linux/BSD

Stop the Bell: Bash and OSX Path Finder

without comments

Usually disabling the bell in a terminal window is easy, using the terminal preferences. However, sometimes you don’t have preferences that offer this option; for instance in the OSX Path Finder terminal, which is really useful while using a mac and definitley worth the $40.

Anyhow, to disable the bell and annoying formatting issue that occurs in Path Finder terminal just do this:

create a .inputrc file in your root home directory (/~), with the following line:

set bell-style none

Start a new terminal session and you’re good to go.

Written by admin

December 2nd, 2010 at 11:40 am

Posted in linux/BSD

Linux Commands (to remember)

without comments

Use exec along with find. This can help with things like finding files and seeing their ls output.

find . -size +20000k -exec ls -alF {} \;

or using du

find . -size +20000k -exec du -h {} \;

To replace a dos newline character

:%s/^M/\r/g

Remember, the ^M is [ctrl-v + ctrl-m] and not [shift-6].

Recursive delete for certain things.

rm `find /home/user/path -name ‘*.tmp’`

Written by admin

November 17th, 2010 at 11:19 am

Posted in linux/BSD