Heres a quick tip on removing blank lines and comments from a file using sed.

sed ‘/ *#/d; /^ *$/d’ file_with_blank_lines_and_comments.txt > new_file_without_blank_lines_and_comments.txt


By default, the syslog daemon will place –MARK– messages in your /var/log/messages log file every twenty minutes. This can get annoying and eventually lead to a waste of space. Heres a quick tip on how to stop syslog from putting –MARK– in the messages log.

  1. Edit the syslogd file. (In Ubuntu, this file is located in /etc/default/syslogd – on some other distributions, you’ll want to edit whatever file starts up the syslog daemon.)
  2. Locate the following line that starts with:


  3. Modify this line to read:

    SYSLOGD=”-m 0″

  4. Restart syslog:

    /etc/init.d/sysklogd restart


Need to find out what all the file types in a certain directory are? Simple!

Execute the following on the command line:

find /path/here/ -type f -print | xargs file

I typed: find /home/adam/test/ -type f -print | xargs file

The output will look something like this:

/home/adam/test/music.wav: RIFF (little-endian) data, WAVE audio, Microsoft PCM, 16 bit, mono 44100 Hz
/home/adam/test/package.deb: Debian binary package (format 2.0)
/home/adam/test/file.tar.gz: gzip compressed data, from Unix, last modified: Tue Jun 20 12:51:11 2006
/home/adam/test/widget.xml: ASCII text, with CRLF line terminators
/home/adam/test/logfile.txt: empty


Quickzi: How to Jail VSFTPD Users

If you’re worried about FTP users exploring outside of their home directory, you want to set up what is called a chroot jail.

To do this, open the /etc/vsftpd.conf file:

vim /etc/vsftpd.conf

and make the following modifications (line should be uncommented):


After you save the file, restart vsftpd:

/etc/init.d/vsftpd restart

Now all users will be jailed to their own home directory when using FTP.
Now, lets say you only want to jail certain users, and allow other users to browse other directories. To do this, you’ll want to again edit the configuration file.

vim /etc/vsftpd.conf

uncomment the following lines:


After you save the file, restart vsftpd:

/etc/init.d/vsftpd restart

Now you will need to create the /etc/vsftpd.chroot_list file and add in users you do NOT want to jail. By default, all users will be jailed. In the /etc/vsftpd.chroot_list file you can specify what users to allow to browse all directories.

Photoshop CS2 on Linux

If you’re tired of using GIMP to edit images, or you recently switched to Linux and still are stuck on using Adobe Photoshop, it’s still possible using Wine.

Check out this detailed guide on installing Photoshop CS2 on Linux with wine.

Howtoforge has a nice user submitted article explaining the steps it takes to install Linux, Apache, MySQL, and PHP (LAMP) on Ubuntu for beginners. The article includes installing apache, testing the apache install, installing PHP, testing the PHP install, and installing and configuring MySQL.

Check it out here.

Getting started with GRUB

Chad Files over at has a great introduction article on installing and configuring GRUB (the GRand Unified Bootloader).

Also included on the sidebar is how to boot from a USB drive using GRUB.

Go check it out!

Using Ntop on CentOS 4

ntop is a network traffic tool that shows network usage in a real time. One of the good things about this tool is that you can use a web browser to manage and navigate through ntop traffic information to better understand network status.

Ntop monitors and reports hosts traffic and supports these protocols:

  • (R)ARP
  • IPX
  • DLC
  • Decnet
  • AppleTalk
  • Netbios

In this tutorial we’ll install ntop 3.2 in CentOS 4.

HOWTO: Setup a Debian/Ubuntu LAMP Server

Build Your Own Debian/Ubuntu LAMP Server – Quick & Easy Do it Yourself Installation

This howto tutorial was written by Scott from

  • Apache 2 – Linux Web server
  • MySQL 5 – MySQL Database Server
  • PHP4/5 – PHP Scripting Language
  • phpMyAdmin – Web-based database admin software.

Note: Linux + Apache + MySQL + PHP/Perl together commonly known as LAMP Server.

Read the rest of this entry

Understand Cron Jobs In 5 Minutes

In Linux, the crontab command is used to schedule execution of commands at certain time intervals whether it be hourly, daily, monthly or every x amount of minutes. This article is designed to show you the simple way of understanding crontab. Read the rest of this entry