FASTRM (1)
quickly remove a set of files
SYNOPSIS
fastrm
[
-d
]
[
-e
]
[
-u N
]
[
-s M
]
[
-c I
]
base_directory
DESCRIPTION
Fastrm
reads a list of files or a list of article tokens, one per line,
from its standard input and removes them.
If a file is not an absolute pathname, it is taken relative to the directory
specified on the command line.
The
base_directory
parameter must be a simple absolute pathname that is, it must not
contain any ``/./'' or ``/../'' references.
Fastrm
is designed to be faster than the typical ``|\ xargs\ rm'' pipeline.
For example,
fastrm
will usually
chdir (2)
into a directory before removing files from it.
If the input is sorted, this means that most files to be removed will
be simple names.
Fastrm
assumes that its input is valid and that it is safe to just do an
unlink (2)
call for each item to be removed.
As a safety measure, if
fastrm
is run by root it will first
stat (2)
the item to make sure that it is not a directory before unlinking it.
OPTIONS
-d
If the ``-d'' flag is used then no files are removed.
Instead a list of the files to be removed, in debug form, is printed
on the standard output.
Each line contains either the current directory of
fastrm
at the time it would do the unlink, and then the path name it
would pass to
unlink (2)
as two fields separated by white space and a ``/'', or
the absolute path name (a single field) of files it would unlink
using the absolute path name.
-e
If the ``-e'' flag is used,
fastrm
will treat an empty input file (stdin) as an error.
This is most useful when
fastrm
is last in a pipeline after a preceding
sort (1)
as if the sort fails, there will usually be no output to become
input of
fastrm .
-u
If the ``-u'' flag is used, then
fastrm
makes further assumptions about its work environment; in particular, that
there are no symbolic links in the target tree.
This flag also suggests that it is probably faster to reference the path
``../../../''
|
|