There are 2 ways to do it.
1, save the result to a file in the sql query directly
select file_name
from files
limit 3
into OUTFILE '/tmp/file_capture_delete.list';
[root@localhost file_capture]# cat /tmp/file_capture_delete.list
20110311-154002_0001.bin
20110311-154002_0002.bin
20110311-154002_0003.bin
2, dump the results to a file
A, create a mysql file
[root@localhost delete_old_capture_file]# cat delete_old_capture_file.mysql
select file_name
from capture_files
limit 5
B, Run the mysql and dump the results to a file
mysql -u username -ppassword DBname < delete_old_capture_file.mysql > delete_old_capture_file.dump
Subscribe to:
Post Comments (Atom)
-
Step 1, New a project rails new demo Step 2, Update Gemfile add paperclip, mysql2 gem, enable JavaScript runtime gem 'mysql2' ...
-
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...
-
When trying to access transmission from web-browswer i got the message : 403: Forbidden Unauthorized IP Address. Either disable the IP ad...
No comments:
Post a Comment