Howtos / Articles

Find what Linux distribution you are using

There are many Linux distributions out there, all with their slight differences. It’s sometimes its hard to determine what distribution you are current using, assuming you weren’t the one who installed it. The commands below can be used to determine the Linux distribution you are using, and in most cases, what version. Generic check: cat /etc/ or cat /etc/issue Sample output: # cat /etc/ CentOS release 6.3 (Final) Kernel \r on an \m # This shows that the distribution is…

Read more [...]

Find what Linux kernel version you are running

To determine what version of the Linux kernel you are currently using, you can use the uname command as per the examples below. $ uname -a This will output the host name of the computer, Kernel version, and the CPU architecture. Example output: $ uname -a Linux localhost.localdomain 2.6.32-279.19.1.el6.x86_64 #1 SMP Wed Dec 19 07:05:20 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux $ localhost.localdomain being the host name of the computer 2.6.32 being the kernel version (the rest relates specifically to…

Read more [...]

Live Monitoring of Log Files on Linux

The tail command which is found on almost all Linux distributions is used to output the last part of files. There is a parameter for the tail command that allows you to monitor a file, and continually output new lines from the file as they are added. This is especially handy for monitoring log files that are constantly being updated. The commands below can be used to continuously monitor log files. Monitor a log file using tail: $ tail -f…

Read more [...]

List Folder and File Size and Sort By Size on Linux

A common requirement on any operating system is to be able to view the total size of a list of folders and files on the file system, and be able to sort the list by size. Generally this isn’t straight forward to do. The commands below can be used to do just that. Display folder sizes and sort in ascending order: $ du -sBM * | sort -n Example: $ du -sBM * | sort -n 0M man 1M etc…

Read more [...]

Restore MySQL Database on Linux

This howto guide will step you through how to restore a MySQL database from a backup file, using the MySQL client command line tools on a Linux machine. Backing up databases is important, but it is useless if you don’t know how to restore the backup. Regular restores should be done to ensure that your backup is operating correctly. Restoring a MySQL database: To restore a MySQL database from a plain text MySQL backup file, run the following command: $…

Read more [...]

Page 8 of 23« First...45678910111213...20...Last »