22 articles Linux Page 2 / 3

Linux configuration and information.

Show disk usage in descending order

If you need to find the amount of disk space being consumed in Linux/Unix, you can show it recursively through your directories as follows. $ du -ks * | sort -gr 11927760 Library 7729280 Desktop 5408572 Music 118840 Downloads 99740 Pictures 79668 zabbix 74300 Documents 1048 Sites 856 Movies 300 Applications 228 macserv-snmpwalk.txt 8 yo_zimbra_template.xml…

MariaDB/MySQL – Recover root password

Here are commands you need to type for each step (login as the root user): Step 1.  Stop MariaDB service. # systemctl stop mariadb Step 2.  Start MariaDB server w/o password. # mariadb_safe –skip-grant-tables & [1] 5988 Starting mariadb daemon with databases from /var/lib/mysql mariadb_safe[6025]: started Step 3.  Connect to mariadb server using mysql client: # mysql -u root…

Enable color coding when using the ls command

By default color coding is disabled for the ”’ls”’ command under Ubuntu. If you wish to enable it simply add the following to your ”’.bashrc”’ file alias ls=’ls –color=auto’ Note: This is different than enabling color coding under Mac OSX as documented. If you wish for color coding when using the ”’ls”’ command under Mac…