mercoledì, settembre 22, 2004

multiple conversion to lowercase

This is a modified version of my script to change extensions, for lowercase (or uppercase inverting in script) multiple files in a directory recursively.
for i in $(find . -type f);
do mv $i $(echo $i | tr "[:upper:]" "[:lower:]");
done

hope to be useful as usual.

good work!

lunedì, settembre 13, 2004

MYSQL wont startup

Today, mysql wont startup and dont know why (or maybe!)
First of all I looked at "/var/lib/mysql/<\your host name\>.err" log and this was the error:
Fatal error: Can't open privilege tables: Can't find file: 'host.MYI' (errno: 2)
The problem is the file was there (/var/lib/mysql/mysql).
The solution is delete /var/lib/mysql/mysql wit command rm -fR,
type rcmysql start and the folder will be recreated.
You'll lost all users but mysql will be up and running! Now you have to reset the root password: mysqladmin -u root password

hope to have been useful again!

P.S.
I forgot... the error was my fault ... I played too much with phpmyadmin.
Machines do always what we want they do!

sabato, settembre 11, 2004

Multiple rename with find command!

I've done this shell script for multiple rename files not in same folder
(for doin that, simply use rename command) using the combination between mv and find in this way:
for i in $(find / -name *.ext1);
do mv $i $(echo $i | cut -f1 -d.).ext2;
done
in the specific, this change an extension of a file (ext1) in one another (ext2).
feel free to modify it to match your needs.

bye

bluetooth and SuSE 9.1

It costed to me a lot of work, but finally I got IT!
My bluetooth phone work and I can browse it.

First of all, connect your bluetooth.usb.key directly on usb port without using hubs or will not work (dont know why but I'll solve it in future).

UPDATE the deafault kdebluetooth installed with your suse wit this one kdebluetooth
because it lacks a lot of necessary files you need for make it work.

After that, start kbluetoothd and you'll have an icon in system proces pannel click on it and it will show u the services disposable on your phone. that's all (well ... there are a lot of things to learn so read here: kde-bluetooth.sourceforge.net)!

martedì, settembre 07, 2004

Tips Installing software on SuSE 9.1

To install RPM files with Yast from command line, type this : yast -i <\packagetoinstall\>.rpm

If you downloaded source code from a program (tar.gz files) you can quickly make an RPM file from it.
To do this, first of all install the package "checkinstall", then unpack your source package and cd to the directory where you unpacked the tar.gz file.
Run the following commands:

./configure
make
checkinstall #instead of make install

When finished, you'll find your RPM in /usr/src/packages/RPMS/i686

Now you can install it where you want with yast - i <\packagetoinstall\>.rpm or with rpm -i <\packagetoinstall\>.rpm. This allows your to easily uninstall it afterwards.

bye

venerdì, settembre 03, 2004

Asus L3500 Power Management on SuSE 9.1

Today, I discovered that power management on my asus doesn't function properly and that I can configure extra buttons and leds on my laptop trought powersave (default acpi manager for suse).
Now I'll show you how-to do it!

SUSPEND AND STANDBY
edit '/etc/powersave.conf'. Right at the end there are two lines:
POWERSAVED_DISABLE_USER_SUSPEND=yes POWERSAVED_DISABLE_USER_STANDBY=yes
modify it to
'no'

ASUS_ACPI
acpi4asus (kernel module for asus special keys and leds) is included in the kernel (from 2.6). Just load the module 'asus_acpi' since startup, editing the file '/etc/sysconfig/powersave/common'.

Search for the definition of
'POWERSAVE_ACPI_MODULES' and add 'asus_acpi'.
Same goes for
'POWERSAVE_ACPI_MODULES_NOT_TO_UNLOAD'.

Set
POWERSAVE_CPUFREQD_MODULE="p4-clockmod" (doesnt work well: cpu boot at 300Mhz instead of 2.400Mhz even I've set powersave as well! tryin to find help and further informations)

searching for other tips... stay tuned!


sources:
http://www.wach-o-witz.de/asus_l3500d_install.html