STRASH(8)

NAME
strash - strip files from libtrash trash cans

SYNOPSIS
strash LIMIT [OPTION]...

DESCRIPTION
strash is a Bourne shell script for use with libtrash by Manuel Arriaga (http://www.m-arriaga.net/software/libtrash/). It will enforce age, number or size limits on libtrash trash cans so they won't eventually fill your storage space. It is meant to be run by root on a regular basis.

LIMIT
In the following parameters, files exactly matching <limit> are excluded and won't be removed.

--age <limit>, -A <limit>
    Restrict the age of files to <limit>. A time unit can be specified, the default being seconds:
      s: seconds
      m: minutes
      h: hours
      d: days
      M: months
      Y: years

--filesize <limit>, -F <limit>
    Restrict the size of files to <limit>. By default, the biggest files are removed first. A size unit can be specified, the default being bytes:
      b: bytes
      k: kilobytes
      M: megabytes
      G: gigabytes

--number <limit>, -N <limit>
    Restrict the number of files in trash cans to <limit>.

--size <limit>, -S <limit>
    Restrict the size of trash cans to <limit>. A size unit can be specified, the default being bytes.
      b: bytes
      k: kilobytes
      M: megabytes
      G: gigabytes

FILE SORTING OPTIONS
By default, files are removed in the same order in which they were added to the trash can. strash uses a history file located in each user's home directory to achieve that. This behavior can be changed with the following options.

--sort=biggest, -b
    Remove the biggest files first.

--sort=smallest, -s
    Remove the smallest files first.

--sort=oldest, -o
    Remove the oldest files first. By default, the last modification time is used to sort the files.

--time=atime, --time=access, --time=use, -a
    When removing the oldest files first, use the last access time to sort the files.

--time=ctime, --time=status, -c
    When removing the oldest files first, use the last status change time to sort the files.

GENERAL OPTIONS

--du, -d
    Use du to compute the trash can size. By default, the trash can size is the sum of all file sizes. If you run du on a trash directory, it may report a size bigger than the limit you specified, because it rounds sizes up and adds directory sizes. If you want du to report that the limit is not exceeded, use this option. This may significantly slow down strash.

--print, -p
    Print the name of the files that should be removed. Do not remove them.

--si, -H
    Use the official SI units, with powers of 1000 instead of 1024.

--user <user>, -u <user>
    Strip <user>'s trash can. This option can be specified more than once. If it is not specified, strash strips all trash cans.

VERBOSITY OPTIONS

--quiet, -q
    Do not output anything (except the name of the files that should be removed if --print is specified).

--verbose, -v
    Be verbose.

GNU STANDARD OPTIONS

--help, -h
    Print a usage message on standard output and exit successfully.

--version, -V
    Print version information on standard output, then exit successfully.

--  Terminate option list.

EXAMPLES
To remove files deleted over one month ago:
    strash --age 1M
To remove all zero files:
    strash --filesize 1 --sort=smallest
To restrict the number of files in trash cans to 10000, removing files with oldest access time first:
    strash --number 10000 --sort=oldest --time=atime
To restrict john's trash can size to 64,000,000 bytes:
    strash --size 64M --si --user john
To restrict trash can sizes to 64MB, as shown by du:
    strash --size 64M --du

FILES

/etc/libtrash.conf
    Libtrash configuration file.

$HOME/.strash
    History file for each user.

BUGS
Please report bugs to <strash@connes.org>.

AUTHOR
Written by Frederic Connes <fred@connes.org>.

COPYRIGHT
Copyright (C) 2003 Frederic Connes. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE, to the extent permitted by law.