#!/bin/sh find ... -print find ... -print find ... -print find ... -print #### #!/usr/bin/perl use strict; use warnings; use POSIX qw( strftime ); my $ts = strftime('[%Y/%m/%d %H:%M:%S]', localtime()); while (<>) { chomp; if (unlink()) { print("$ts Deleted $file\n"); } else { print("$ts Failed to delete $file\n"); } } #### old_files | unlink_and_log > unlink.log