EZ Linux Admin random header image

Entries Tagged as '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

rsync running slow?

March 3rd, 2010 by EZ linux · No Comments

Today I was transferring files through rsync it was taking forever, my guess was the new server or old server was out of memory so I killed some procs and even rebooting the server but still it was crawling. So I thought I would think out of the box and after a couple trial and [...]

Click to continue →

Tags: Hardware · Linux Commands · Linux Tricks

Free /usr partition space by a symlink to domlogs

February 10th, 2010 by EZ linux · No Comments

First move the domlogs folder to the backup partition: mv /usr/local/apache/domlogs /backup Then create a symbolic link to it: ln -s /backup/domlogs /usr/local/apache/domlogs

Click to continue →

Tags: Linux Commands · Linux Tricks

Who command

February 4th, 2010 by EZ linux · No Comments

This command will show who is logged into your system. who

Click to continue →

Tags: Linux Commands

Show All Running Processes in Linux

January 21st, 2010 by EZ linux · No Comments

To see every process type: ps -A To see every process except what’s running from root type: ps -U root -u root -N

Click to continue →

Tags: Cheat Sheets · Linux Commands · Linux Tricks

Flushing iptables

January 21st, 2010 by EZ linux · No Comments

iptables can block many different things and often it will block good servers inside of a network. The best to see if it’s a iptables issue. Try to clean them out with this if you have CSF on the server: csf -f If you still have a issue try to stop iptables like this: service [...]

Click to continue →

Tags: Linux Commands · Linux Security · Linux Tricks

Rebooting a linux server

December 29th, 2009 by EZ linux · No Comments

The best way is: shutdown -r now This will tell the server to take it’s time so to speak and reboot when it’s ready. For a hard reboot simply put: reboot In most cases a hard reboot is fine unless you have file errors and the servers needs to clean them up before a reboot.

Click to continue →

Tags: Linux Commands

Tar and untar

November 27th, 2009 by EZ linux · 1 Comment

To get the files out of a tarball, you can use the following commands: tar xvf something.tar If the tarball has also been gzipped (compressed), you can use the following command: tar xvfz something.tar.gz If you only want certain directories from the tarball, do this: tar xvzf something.tar.gz */dir.you.want/* If you have a .tar.bz2 file, [...]

Click to continue →

Tags: Linux Commands

Apache httpd failed ( apache error checking command )

September 8th, 2009 by EZ linux · No Comments

If apache ( httpd ) fails and says something like: httpd has failed, please contact the sysadmin. Or just that is can’t work, the first step is to run the Linux command: service httpd configtest This should show any errors. If you still get a error then you need to monitor the error_log file while [...]

Click to continue →

Tags: Linux Commands · Linux Software / Scripts · Linux Tricks

Sort and find a directory size

September 2nd, 2009 by EZ linux · 1 Comment

The easiest and fastest way is: du -sh * But if you want to search recursively and display in order you need this one: du -h –max-depth=1 /home/ | sort -n -r And if you want even more depth try: du -s ./* | sort -n| cut -f 2-|xargs -i du -sh {} I recommend [...]

Click to continue →

Tags: Linux Commands