Articles Home

Quickie: Batch Renaming Files in Linux

Quick and easy way to rename files

For those wanting to be able to quickly and efficiently rename a bunch of files all at once, below is some example code to help you achieve that:ls *.xml | sed 's/\(testing\)\(.*\)/mv \1\2 production\2/' | shThe first piece ls *.xml simply lists the file types we want to change. You can, of cours...

quickie, linux, bash

Quickie: Data Mining on the Web with Perl

An extremely basic example of grabbing some data

This is a simple web mining script using perl.#!/usr/bin/perluse LWP::Simple;$numPages=$ARGV[0];open OUTPUT,">/home/user/out.html";for($i=1;$i<=$numPages;$i++){print $i."\n";        $content=get("".$i);        print OUTPUT $content;        print OUTPUT "*****...

perl, quickie, scripting, linux

Quickie: Deleting Old Files

Removing old files from Linux the fun way

Many people have the need to delete files older than a certain range. For instance, you may want to remove all podcasts that are older than a certain time period or delete other files that you receive regularly. Making use of the find command and mtime, you are able to delete them with ease.find ...

quickie, linux