Category Archives: Database

Use locate across external devices in Linux

By default, updatedb indexes only your root partition when run. To be able to extend locate‘s reach and get updatedb to index external devices such as USB harddisks and flash drives, edit the /etc/updatedb.conf file. Modify the following line: PRUNEPATHS=”/tmp /var/spool /media” so that it reads PRUNEPATHS=”/tmp /var/spool” This adds the devices mounted in the… Read More »

Realtime statistics of your Linux system

If you wish to monitor your Linux system in realtime, use dstat. Use a man dstat to see a list of possible options, since they are extensive and dstat can output system usage, memory usage, load times, network information, NFS, therman, VMWare, CPU, sendmail and MySQL usage, among others.Try dstat -tamn -M topcpu where -tamn… Read More »

Find more about your multimedia files

This is a nice trick to easily access information about your multimedia files. Install the mplayer package then add the following to your ~/.bashrc file: idmedia(){ mplayer -identify -frames 0 -ao null -vo null -vc dummy “$@” 2>/dev/null | grep ID_ } Now run it like idmedia file.mp3 (this tip was sent in by lockw3)

Reset the MySQL password

You forgot your MySQL password. No problem, you can recover it easily. Stop the MySQL service with # /etc/init.d/mysql stop …and restart it without a password: # mysqld_safe –skip-grant-tables & You’ll get an output similar to [1] 5958. Now press Enter and type the following one after the other: # mysql -u root mysql> use… Read More »