Posts Tagged ‘information’

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: , , , , , , , , , , , , , , , , , , , , ,

25
Jul

Save virtual machine on NTFS drives

   Posted by: Vlad    in Linux

I usually dual boot my PC with Windows and Linux. For the moment I still heavily use Windows so most of my information is stored on NTFS drives. My linux ext3 partition is only 10 GB wich is more than enough. But I recently installed VMware server on Ubuntu Hardy Heron, and obviously I was forced to save my virtual machines on one of the larger windows partitions. That was o problem for my system, because everything I did I couldn’t PowerOn the virtual machine, with the following error message: “Unable to connect to the MKS: Pipe: Read failed.” After a lot of searching I found this solution. Edit as root the main .vmx file and add this line:

mainMem.useNamedFile=FALSE

Save it and you are ready to use your virtual machine.

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

21
May

Command Window in Vista Setup

   Posted by: Vlad    in Windows

If you found yourself in the position of needing something from the Vista installation disk, you can always raise a Command Prompt Window, and navigate to that location. For example you need the product key so you can copy - paste it rather than typing it by hand.

During the GUI phase of the installation you can press the SHIFT + F10 keys, and you will have yourself a Command Window. From this you can navigate to a text file, or run regedit.exe or any other executable Vista copied to the installation folder on the hard disk.

Thank you Daniel Petri, for this information.

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