EZ Linux Admin random header image

Entries Tagged as 'Cheat Sheets'

Tracking down the biggest folders

August 11th, 2011 by EZ linux · No Comments

du -ax –max-depth 1 /var/cpanel | sort -n | tail This is a great command to simply find what folders are the biggest in a directory. You can replace the /var/cpanel with any folder and it will list everything in there and how big they are in order. Once you find the big folder then [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Commands · Linux Security · Linux Software / Scripts · Linux Tricks

Cleaning up /var

August 11th, 2011 by EZ linux · No Comments

Cpanel and linux leaves a lot of log files in /var After several years these can add up, especially in the cpanel/bandwidth folder. So a couple quick folder moves and symlinks can clean things up. This is assuming you have a /backup partition and some room in it. Moving the log folder mv /var/log /backup/ [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Operating Systems · Linux Security · Linux Software / Scripts · Linux Tricks

Clearing Your DNS Cache

July 19th, 2011 by EZ linux · No Comments

Clearing Your DNS Cache Your DNS cache stores the locations (IP addresses) of pages you have recently viewed. If the location of the page changes before the entry in your DNS cache is updated, you will be unable to access the page. If you are encountering a high number of HTML 404 error codes, you [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM

Path to date

May 24th, 2010 by EZ linux · No Comments

The server path to date can very for different servers, you will need to run this command to find it: which date For most servers it is: /bin/date This is the same for perl and php

Click to continue →

Tags: Cheat Sheets · Linux Commands · Linux Operating Systems

fsck

April 9th, 2010 by EZ linux · No Comments

fsck -a Will automatically fix errors.

Click to continue →

Tags: Cheat Sheets

When asking about a networking issue, get these details from the server

April 5th, 2010 by EZ linux · No Comments

Kernal version uname -a Nic / Lan driver version dmesg | grep r8169 Internet controller lspci -nn | grep Ethernet Details on etho nic card sudo ethtool eth0 Module size lsmod | grep r8169 Module versions cat /proc/modules | grep r8169 Don’t worry all these commands are safe and just for reporting.

Click to continue →

Tags: Cheat Sheets · Hardware · Linux Commands · Linux Tricks

Mod_cband the new Mod_Bandwidth

March 29th, 2010 by EZ linux · 3 Comments

I spent hours trying to get mod_bandwidth to work simply because I have used it for years. But now with Apache 2.0 times have changed and there is a better option for Linux and it’s free. The new mod to regulate bandwidth and more is called Mod_cband I’m not sure what cband means but I [...]

Click to continue →

Tags: Cheat Sheets · Cpanel and WHM · Linux Security · Linux Software / Scripts · Linux Tricks

How to do a search and replace over multiple files

March 18th, 2010 by EZ linux · No Comments

You could also use find and sed, but I find that this little line of perl works nicely. perl -pi -w -e ‘s/search/replace/g;’ *.php -e means execute the following line of code. -i means edit in-place -w write warnings -p loop Example I had the following style sheet in a section: <link rel=”stylesheet” type=”text/css” href=”../includes/style.css”> [...]

Click to continue →

Tags: Cheat Sheets · Linux Commands

Calm down rsync if it overloads your IO memory or CPU

March 3rd, 2010 by EZ linux · No Comments

The trick is to limit I/O bandwidth for rsync. The –bwlimit option limit I/O bandwidth. You need to set bandwidth using KBytes per second. For example, limit I/O bandwidth to 10000KB/s (9.7MB/s), enter: rsync –delete –numeric-ids –relative –delete-excluded –bwlimit=10000 /path/to/source /path/to/dest/? 10 megs a second is plenty of speed and will keep the server running [...]

Click to continue →

Tags: Cheat Sheets · Linux Commands · Linux Security · Linux Software / Scripts · Linux Tricks

Default MYSQL port

February 9th, 2010 by EZ linux · No Comments

The default MYSQL port is: 3306

Click to continue →

Tags: Cheat Sheets · Linux Security · Ports