Removing files from server?

assuming you have php on the server...

just create a php script?

read the text file with all the filenames in, then a simple loop to delete() them
 


You have a full-time job, right?

Does your boss know you've been trying to delete files for 11 days now?
 
Depending on the filenames you might be able to do it without a shell script..

If all of the names match a pattern you can do something like. just use * as a wildcard and you can do all sorts of pattern matching.

ls files/*/*.jpg

once you get the pattern right and it only shows files you want to delete change the ls to 'rm' and it will delete them.

You can also use something like files/**/*.jpg to delete down through multiple levels of child directories
 
PHP:
<?
 
function unlinkRecursive($dir, $deleteRootToo) {
    if(!$dh = @opendir($dir)) {
        return;
    }
    
    while (false !== ($obj = readdir($dh))) {
        if($obj == '.' || $obj == '..') {
            continue;
        }

        if (!@unlink($dir . '/' . $obj)) {
            unlinkRecursive($dir.'/'.$obj, true);
        }
    }

    closedir($dh);
   
    if ($deleteRootToo) {
        @rmdir($dir);
    }
   
    return;
}

$tempdir = "/var/www/foldername/";

unlinkRecursive($tempdir, false);
echo "cleaned up $tempdir<br \>\n";

?>

deletes everything (including files and subfolders) for the $tempdir locations you enter. Just save this as a php file then set up a cron to call it daily and clean up after yourself so you'll never be in this position again.

I had a problem YEARS ago with leftover trash from cron jobs that had a folder filled up literally 10's of 1000's of files. FTP deleting would have taken days of SWIM's life
 
Thanks for the other options that were put forward. But again, I'm really trying to figure out why Putty won't accept more than a few lines in a single command. I'd like to get this resolved asap.
 
Thanks for the other options that were put forward. But again, I'm really trying to figure out why Putty won't accept more than a few lines in a single command. I'd like to get this resolved asap.

In the terminal, type :
echo $SHELL

and post what it says