Posts Tagged ‘export’

19
Aug

Export CSV from MySql Database via SSH

   Posted by: Vlad    in Linux

There is a time when you need to export a specific table from a mysql database. Through SSH this is made very easy using the following command:

echo “select * from table_name;” | mysql -u root -pyourpassword database_name | sed -e ’s/^Mn/r/g’ > /home/exported.csv

Of course you can make a small script that adds the date or other usefull information to the filename:

#!/bin/bash
#This scripts adds date to the exported CSV
NOW=$(date +”%m_%d_%Y_%H_%M_%S”)
echo “select * from table_name;” | mysql -u root -pyourpassword database_name | sed -e ’s/^Mn/r/g’ > /home/exported_$NOW.csv

Save this script as export_csv.sh and make it executable, and that’s it.

Tags: , , , , , , , , , , , , , , , , , , , , ,

5
Aug

Firefox 3 and bookmarks

   Posted by: Vlad    in Windows

Firefox is curently at version 3.0.1. I’ve always used it and I am simply in love with it. I have the same profile wich i am using since version 1, and every time I format my computer or change it, I simply copy back my profile folder and point profiles.ini to it. A few days ago I did a little “house keeping” to my bookmarks and observed that the file bookmarks.html in my profile folder was still the same. First of all I tried to figure it out by myself, but I had no success, so I googled it. I found out that since version 3 firefox doesn’t use anymore bookmarks.html but places.sqlite in the profile folder. Bookmarks.html is still used for import/export purposes.

Tags: , , , , , , , , , , , , , , , , , , , ,