Archive for December, 2009

mysql mysqld crashed

bash commands to restart crashed mysql server killall -9 safe_mysqld mysqld and: /etc/init.d/mysqld restart. If you still get that error execute: netstat -lp

Read more

how to use grep

grep is a unix command that allows you to search for a pattern in a list of files You use grep in the following manner: grep pattern file-name1 file-name2 Here is an example: bash % grep ‘bizante news’ /usr/local/news/2009/* /usr/local/news/2009/ – is the directory we are searching * – the star in this case is [...]

Read more

configuring mod_auth_mysql

This is what I placed in my .htaccess file to configure mod_auth_mysql associated table and field names required in mysql database php_value magic_quotes_gpc On AuthType Basic AuthName “Restricted Access” AuthGroupFile /dev/null AuthMySQLHost localhost AuthMySQLDB databasename AuthMySQLUserTable admin_users AuthMySQLUser dbuser AuthMySQLPassword dbpassword require valid-user

Read more

How to map network drive in Mac OSX

1. In the Finder, click on the Go menu, select Connect to Server. OR use keyboard shortcut CMD + K 2. Enter the address to where the resource is you wish to map. (i.e. smb://www.domain.com/foldername) 3. Enter your network password when prompted. 4. A new icon should appear on the desktop. That is your mapped [...]

Read more

get notified instantly when someone logs into your server as root

It’s best to use an email address not hosted on the server your sending the alert from. 1. Login into your server via ssh and su to root (or log in as root – not advisable) 2. cd /root next edit .bashrc with your preferred editor, Im going to use vi 3. vi .bashrc 4. [...]

Read more

Disclaimer

While every reasonable effort is made to ensure that the information provided on this site is accurate, no guarantees for the currency or accuracy of information are made. bizante’s website and material relating to information, products and services (or to third party information, products and services), is provided ‘as is’. It is provided without any [...]

Read more

display partition size and free space

Using the df bash command to display partition size and free space df -h -x tmpfs (the addidtional paramerters after the df are only for visibility) If one of your partitions is short of space you can move a large sized folder to a partition with lots of free space and create a symbolic link [...]

Read more

Use Linux Find and Awk to Locate Large Files

This is a handy little bash command for locating large file on your linux box. find / -type f -size +20000k -exec ls -lh {} \; | awk ‘{ print $NF “: ” $5 }’

Read more