Category Archives: Linux

mysql upgrade error – start failed

Was upgrading today and got this: Setting up mysql-server-5.5 (5.5.28-0ubuntu0.12.10.1) … start: Job failed to start invoke-rc.d: initscript mysql, action “start” failed. dpkg: error processing mysql-server-5.5 (–configure): subprocess installed post-installation script returned error exit status 1 yay, so it can’t … Continue reading

Posted in Linux | Tagged , , , | Leave a comment

Notify on cbr.ru rates change

script for cron: #!/bin/bash TOMMOROW=$(date +”%d.%m.%Y” –date=”next day”) touch /var/tmp/cbr.log # just so that it exist curl http://cbr.ru/currency_base/D_print.aspx?date_req=01.01.2099 |\ sed ‘s/Курсы валют за 01.01.2099 не зарегистрированы\.//’ |\ sed ‘/<!–/,/–>/d’ |\ sed ‘/<script/,/<\/script>/d’ > /tmp/cbr.html if [ -z `cat /var/tmp/cbr.log | … Continue reading

Posted in Linux | Leave a comment

zip individual files recursively

Zip up every fb2 file in a book collection to save some space since reader can read them from zip files anyway: find . -type f -execdir zip -m ‘{}’.zip ‘{}’ \;

Posted in Linux | Leave a comment