Archive for March, 2006

Calculating disk space

March 13, 2006

Frequently I need to check the space of user folders on our file server. The easiest way to do that is to use the du command (Disk Usage). I change directory to the parent folder and then run du with the -d (depth) flag to summarize one level deep.

cd /userhomeshare
du -kd1

You can use that with a pipe or redirect
du -kd1 >> file.txt
du -kd1 | mail chris@mydomain.com

Update – if you want to check the size of everyone’s movie directory:
du -kd0 -h /userhomepath/*/Movies

Installing Drupal

March 8, 2006

Drupal is an excellent open source content management system.

Once you have a linux install with Apache, PHP, and MySQL installing drupal is a breeze.
Refer to this post for an easy installation of Fedora Core 4.

  1. Setup MySQL:
    mysqladmin -u root password new-password
    chkconfig –levels 235 mysqld on
  2. Setup Apache:
    chkconfig –levels 235 httpd on
    vi /etc/httpd/conf/httpd.conf
    -> Change Allow Override None to Allow Override All
    -> Add index.php as first entry under DirectoryIndex
  3. Install drupal – follow these instructions
  4. Create files subdirectory:
    cd drupal_install_dir
    mkdir files
    chown root:apache files/
    chmod 775 files/
  5. Install GD:
    yum install php-gd
  6. Finally restart apache: apachectl graceful

Installing Fedora Core 4

March 8, 2006

This is a very good FAQ regarding installation of Fedora Core 4:
The Perfect Setup – Fedora Core 4
In addition to the standard server install, I chose the following packages:
Server Configuration Tools (all)
Web Server (all)
Mail Server (all)
MySQL Database (all)
Development Tools (Standard)
Administration Tools (all)

Epic 2014

March 6, 2006

I was at the IL-TCE conference on Friday and went to a session by David Warlick called Right & Wrong on the Information Highway.

He showed a clip that was a generated a good discussion regarding how trustworthy information found on the internet is now and in the future.

Check it out:
Epic 2014

Sending email attachments through the terminal

March 1, 2006

In restoring a file from our backup machine to a user – I found the easiest way is just to email the file to the user through the terminal.  However since it was a word document it needed to be encoded.  This worked beautifully:

uuencode FILENAME FILENAME | mail -s SUBJECT RECIPIENT