Linux Sysadmin Blog

Linux Sysadmin Blog header image 4

Entries Tagged as 'tips'

HowTo remove a list of files

July 9th, 2010 · No Comments · CLI, HowTo, sysadmin, Tips and Tricks

Here is a quick tip on how to remove a list of files. Let’s say you have the list of files inside a file called files_to_remove. Usually I would do something like this: LIST=`cat files_to_remove` and then ls -al $LIST just to check what is in the list and if it looks good. And finally: [...]

[Read more →]

Tags: ·

Enable/Disable APC on virtual host level

March 18th, 2010 · 6 Comments · Performance, sysadmin, Tips and Tricks

APC (Alternative PHP Cache) is a free, open, and robust framework for caching and optimizing PHP intermediate code. APC is a great tool to speed up a php driven site and I can’t even think of a big site running on a php framework without an opcode cache (other good choices are eaccelerator or xcache). [...]

[Read more →]

Tags: ··

Using wildcards in nginx valid_referers

August 25th, 2009 · 3 Comments · HowTo, sysadmin, Tips and Tricks

This quick post will show how we can easily allow only certain http referrers see some location using nginx. This might be useful for example if you are using nginx as a static content provider and want to not allow everyone hot-linking your images and only your own sites. Doing something like this in nginx [...]

[Read more →]

Tags: ·

HowTO change the timezone on RHEL/CentOS

December 16th, 2008 · 4 Comments · Centos, CLI

Linux systems traditionally keep the definition of their timezone in /etc/localtime. This is a binary file with the timezone info, and if we want to change it we need to find the appropriate timezone file from /usr/share/zoneinfo and copy it over the one from /etc or just link to it. Once you change it, you [...]

[Read more →]

Tags: ··

vsftpd logging timestamp

December 9th, 2008 · 2 Comments · Centos, CLI, sysadmin

While investigating some ftp transfers issues we realized that there was something wrong with the logs generated by vsftpd. The timestamps reported in the vsftpd log were wrong, and the fact that they were always 5 hours behind the actual time made us think this was caused by a timezone issue. The system running this [...]

[Read more →]

Tags: ··