[GH-ISSUE #340] Filter by file age #156

Closed
opened 2026-06-08 11:25:54 +03:00 by zhus · 5 comments
Owner

Originally created by @MolbioUnige on GitHub (Oct 31, 2023).
Original GitHub issue: https://github.com/bootandy/dust/issues/340

I am looking for a way to take in account only files that are older then a given value. Would that be possible to implement?

In my institue, people are making experiments that weight a few terabytes each. People are required to remove their data once their treatment is completed, but some tend to forget. So, I'd like to find a way to find who is sitting on old stuff and thus preventing other users to use the servers.

Originally created by @MolbioUnige on GitHub (Oct 31, 2023). Original GitHub issue: https://github.com/bootandy/dust/issues/340 I am looking for a way to take in account only files that are older then a given value. Would that be possible to implement? In my institue, people are making experiments that weight a few terabytes each. People are required to remove their data once their treatment is completed, but some tend to forget. So, I'd like to find a way to find who is sitting on old stuff and thus preventing other users to use the servers.
zhus closed this issue 2026-06-08 11:25:54 +03:00
Author
Owner

@bootandy commented on GitHub (Nov 7, 2023):

That is an interesting idea,

It should be possible to implement. I'll leave this issue open

<!-- gh-comment-id:1796887137 --> @bootandy commented on GitHub (Nov 7, 2023): That is an interesting idea, It should be possible to implement. I'll leave this issue open
Author
Owner

@smf8 commented on GitHub (May 10, 2024):

Hi, As I've last checked with the master branch. This hasn't been implemented yet and I'm interested in helping out if that's OK.
I'm fairly new to Rust and so I apologize beforehand but I've got a couple of questions.

  • Should this filtering happen in file walking stage? (like in ignore_file which takes some filtering (e.g. regex) into account)

  • Or is it better to apply it when extracting DisplayNode from Nodes?

I think the latter might be more beneficial since It can also address #385 by building the heap based on age instead of size.

<!-- gh-comment-id:2104162488 --> @smf8 commented on GitHub (May 10, 2024): Hi, As I've last checked with the master branch. This hasn't been implemented yet and I'm interested in helping out if that's OK. I'm fairly new to Rust and so I apologize beforehand but I've got a couple of questions. - Should this filtering happen in file walking stage? (like in `ignore_file` which takes some filtering (e.g. regex) into account) - Or is it better to apply it when extracting `DisplayNode` from `Node`s? I think the latter might be more beneficial since It can also address #385 by building the `heap` based on `age` instead of `size`.
Author
Owner

@bootandy commented on GitHub (May 11, 2024):

That's a good question.

In this case with a hard limit I would say: this filtering happen in file walking stage (probably).

However it might be fun to try it both ways.

For https://github.com/bootandy/dust/issues/385 however it would probably come from when: extracting DisplayNode from Nodes. Even thought the tasks sound similar they might not be in code.

I'm not sure of the above myself yet though, so I may well change my mind!

<!-- gh-comment-id:2105658899 --> @bootandy commented on GitHub (May 11, 2024): That's a good question. In this case with a hard limit I would say: this filtering happen in file walking stage (probably). However it might be fun to try it both ways. For https://github.com/bootandy/dust/issues/385 however it would probably come from when: extracting DisplayNode from Nodes. Even thought the tasks sound similar they might not be in code. I'm not sure of the above myself yet though, so I may well change my mind!
Author
Owner

@wugeer commented on GitHub (May 16, 2024):

Hello, I'm fairly new to Rust and so I apologize beforehand but I've got a couple of questions. I am trying to deal with this problem, but I encountered a problem

  • how to filter according to the time corresponding to the input, is it to filter the files of those days according to the sign of the input integer value like Linux find, or is it to input What about a format like --mtime '+2023-10-04 05:34:00'? Or what about epoch-based time like --mtime +1695276503?

In other words, is it better to use relative time, absolute time, or epoch-based time as input?

<!-- gh-comment-id:2113742093 --> @wugeer commented on GitHub (May 16, 2024): Hello, I'm fairly new to Rust and so I apologize beforehand but I've got a couple of questions. I am trying to deal with this problem, but I encountered a problem - how to filter according to the time corresponding to the input, is it to filter the files of those days according to the sign of the input integer value like Linux find, or is it to input What about a format like --mtime '+2023-10-04 05:34:00'? Or what about epoch-based time like --mtime +1695276503? In other words, is it better to use relative time, absolute time, or epoch-based time as input?
Author
Owner

@codeswhite commented on GitHub (May 27, 2024):

Hey, I had an idea,

Consider supporting suffix-parsing for the duration for example:

  • 30s for 30 seconds
  • 5m for 5 minutes
  • 2h for 2 hours
  • and maybe even 2day4hours

This way it will be much more intuitive and powerful.

<!-- gh-comment-id:2132413133 --> @codeswhite commented on GitHub (May 27, 2024): Hey, I had an idea, Consider supporting suffix-parsing for the duration for example: - `30s` for 30 seconds - `5m` for 5 minutes - `2h` for 2 hours - and maybe even `2day4hours` This way it will be much more intuitive and powerful.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: bootandy/archived-dust#156