linux guru
Saturday, March 13, 2010
linux find command - to find file with some content
find files with password under folder /opt/activemq
sudo find /opt/activemq/ -exec grep -l password {} \;
sudo find /opt/SWS_4/ -exec grep -l "sigTypeList" {} \;
find . -name "*.log" | xargs grep "localhost post"
Tuesday, March 9, 2010
enable mysql slow query log in my.cnf
Step 1:
add following two line under mysqld
[mysqld]
log-slow-queries=/var/log/mysql-slow.log
long_query_time = 10
step 2: create an empty log file and chage the owner
vim /var/log/mysql-slow.log
chown mysql:mysql /var/log/mysql-slow.log
step 3: reboot mysql
/etc/init.d/mysqld stop
/etc/init.d/mysqld start
Newer Posts
Older Posts
Home
Subscribe to:
Posts (Atom)
Ruby on Rails Paperclip tutorial - rails 4.0.3, Ruby 2.1, Paperclip 4.1.1
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
gunzip: aaa.zip: unknown suffix -- ignored
I used 7z to zip this file under Windows, try to unzip it under linux [ang@walker temp]$ gunzip 2011.sdf.zip gunzip: 2011.sdf.zip: unkno...
transmission 403 unauthorized ip address
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...