Skip to content

Instantly share code, notes, and snippets.

Marko Milivojevic duchalovac

View GitHub Profile
View common_linux_commands.txt
ls
ls *{pattern}* "list files like *pattern*"
ls -la
ll
tail -f {filename}
tail {filename}
head {filename}
cat {filename}
grep {what} {filename} "occurence in file"
grep {what} {filename} -A 20 -B 20 "-A lines after, -B lines before"
View Database Usage
SELECT
table_schema AS `Database`,
table_name AS `Table`,
ROUND(((data_length + index_length) / 1024 / 1024 / 1024),
2) `Size in GB`
FROM
information_schema.TABLES
WHERE
ROUND(((data_length + index_length) / 1024 / 1024 / 1024), 2) > 1
ORDER BY (data_length + index_length) DESC;
You can’t perform that action at this time.