Category: Linux

Linux: Backup and restore MySQL database using mysqldump

Backing up database using mysqldump: mysqldump -u [username] [dbname] > [dump_filename] Restoring file from a backup: mysql -u [username] [dbname] < [dump_filename] References MySQL 5.1 Reference Manual :: 4.5.4 mysqldump mysqldump.com

Linux Basics & Resources

Initial Server Setup with CentOS 6 How To Install Linux, Apache, MySQL, PHP (LAMP) stack On CentOS 6 Change owner and group of a file/folder Linux commands for changing user rights Install and Configure phpMyAdmin on Linux How To Set Up vsftpd on CentOS 6 Possible problems Change default directory on VsFTP phpMyAdmin + CentOS […]

Compress files and directories using tar.gz on linux

Compressed Archive Syntax: tar -zcvf archive_name.tar.gz directory_or_file_to_compress DeCompress (Extract) Archive Syntax: tar -zxvf archive_name.tar.gz see also How to create and extract zip, tar, tar.gz and tar.bz2 files in Linux search terms linux tar.gz files, linux extract tar.gz, linux zip files, how to compress files on linux

List files and directories by file size on linux

You can get a list of files and directories sorted by file size using command below: du -sm * | sort -nr | head -15 Detailed explanations can be found here.