Last active
September 18, 2015 00:03
-
-
Save eukras/0cf8b89da19d375792df to your computer and use it in GitHub Desktop.
Some Diagnostic Shortcuts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Proper tree view of directories (Bash) | |
ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/' | |
# Database table sizes (MySQL, MB) | |
SELECT SUM(data_length / (1024 * 1024)), table_schema, table_name Data_MB FROM information_schema.tables WHERE table_schema NOT IN ('information_schema','performance_schema','mysql') GROUP BY table_schema, table_name; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment