How to convert filenames or text to lowercase on the Linux command line

Linux tolower command

There is no simple 'tolower' command on the bash, but you can convert uppercase characters to lowercase with a little shell script. The script uses the tr command internally for converting the chars. Create a shell script with the name 'tolower' that converts all text that is given as a command-line argument to lower case: ... Read more

Get detailed information about server hardware and partitions on Ubuntu

Get Hardware info on Ubuntu

This short tutorial shows you 5 commands to get details about the system hardware of your PC, Notebook, or Server on Ubuntu and Debian. CPU details on Linux To get detailed information on the CPU, use this command: cat /proc/cpuinfo The output will look similar to this: cat /proc/cpuinfo processor       : 0 vendor_id       : AuthenticAMD ... Read more

Backup and Restore MySQL Databases on the shell

MySQL Database Backup

One way to create a backup of a MySQL database on the shell is to use the mysqldump command. Mysqldump creates a dump of the database in form of sql commands, which can be easily restored using the mysql command or PHPMyAdmin. Backup a MySQL Database mysqldump -u root -p mydatabase > /tmp/backup_mydatabase.sql This command ... Read more

Linux: How to view log files on the shell

Many Linux servers are administered on the command line e.g. with an SSH connection. In the following article, I will explain several shell commands that make it easy to view log files. These commands will work on all major Linux distributions inc. CentOS, Debian, Fedora, and Ubuntu. Get the last N lines of a log ... Read more