Basics
These is a collection of most basic linux commands. Some require installations, others come pre-installed with the system.
Show current location:
Show folder size on disk:
Mirror full websites using wget:
| wget -e robots=off -m -k https://www.domain.com/
|
Download everything 2 folders deep on website using wget:
| wget -e robots=off -m -E -nH -np --cut-dirs=2 http://www.domain.com/folder1/folder2/
|
Delete a folder:
Change ownership of folder:
| chown -hR www-data:www-data /var/www/html/
|
RAR a file (must have RAR installed on server):
| rar a -m0 file.rar "folder1" "folder2" "file3"
|
UnRAR a file (must have RAR installed on server):
tar a file on server:
| tar -vcf archive.tar 'folder 1' 'folder 2' 'file 3'
|
tar.gz a file on server:
| tar -vzcf archive.tar.gz 'folder 1' 'folder 2' 'file 3'
|
Create a symbolic link:
| ln -s /home/somik/folder1 /var/www/folder2
|
View file properties:
Check server usage by user: