E.g. the autotrash would do perfectly if it wasn't bound to monitor trash folders only.
Asked
Active
Viewed 523 times
-1
-
This question seems valid to me. – franck Jun 02 '14 at 06:46
2 Answers
1
Why not use autotrash
and tell it which directory to keep in shape by telling it that directory is the trash with the -T
option? Just because it's called a" trash" directory doesn't mean you have to use it only on directories that GNOME thinks are trash directories...

John
- 9,070
- 1
- 29
- 34
-
Because by «bound to monitor trash folders only» I meant exactly that. `# autotrash --dry-run --delete=102400 --max-free=102400 -T /mydir Can not find trash information directory. Make sure you have at least GNOME 2.24 I was looking at: /mydir/info` – Alexander Gonchiy May 02 '14 at 08:18
0
It is relatively easy to write such an application: - When it initializes put an inotify hook on the folder to see what changes inside it and on all existing files. - Initialize a queue of files (basically read them sorted by creation or modification date and add them to the queue). - Whenever a file is created/modified/etc, make the necessary action (move it to the end of the queue, delete the first one etc).

Florin Asăvoaie
- 7,057
- 23
- 35