How to export a query to csv format ?

Here is the simple sample

mysql -uusername -ppassword databasename -B -e “select * from mytable” | sed ‘s/\t/”,”/g;s/^/”/;s/$/”/;s/\n//g’ > filename.csv

Read More

apt-get on ubuntu

before running apt-get , you should update its repository

Update the Package Index: The APT package index is essentially a database of available packages from
the repositories defined in the /etc/apt/sources.list file. To update the local package index with the latest changes made in repositories, type the following:

sudo apt-get update

Read More