keep - a program that keeps the files you tell it to and deletes everything else in the current directory.
keep [OPTION]... FILE...
Sometimes you find yourself in a situation where the list of files in a directory that you want to keep is shorter than the list of files you want to delete. keep is a program designed for just such an occasion.
As an example, say that you have a directory containing:
banana kiwi strawberry grapefruit melon cumquat coconut pineapple
Now, you want to delete every file in the directory except kiwi, coconut, and melon. Traditionally, you would use a command similar to the following:
$ rm banana strawberry grapefruit cumquat pineapple
Here is the alternative, using the keep command:
$ keep kiwi coconut melon
As you can see, that is much easier and more logical in a situation like this.
This example demonstrates basic operation of keep.
canada mexico russia england germany france poland
$ keep germany poland
Like all other UNIX commands, you can pass wildcards to keep.
chicago chicken cow cheese
$ keep chic*
keep also allows you to to keep nothing, or in other words delete everything in the current directory. The following command is identical to rm -f *:
$ keep -f
SourceForge.net project page
Please refer to the README for detailed installation instructions.
Binary RPM Package
Source RPM Package
keep currently does not work with directories. Error checking is very bad. Not very many options supported yet.
Darren L. LaChausse - firstname.lastname@example.org
Copyright (c) 2004, Darren L. LaChausse - ALL RIGHTS RESERVED