Wednesday, August 31, 2016

Ubuntu Mysql Import file.sql into database FROM cmd

$ mysql   -u  root   -p
then enter password and
mysql> use DATABASE_NAME;
mysql> source path/to/file.sql;

Laravel fresh install ubuntu HTTP 500 Fix

sudo chmod 755 -R laravel_app
sudo chmod -R o+w laravel_blog/storage

Tuesday, August 23, 2016

Ubuntu remove directory

sudo rm -rf folderName

Ubuntu Check free space command line

df -h

SQL Select where column1 is not equal column2

SELECT *
FROM my_table
WHERE NOT column_a <=> column_b

How to zip folder in ubuntu

sudo apt-get install zip
Then for creating a zip file:
zip -r compressed_filename.zip foldername

How to stop nohup process (command) from command line (unix) ?

ps -ef
You will get list of process, their PID, time, etc
Find the PID of the process and run

kill <PID>
<PID> - is the process number