Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature suggestion : allow files filtering when used with -recursive #30

Open
PaulRivier opened this issue Mar 9, 2025 · 0 comments
Open

Comments

@PaulRivier
Copy link

PaulRivier commented Mar 9, 2025

Hi,

thank you very much for cshatag.

I would like to use it for my significant files, while avoiding the overhead (CPU, IO, time, space) of checking thousands of non-significant files for which a silent data corruption would be mostly without consequences. An analogy can be made with what backup software usually provide, or what git and .gitignore provide, where a set of patterns allows to include or exclude files. On this topic, restic backup is also written in Go, and have some nice filtering/inclusion/exclusion features.

I could do some hacks with 'find' and 'xargs' to have a 'cshatag' exec call on each eligible file, but that would slow down execution.

Would you consider adding some support for more fine-grain inclusion than whole directory content ? Maybe the most direct way to implement this would be to accept a file as input, either parameter or stdin, with 1 line per file-path to process, and then just loop over it ?

What do you think ?

Regards,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant