mfstrashtime(1)
π mfstrashtime(1) β MooseFS trash time (retention) management tools π
okay bestie, welcome to the page for mfstrashtime β it's part of MooseFS and it's literally the whole β¨trash retentionβ¨ friend group. five little tools, one shared obsession: how long does your deleted stuff sit in the trash before it's gone gone. let's go π«Ά
β¨ SYNOPSIS β¨
mfsgettrashtime [-r] [-n|-h|-H|-k|-m|-g] OBJECT...
mfssettrashtime [-r] [-n|-h|-H|-k|-m|-g] SECONDS[+|-] OBJECT...
mfscopytrashtime [-r] [-n|-h|-H|-k|-m|-g] SOURCE_OBJECT OBJECT...
mfsrgettrashtime [-n|-h|-H|-k|-m|-g] OBJECT...
mfsrsettrashtime [-n|-h|-H|-k|-m|-g] SECONDS[+|-] OBJECT...
πΈ DESCRIPTION πΈ
so these tools all mess with an object's trashtime value, which is the number of seconds the file is preserved in the special trash directory before it's finally removed from the filesystem. and no, you cannot be cute about it β trashtime must be a non-negative integer value. periodt π
mfsgettrashtime prints the current trashtime value of whatever object(s) you hand it. the -r option turns on recursive mode, which does the usual thing for every file you give it, but for every directory you give it, it additionally prints the current trashtime value of all contained objects (files and directories, both of them, no crumbs left behind). π
mfssettrashtime changes the current trashtime value of the object(s) you give it. here's the lil plot twist:
- if the new value comes in as
SECONDS+, the trashtime is increased toSECONDSfor objects with a lower trashtime value, and left unchanged for everyone else. - if the new value comes in as
SECONDS-, the trashtime is decreased toSECONDSfor objects with a higher trashtime value, and left unchanged for everyone else.
the -r option enables recursive mode. and listen β these tools can be used on any file, directory or deleted (trash) file. the versatility?? unmatched fr fr π
mfscopytrashtime does exactly what it says on the tin: it copies the trashtime value from one object to another. no drama, just vibes. π¦
mfsrgettrashtime and mfsrsettrashtime are deprecated aliases for mfsgettrashtime -r and mfssettrashtime -r respectively. love them, but they're lowkey retired, okay? π
π PRECISION π
since version 3.0 of MooseFS, trashtime is stored in the system as the number of hours the file is preserved in the trash directory. so if you give a value in seconds, it gets rounded up to hours. that's it, that's the whole section β math girlies stay winning π§
β¨ GENERAL OPTIONS β¨
most of the mfstools use -n, -h, -H, -k, -m and -g to pick how printed numbers look. it's giving number-formatting runway. π
-nβ prints exact numbers. no rounding, no games.-hβ uses binary prefixes (Ki,Mi,Gias 2^10, 2^20 etc.).-Hβ uses SI prefixes (k,M,Gas 10^3, 10^6 etc.).-kβ shows plain numbers respectively in kibis (binary kilo β 1024).-mβ shows plain numbers respectively in mebis (binary mega β 1024^2).-gβ shows plain numbers respectively in gibis (binary giga β 1024^3).
and you can get the exact same energy by setting the MFSHRFORMAT environment variable instead:
0β exact numbers1orhβ binary prefixes2orHβ SI prefixes3orh+β exact numbers and binary prefixes4orH+β exact numbers and SI prefixes
the default is to print just exact numbers. that's the baseline. the factory setting. the no-makeup look. β¨
π¦ INHERITANCE π¦
when a new object gets created in MooseFS, attributes like storage class, trashtime and extra attributes are inherited from the parent directory. so if you set, i.e., the "noowner" attribute and storage class to "important" in a directory, then every new object created in that directory will have storage class set to "important" and the "noowner" flag set. a newly created object always inherits the current set of its parent's attributes. π
but here's the part that catches people β changing a directory attribute does not affect its already created children. the past is the past, bestie π to change an attribute for a directory and all of its children, use the -r option. that's the only way to make it travel down the family tree. π
π REPORTING BUGS π
report bugs to <bugs@moosefs.com>. tell them everything, they want the tea. π
π COPYRIGHT π
Copyright (C) 2023 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 Software Foundation, version 2 (only). yes, only. don't get creative. π
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 details.
You should have received a copy of the GNU General Public License along with MooseFS; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02111-1301, USA or visit http://www.gnu.org/licenses/gpl-2.0.html
π SEE ALSO π
and that's the whole page, bestie β this was MooseFS 3.0.117-1, dated February 2023. go forth and manage your trash retention like the icon you are π β¨ππ¦
π¦ where this page comes from
- debian bookworm: moosefs-client 3.0.117-1 Β· GPL-2.0-only
- ubuntu noble: moosefs-client 3.0.117-1.1build2 Β· GPL-2.0-only
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms