Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
mfstrashretention(1)	     This is part of MooseFS	    mfstrashretention(1)

NAME
     mfstrashretention - MooseFS trash retention management tools

SYNOPSIS
     mfsgettrashretention [-?] [-r] [-n|-h|-H|-k|-m|-g] OBJECT...

     mfssettrashretention [-?] [-r] [-n|-h|-H|-k|-m|-g] TIME[+|-] OBJECT...

     mfscopytrashretention [-?] [-r] [-n|-h|-H|-k|-m|-g] SOURCE_OBJECT OBJECT...

DESCRIPTION
     These tools operate on a filesystem object's (file, special file, or direc-
     tory) trash retention value, i.e. the time the file is preserved in special
     trash  directory  before it's finally removed from filesystem. Trash reten-
     tion must be a non-negative integer value.

     mfsgettrashretention prints current trash	retention  value  of  given  ob-
     ject(s).  -r  option enables recursive mode, which works as usual for every
     given file, but for every given directory additionally prints current trash
     retention value of all contained objects (files and directories).

     mfssettrashretention changes current trash retention  value  of  given  ob-
     ject(s).  If new value is specified in TIME+ form, trash retention value is
     increased to TIME for objects with lower  trash  retention  value	and  un-
     changed  for the rest. Similarly, if new value is specified as TIME-, trash
     retention value is decreased to TIME for objects with higher  trash  reten-
     tion  value  and  unchanged for the rest. -r option enables recursive mode.
     These tools can be used on any file, directory or deleted (trash) file.

     mfscopytrashretention tool can be used to copy trash retention  value  from
     one object to another.

     TIME parameter is specified as a general time type value, with minimum unit
     being  hours  and with an additional possibility of adding a + or - sign at
     the end; for details about time format see TIME

OPTIONS
     Most MooseFS tools use -n, -h, -H, -k, -m and -g options to  select  format
     of  printed  numbers. -n causes to print exact numbers, -h uses binary pre-
     fixes (Ki, Mi, Gi as 2^10, 2^20 etc.) while -H uses SI prefixes (k, M, G as
     10^3, 10^6 etc.). -k, -m and -g show plain numbers  respectivaly  in  kibis
     (binary kilo - 1024), mebis (binary mega - 1024^2) and gibis (binary giga -
     1024^3).  The same can be achieved by setting MFSHRFORMAT environment vari-
     able to: 0 (exact numbers), 1 or h (binary prefixes), 2 or H (SI prefixes),
     3 or h+ (exact numbers and binary prefixes), 4 or H+ (exact numbers and  SI
     prefixes). The default is to print just exact numbers.

     Option -? displays short usage message.

NOTES
   TIME
     For  time	variables  their  value can be defined as a number of seconds or
     hours (integer), depending on minimum unit of the variable, or  as  a  time
     period in one of two possible formats:

     first format: #.#T where T is one of: s-seconds, m-minutes, h-hours, d-days
     or w-weeks; fractions of minimum unit will be rounded to integer value

     second  format:  #w#d#h#m#s,  any number of definitions can be omitted, but
     the remaining definitions must be in order (so #d#m is still a valid defin-
     ition, but #m#d is not); ranges: s,m: 0 to 59, h: 0 to 23, d: 0 t o 6, w is
     unlimited and the first definition  is  also  always  unlimited  (i.e.  for
     #d#h#m d will be unlimited)

     If  a  minimum  unit  of a variable is larger than seconds, units below the
     minimum one will not be accepted. For example, a variable that has hours as
     a minimum unit will not accept s and m units.

     Examples:

     1.5d is the same as 1d12h, is the same as 36h

     2.5w is the same as 2w3d12h, is the same as 420h; 2w84h is not a valid time
     period (h is not the first definition, so it is bound by range 0 to 23)

   INHERITANCE
     When a new object is created in MooseFS, trash retention is inherited  from
     the  parent  directory.  A newly created object inherits always the current
     value of its parent's trash retention. Changing a directory's trash  reten-
     tion  does  not affect its already created children. To change trash reten-
     tion for a directory and all of its children use -r option.

REPORTING BUGS
     Report bugs to <bugs@moosefs.com>.

COPYRIGHT
     Copyright (C) 2026 Jakub Kruszona-Zawadzki, Saglabs SA

     This file is part of MooseFS.

     MooseFS is free software; you can redistribute it and/or  modify  it  under
     the  terms of the GNU General Public License as published by the Free Soft-
     ware Foundation, version 2 (only).

     MooseFS is distributed in the hope that it will be useful, but WITHOUT  ANY
     WARRANTY;	without  even the implied warranty of MERCHANTABILITY or FITNESS
     FOR A PARTICULAR PURPOSE. See the GNU General Public License for  more  de-
     tails.

     You  should  have	received  a copy of the GNU General Public License along
     with this program; if not, see <https://www.gnu.org/licenses/>.

SEE ALSO
     mfsmount(8), mfstools(1)

MooseFS 4.59.1-1		    May 2026		    mfstrashretention(1)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=mfsgettrashretention&sektion=1&manpath=FreeBSD+Ports+15.1.quarterly>

home | help