George Mason University Antonin Scalia Law School

Frequently Used Linux Command Lines

Install WordPress
wget https://wordpress.org/latest.tar.gz
tar xfz latest.tar.gz
cp -r * ~/public_html/your/website/folder/

Change Permissions (rwx => 4 + 2 + 1 = 7)
For Directories: find /path/to/your/directory/ -type d -exec chmod 755 {} \;
For Files: find /path/to/your/file/ -type f -exec chmod 644 {} \;

Permissions
chmod -R 755 directory
chmod -R 644 files

Remove files and directory (use carefully)
rm -rf YourDirectory

Change Owner
chown -R apache new_name (change entire directory)

Remane Directory
mv {old} {new}

Database
To access database: mysql -u root -p
mysql> create database [database name];
mysql> show databases;
mysql> drop database [database name];
More

VI editor
Reference: Using the VI editor