How to use unrar in Ubuntu

[If unrar is not installed]

$ sudo apt-get unrar

[To extract a file]

$ unrar e file.rar

How to import a SQL file in MySQL from command line

$ mysql -u username -p -h localhost data-base-name < data.sql