<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearch/1.1/' xmlns:georss='http://www.georss.org/georss' xmlns:thr='http://purl.org/syndication/thread/1.0' xmlns:gd='http://schemas.google.com/g/2005' gd:etag='W/&quot;A0EFRH4_cCp7ImA9WhZXFE4.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477</id><updated>2011-05-03T09:20:15.048-07:00</updated><title>Linux DB PHP Scripts Tech Diary</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default?redirect=false&amp;v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>148</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry gd:etag='W/&quot;A0EFRH49eip7ImA9WhZXFE4.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-2435456902317604382</id><published>2011-05-03T09:20:00.000-07:00</published><updated>2011-05-03T09:20:15.062-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-05-03T09:20:15.062-07:00</app:edited><title>mysql ERROR No.  1030: Got error 28 from storage engine</title><content type='html'>Disk is out of space&lt;br /&gt;
&lt;br /&gt;
[root@reyotest stat]# df&lt;br /&gt;
Filesystem           1K-blocks      Used Available Use% Mounted on&lt;br /&gt;
/dev/sda3            231825440 219859768         0 100% /&lt;br /&gt;
/dev/sda1               101086     22394     73473  24% /boot&lt;br /&gt;
tmpfs                  1037048         0   1037048   0% /dev/shm&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-2435456902317604382?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/2435456902317604382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/05/mysql-error-no-1030-got-error-28-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2435456902317604382?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2435456902317604382?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/05/mysql-error-no-1030-got-error-28-from.html' title='mysql ERROR No.  1030: Got error 28 from storage engine'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DEEERX47cCp7ImA9WhZXFE4.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-5487995629731594857</id><published>2011-05-03T08:30:00.000-07:00</published><updated>2011-05-03T08:30:04.008-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-05-03T08:30:04.008-07:00</app:edited><title>perl error: Can't locate LWP/UserAgent.pm in @INC</title><content type='html'>need to install libwww-perl&lt;br /&gt;
&lt;br /&gt;
1, download package from cpan:&lt;br /&gt;
wget http://www.cpan.org/modules/by-module/LWP/libwww-perl-5.837.tar.gz&lt;br /&gt;
&lt;br /&gt;
2, unzip it&lt;br /&gt;
tar xvzf libwww-perl-5.837.tar.gz&lt;br /&gt;
&lt;br /&gt;
3, install pkg&lt;br /&gt;
cd libwww-perl-5.837&lt;br /&gt;
perl Makefile.PL&lt;br /&gt;
make&lt;br /&gt;
make install&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-5487995629731594857?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/5487995629731594857/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/05/perl-error-cant-locate-lwpuseragentpm.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5487995629731594857?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5487995629731594857?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/05/perl-error-cant-locate-lwpuseragentpm.html' title='perl error: Can&apos;t locate LWP/UserAgent.pm in @INC'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;A0UHQ3k9eCp7ImA9WhZQEUk.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-6841784489956448286</id><published>2011-04-18T10:53:00.001-07:00</published><updated>2011-04-18T10:53:52.760-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-18T10:53:52.760-07:00</app:edited><title>Unable to open env file: /etc/default/locale</title><content type='html'>To fix&lt;br /&gt;
"Unable to open env file: /etc/default/locale: No such file or directory" &lt;br /&gt;
in /var/log/auth.log, run: &lt;br /&gt;
&lt;br /&gt;
update-locale&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-6841784489956448286?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/6841784489956448286/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/unable-to-open-env-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6841784489956448286?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6841784489956448286?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/unable-to-open-env-file.html' title='Unable to open env file: /etc/default/locale'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DEYFR3s4eyp7ImA9WhZRGU8.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-6140841458858060223</id><published>2011-04-15T20:55:00.000-07:00</published><updated>2011-04-15T20:55:16.533-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-15T20:55:16.533-07:00</app:edited><title>vim:  convert the ^M linebreak to 'normal' linebreak</title><content type='html'>^M is ctrl+v and ctrl+M&lt;br /&gt;
:%s/^M/\r/g&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-6140841458858060223?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/6140841458858060223/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/vim-convert-m-linebreak-to-normal.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6140841458858060223?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6140841458858060223?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/vim-convert-m-linebreak-to-normal.html' title='vim:  convert the ^M linebreak to &apos;normal&apos; linebreak'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CEENRX8_eSp7ImA9WhZRGEQ.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-5368330531283098780</id><published>2011-04-15T11:38:00.001-07:00</published><updated>2011-04-15T11:38:14.141-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-15T11:38:14.141-07:00</app:edited><title>mysql group by and having</title><content type='html'>mysql&gt; select CASNumber, count(CASNumber) as ccas  from compounds group by CASNumber having ccas=1 order by ccas ;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-5368330531283098780?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/5368330531283098780/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/mysql-group-by-and-having.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5368330531283098780?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5368330531283098780?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/mysql-group-by-and-having.html' title='mysql group by and having'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;Dk8GSHw7eCp7ImA9WhZRF0Q.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-8431268520317997245</id><published>2011-04-14T08:27:00.000-07:00</published><updated>2011-04-14T08:27:09.200-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-14T08:27:09.200-07:00</app:edited><title>sed: -e expression #1, char 24: unknown option to `s'</title><content type='html'>When you call sed in ruby, you may get this error message&lt;br /&gt;
&lt;br /&gt;
here is the ruby code&lt;br /&gt;
&lt;br /&gt;
def update_server (conf_file_path, config )&lt;br /&gt;
   puts "update #{conf_file_path}"&lt;br /&gt;
   %x[sed  "s/drs_db.*\/drs_db/drs_db mmmmmmmm \/drs_db/g" #{conf_file_path}]&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
correct:&lt;br /&gt;
def update_server (conf_file_path, config )&lt;br /&gt;
   puts "update #{conf_file_path}"&lt;br /&gt;
   %x[sed  "s/drs_db.*\\/drs_db/drs_db mmmmmmmm \\/drs_db/g" #{conf_file_path}]&lt;br /&gt;
end&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-8431268520317997245?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/8431268520317997245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/sed-e-expression-1-char-24-unknown.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/8431268520317997245?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/8431268520317997245?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/sed-e-expression-1-char-24-unknown.html' title='sed: -e expression #1, char 24: unknown option to `s&apos;'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;D0MHQnY_fip7ImA9WhZRFUg.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-6402592005732538252</id><published>2011-04-11T13:57:00.001-07:00</published><updated>2011-04-11T13:57:13.846-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-11T13:57:13.846-07:00</app:edited><title>add a line in a file</title><content type='html'>add a line after line: [mysqld]&lt;br /&gt;
sed -i  '/\[mysqld\]/ a\bind-address = 6.31.83.19'  test.cnf&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-6402592005732538252?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/6402592005732538252/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/add-line-in-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6402592005732538252?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6402592005732538252?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/add-line-in-file.html' title='add a line in a file'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;C08DSXgyeSp7ImA9WhZSGEs.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-573699492419301834</id><published>2011-04-03T13:17:00.001-07:00</published><updated>2011-04-03T13:17:58.691-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-03T13:17:58.691-07:00</app:edited><title>how to check mysql version</title><content type='html'>mysql&gt; SELECT version();&lt;br /&gt;
+--------------------+&lt;br /&gt;
| version()          |&lt;br /&gt;
+--------------------+&lt;br /&gt;
| 5.0.51a-3ubuntu5.7 |&lt;br /&gt;
+--------------------+&lt;br /&gt;
1 row in set (0.00 sec)&lt;br /&gt;
&lt;br /&gt;
mysql&gt; status&lt;br /&gt;
--------------&lt;br /&gt;
mysql  Ver 14.12 Distrib 5.0.51a, for debian-linux-gnu (i486) using readline 5.2&lt;br /&gt;
&lt;br /&gt;
Current pager:          stdout&lt;br /&gt;
Using outfile:          ''&lt;br /&gt;
Using delimiter:        ;&lt;br /&gt;
Server version:         5.0.51a-3ubuntu5.7 (Ubuntu)&lt;br /&gt;
Protocol version:       10&lt;br /&gt;
Connection:             Localhost via UNIX socket&lt;br /&gt;
Server characterset:    latin1&lt;br /&gt;
Db     characterset:    latin1&lt;br /&gt;
Client characterset:    latin1&lt;br /&gt;
Conn.  characterset:    latin1&lt;br /&gt;
UNIX socket:            /var/run/mysqld/mysqld.sock&lt;br /&gt;
Uptime:                 153 days 19 hours 36 min 16 sec&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-573699492419301834?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/573699492419301834/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/how-to-check-mysql-version.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/573699492419301834?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/573699492419301834?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/how-to-check-mysql-version.html' title='how to check mysql version'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CkEESHw6cSp7ImA9WhZSFko.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-7299670310394331086</id><published>2011-04-01T08:10:00.000-07:00</published><updated>2011-04-01T08:10:09.219-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-04-01T08:10:09.219-07:00</app:edited><title>enable Telnet client in Windows Vista</title><content type='html'>1. Open the Programs and Features Control Panel &lt;br /&gt;
2. Select "Turn Windows features on or off."&lt;br /&gt;
3. Select the Telnet Client option and click OK.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-7299670310394331086?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/7299670310394331086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/enable-telnet-client-in-windows-vista.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7299670310394331086?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7299670310394331086?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/04/enable-telnet-client-in-windows-vista.html' title='enable Telnet client in Windows Vista'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DEQBRX4yeyp7ImA9WhZSE0k.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-1039809940462621755</id><published>2011-03-28T14:05:00.000-07:00</published><updated>2011-03-28T14:05:54.093-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-28T14:05:54.093-07:00</app:edited><title>vim find replace regex</title><content type='html'>Try to remove \n before the last "&lt;br /&gt;
Update:&lt;br /&gt;
"B160102","4-Nitropicolinaldehyde","108338-19-8&lt;br /&gt;
"&lt;br /&gt;
To:&lt;br /&gt;
"B160102","4-Nitropicolinaldehyde","108338-19-8"&lt;br /&gt;
&lt;br /&gt;
:s%/-[0-9]\zs\n"\ze&lt;br /&gt;
&lt;br /&gt;
\zs and \ze to set the start and end of a pattern.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-1039809940462621755?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/1039809940462621755/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/vim-find-replace-regex.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/1039809940462621755?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/1039809940462621755?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/vim-find-replace-regex.html' title='vim find replace regex'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DkENQnk5cSp7ImA9WhZSE0k.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-5249167135324328352</id><published>2011-03-28T13:38:00.001-07:00</published><updated>2011-03-28T13:38:13.729-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-28T13:38:13.729-07:00</app:edited><title>mysql change root password</title><content type='html'>$ mysqladmin -u root password NEWPASSWORD&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-5249167135324328352?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/5249167135324328352/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/mysql-change-root-password.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5249167135324328352?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5249167135324328352?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/mysql-change-root-password.html' title='mysql change root password'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;Ak8AQX4yeip7ImA9WhZSE04.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-2895003248187933573</id><published>2011-03-28T12:00:00.000-07:00</published><updated>2011-03-28T12:00:40.092-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-28T12:00:40.092-07:00</app:edited><title>How to find the total number of files in a folder</title><content type='html'>root@209:/temp# ls /var/htdocs/temp | wc&lt;br /&gt;
19767   19767  212692&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-2895003248187933573?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/2895003248187933573/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/how-to-find-total-number-of-files-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2895003248187933573?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2895003248187933573?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/how-to-find-total-number-of-files-in.html' title='How to find the total number of files in a folder'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CEYCSX4_cCp7ImA9WhZSEEU.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-4804110493575936031</id><published>2011-03-25T12:42:00.000-07:00</published><updated>2011-03-25T12:42:48.048-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-25T12:42:48.048-07:00</app:edited><title>Disabling root SSH logins.</title><content type='html'>CentOS:&lt;br /&gt;
&lt;br /&gt;
1, &lt;br /&gt;
Edit the /etc/ssh/sshd_config file and set the PermitRootLogin parameter to no. &lt;br /&gt;
&lt;br /&gt;
[root@sor ~]# vim /etc/ssh/sshd_config&lt;br /&gt;
PermitRootLogin no&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2,  restart ssh deamon&lt;br /&gt;
[root@sor ~]# /etc/init.d/sshd restart&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-4804110493575936031?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/4804110493575936031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/disabling-root-ssh-logins.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/4804110493575936031?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/4804110493575936031?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/disabling-root-ssh-logins.html' title='Disabling root SSH logins.'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;D08NQH8_cSp7ImA9WhZTE0U.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-741150247407531010</id><published>2011-03-17T11:18:00.001-07:00</published><updated>2011-03-17T11:18:11.149-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-17T11:18:11.149-07:00</app:edited><title>remove all cronjob using linux command</title><content type='html'>crontab /dev/null&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-741150247407531010?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/741150247407531010/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/remove-all-cronjob-using-linux-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/741150247407531010?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/741150247407531010?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/remove-all-cronjob-using-linux-command.html' title='remove all cronjob using linux command'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;A0MAQHw-cSp7ImA9WhZTEkQ.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-2935424116488479626</id><published>2011-03-16T09:40:00.000-07:00</published><updated>2011-03-16T11:17:21.259-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-16T11:17:21.259-07:00</app:edited><title>Using vim as a hex editor</title><content type='html'>Switch to hex mode&lt;br /&gt;
Open a file in vim, hit escape and type:&lt;br /&gt;
:%!xxd &lt;br /&gt;
&lt;br /&gt;
to exit from hex mode&lt;br /&gt;
hit escape again and type:&lt;br /&gt;
:%!xxd -r&lt;br /&gt;
&lt;br /&gt;
Search Hex using vim&lt;br /&gt;
 \%xff or [\xff] &lt;br /&gt;
&lt;br /&gt;
Search 44&lt;br /&gt;
 \%x34\%x34 or [\x34][\x34]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-2935424116488479626?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/2935424116488479626/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/using-vim-as-hex-editor.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2935424116488479626?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2935424116488479626?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/using-vim-as-hex-editor.html' title='Using vim as a hex editor'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DUcBQX0_eyp7ImA9WhZTEkU.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-3136085714422348321</id><published>2011-03-16T07:50:00.000-07:00</published><updated>2011-03-16T07:50:50.343-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-16T07:50:50.343-07:00</app:edited><title>Run MySQL SQL queries on Linux command line</title><content type='html'>This is a shell script&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
deletelist="delete from capture_files where date(updated_on) &lt; DATE_SUB(CURdate(),  INTERVAL 30 DAY);"&lt;br /&gt;
&lt;br /&gt;
mysql -u dbuser -pdbpasswd amp -e "$deletelist"&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-3136085714422348321?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/3136085714422348321/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/run-mysql-sql-queries-on-linux-command.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/3136085714422348321?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/3136085714422348321?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/run-mysql-sql-queries-on-linux-command.html' title='Run MySQL SQL queries on Linux command line'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DkIDQnc_fSp7ImA9WhZTEk0.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-1832960066093986952</id><published>2011-03-15T08:56:00.000-07:00</published><updated>2011-03-15T08:56:13.945-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-15T08:56:13.945-07:00</app:edited><title>Argument list too long - rm files failed</title><content type='html'>Use find and rm to delete files:&lt;br /&gt;
&lt;br /&gt;
find /var/mol/temp/ -name *.txt -exec rm -rf {} \;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-1832960066093986952?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/1832960066093986952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/argument-list-too-long-rm-files-failed.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/1832960066093986952?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/1832960066093986952?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/argument-list-too-long-rm-files-failed.html' title='Argument list too long - rm files failed'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DUcCQHY4fCp7ImA9WhZTEUQ.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-7252870796816930318</id><published>2011-03-15T06:48:00.000-07:00</published><updated>2011-03-15T06:51:01.834-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-15T06:51:01.834-07:00</app:edited><title>Enable Remote Access To MySQL Server</title><content type='html'>1, update my.cnf to make it liston to ip address, not localhost&lt;br /&gt;
&lt;br /&gt;
[mysqld]&lt;br /&gt;
port            = 3306&lt;br /&gt;
socket          = /var/lib/mysql/mysql.sock&lt;br /&gt;
&lt;b&gt;bind-address    = 6.31.83.19&lt;/b&gt;&lt;br /&gt;
&lt;br /&gt;
2, Save the file and Restart the mysql server, enter:&lt;br /&gt;
# /etc/init.d/mysql restart&lt;br /&gt;
&lt;br /&gt;
3, Update your mysql database user privileges&lt;br /&gt;
A: If you want to update existed account, you may do:&lt;br /&gt;
mysql&gt; update user set Host='%' where user='greg';&lt;br /&gt;
mysql&gt; flush privileges ;&lt;br /&gt;
&lt;br /&gt;
Host='%' means allow user greg access this mysql server from any IP address.&lt;br /&gt;
If you want a specified IP, you can do &lt;br /&gt;
mysql&gt; use mysql &lt;br /&gt;
mysql&gt; update user set Host='6.6.6.6' where user='greg';&lt;br /&gt;
mysql&gt; flush privileges ;&lt;br /&gt;
&lt;br /&gt;
B, Or you can use grant &lt;br /&gt;
mysql&gt; CREATE DATABASE foo;&lt;br /&gt;
mysql&gt; GRANT ALL ON foo.* TO greg@'6.6.6.6' IDENTIFIED BY 'PASSWORD';&lt;br /&gt;
mysql&gt; flush privileges ;&lt;br /&gt;
&lt;br /&gt;
You don't need to restart mysql for step 3&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-7252870796816930318?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/7252870796816930318/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/enable-remote-access-to-mysql-server.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7252870796816930318?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7252870796816930318?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/enable-remote-access-to-mysql-server.html' title='Enable Remote Access To MySQL Server'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CUcCR38-fip7ImA9WhZTEU4.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-7307868988676688518</id><published>2011-03-14T11:22:00.001-07:00</published><updated>2011-03-14T13:04:26.156-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-14T13:04:26.156-07:00</app:edited><title>linux remove the first line of a file</title><content type='html'>Two ways:&lt;br /&gt;
1, generate new file&lt;br /&gt;
sed 1d delete_old_capture_file.dump &gt; delete_old_capture_file.list&lt;br /&gt;
&lt;br /&gt;
2, update same file&lt;br /&gt;
sed -i 1d /tmp/delete_old_capture_file.dump&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-7307868988676688518?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/7307868988676688518/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-remove-first-line-of-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7307868988676688518?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7307868988676688518?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-remove-first-line-of-file.html' title='linux remove the first line of a file'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;C0QFQXo5fip7ImA9Wx9aGEU.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-3710070376692269244</id><published>2011-03-11T14:08:00.001-08:00</published><updated>2011-03-11T14:08:30.426-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-11T14:08:30.426-08:00</app:edited><title>linux read line one by one from a file</title><content type='html'>[root@localhost ~]# cat delete_old_capture_file.sh&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
while read line&lt;br /&gt;
do&lt;br /&gt;
  echo "Delete $line" &gt;&gt; /var/log/delete_old_captured_file.log&lt;br /&gt;
  find /opt/ntr/file_capture/ -name $line  -exec rm -rf {} \;&lt;br /&gt;
done &lt; /tmp/file_capture_delete.list&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-3710070376692269244?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/3710070376692269244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-read-line-one-by-one-from-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/3710070376692269244?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/3710070376692269244?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-read-line-one-by-one-from-file.html' title='linux read line one by one from a file'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;DE4GSH05fSp7ImA9WhZTEU8.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-2618975381912259376</id><published>2011-03-11T13:51:00.000-08:00</published><updated>2011-03-14T11:22:09.325-07:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-14T11:22:09.325-07:00</app:edited><title>Save MySQL query results into a text file</title><content type='html'>There are 2 ways to do it.&lt;br /&gt;
1, save the result to a file in the sql query directly&lt;br /&gt;
select file_name &lt;br /&gt;
from files &lt;br /&gt;
limit 3&lt;br /&gt;
into OUTFILE '/tmp/file_capture_delete.list';&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[root@localhost file_capture]# cat /tmp/file_capture_delete.list&lt;br /&gt;
20110311-154002_0001.bin&lt;br /&gt;
20110311-154002_0002.bin&lt;br /&gt;
20110311-154002_0003.bin&lt;br /&gt;
&lt;br /&gt;
2, dump the results to a file&lt;br /&gt;
A, create a mysql file&lt;br /&gt;
[root@localhost delete_old_capture_file]# cat delete_old_capture_file.mysql&lt;br /&gt;
select file_name&lt;br /&gt;
from capture_files&lt;br /&gt;
limit 5&lt;br /&gt;
&lt;br /&gt;
B, Run the mysql and dump the results to a file&lt;br /&gt;
mysql -u username -ppassword DBname &lt; delete_old_capture_file.mysql &gt; delete_old_capture_file.dump&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-2618975381912259376?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/2618975381912259376/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/save-mysql-query-results-into-text-file.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2618975381912259376?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/2618975381912259376?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/save-mysql-query-results-into-text-file.html' title='Save MySQL query results into a text file'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;A0MFQ30_fip7ImA9Wx9aGEo.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-8092522003589616242</id><published>2011-03-11T13:36:00.000-08:00</published><updated>2011-03-11T13:36:52.346-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-11T13:36:52.346-08:00</app:edited><title>Linux Delete Files/Folder Older Than n  Days</title><content type='html'>[root@localhost /]# find /your/folder/ -mtime +30 -exec rm -rf {} \;&lt;br /&gt;
&lt;br /&gt;
Test it:&lt;br /&gt;
1, create a new folder&lt;br /&gt;
  mkdir 20090909&lt;br /&gt;
&lt;br /&gt;
[root@localhost xxx]# ll&lt;br /&gt;
drwxr-xr-x 2 root root  4096 Mar 11 16:25 20090909&lt;br /&gt;
&lt;br /&gt;
2, change folder time&lt;br /&gt;
  touch -t 200909090909 20090909/&lt;br /&gt;
&lt;br /&gt;
3, check time&lt;br /&gt;
[root@localhost xxx]# touch -t 200909090909 20090909/&lt;br /&gt;
[root@localhost xxx]# ll&lt;br /&gt;
drwxr-xr-x 2 root root  4096 Sep  9  2009 20090909&lt;br /&gt;
&lt;br /&gt;
4, delete files and folder older than 30 days  &lt;br /&gt;
&lt;br /&gt;
[root@localhost xxx]# find /your/folder/ -mtime +30 -exec rm -rf {} \;&lt;br /&gt;
&lt;br /&gt;
[root@localhost xxx]# ll&lt;br /&gt;
drwxr-xr-x 2 esl esl 20480 Mar 11 16:21 20110311&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-8092522003589616242?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/8092522003589616242/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-delete-filesfolder-older-than-n.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/8092522003589616242?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/8092522003589616242?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-delete-filesfolder-older-than-n.html' title='Linux Delete Files/Folder Older Than n  Days'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;AkAFR3k5eSp7ImA9Wx9aGEo.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-7818742013086938835</id><published>2011-03-11T13:25:00.000-08:00</published><updated>2011-03-11T13:25:16.721-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-11T13:25:16.721-08:00</app:edited><title>linux change folder date</title><content type='html'>Need to change the folder date&lt;br /&gt;
&lt;br /&gt;
I created a folder on 20110311&lt;br /&gt;
&lt;br /&gt;
[root@localhost file_capture]# mkdir 20110101&lt;br /&gt;
[root@localhost file_capture]# ll&lt;br /&gt;
drwxr-xr-x 2 root root  4096 Mar 11 16:13 20110101&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Change the date using touch&lt;br /&gt;
&lt;br /&gt;
[root@localhost file_capture]# touch -t 201101010101&lt;br /&gt;
touch: missing file operand&lt;br /&gt;
Try `touch --help' for more information.&lt;br /&gt;
[root@localhost file_capture]# touch -t 201101010101 20110101/&lt;br /&gt;
[root@localhost file_capture]# ll&lt;br /&gt;
total 24&lt;br /&gt;
drwxr-xr-x 2 root root  4096 Jan  1 01:01 20110101&lt;br /&gt;
&lt;br /&gt;
[root@localhost file_capture]# touch --help&lt;br /&gt;
Usage: touch [OPTION]... FILE...&lt;br /&gt;
Update the access and modification times of each FILE to the current time.&lt;br /&gt;
&lt;br /&gt;
Mandatory arguments to long options are mandatory for short options too.&lt;br /&gt;
  -a                     change only the access time&lt;br /&gt;
  -c, --no-create        do not create any files&lt;br /&gt;
  -d, --date=STRING      parse STRING and use it instead of current time&lt;br /&gt;
  -f                     (ignored)&lt;br /&gt;
  -m                     change only the modification time&lt;br /&gt;
  -r, --reference=FILE   use this file's times instead of current time&lt;br /&gt;
  -t STAMP               use [[CC]YY]MMDDhhmm[.ss] instead of current time&lt;br /&gt;
  --time=WORD            change the specified time:&lt;br /&gt;
                           WORD is access, atime, or use: equivalent to -a&lt;br /&gt;
                           WORD is modify or mtime: equivalent to -m&lt;br /&gt;
      --help     display this help and exit&lt;br /&gt;
      --version  output version information and exit&lt;br /&gt;
&lt;br /&gt;
Note that the -d and -t options accept different time-date formats.&lt;br /&gt;
&lt;br /&gt;
If a FILE is -, touch standard output.&lt;br /&gt;
&lt;br /&gt;
Report bugs to &lt;bug-coreutils@gnu.org&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-7818742013086938835?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/7818742013086938835/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-change-folder-date.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7818742013086938835?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/7818742013086938835?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/linux-change-folder-date.html' title='linux change folder date'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;AkUCRnY_eCp7ImA9Wx9aGEo.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-6772452261914895719</id><published>2011-03-11T13:17:00.001-08:00</published><updated>2011-03-11T13:17:47.840-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-11T13:17:47.840-08:00</app:edited><title>mysql select entryby date range</title><content type='html'>select * from capture_files where date(created_on) &lt; DATE_SUB(CURdate(),  INTERVAL 30 DAY) and  date(updated_on) &lt; DATE_SUB(CURdate(),  INTERVAL 30 DAY);&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-6772452261914895719?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/6772452261914895719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/mysql-select-entryby-date-range.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6772452261914895719?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/6772452261914895719?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/mysql-select-entryby-date-range.html' title='mysql select entryby date range'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry><entry gd:etag='W/&quot;CE4CR3w5cSp7ImA9Wx9aGEs.&quot;'><id>tag:blogger.com,1999:blog-5177433302037052477.post-5113882753729066966</id><published>2011-03-11T09:02:00.000-08:00</published><updated>2011-03-11T09:02:46.229-08:00</updated><app:edited xmlns:app='http://www.w3.org/2007/app'>2011-03-11T09:02:46.229-08:00</app:edited><title>Assign Values to variables from a text file</title><content type='html'>[root@localhost xxx]# cat test.sh&lt;br /&gt;
&lt;br /&gt;
#!/bin/bash&lt;br /&gt;
&lt;br /&gt;
read a &lt;  process.log&lt;br /&gt;
echo $a&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
results:&lt;br /&gt;
[root@localhost xx]# ./test.sh&lt;br /&gt;
mysql-bin.000005&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5177433302037052477-5113882753729066966?l=linuxdbtechissue.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://linuxdbtechissue.blogspot.com/feeds/5113882753729066966/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/assign-values-to-variables-from-text.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5113882753729066966?v=2'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5177433302037052477/posts/default/5113882753729066966?v=2'/><link rel='alternate' type='text/html' href='http://linuxdbtechissue.blogspot.com/2011/03/assign-values-to-variables-from-text.html' title='Assign Values to variables from a text file'/><author><name>Tech Notes</name><uri>http://www.blogger.com/profile/06685493840075255023</uri><email>noreply@blogger.com</email><gd:extendedProperty name='OpenSocialUserId' value='18266488428352019529'/></author><thr:total>0</thr:total></entry></feed>