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

adding --exclude option? #9

Closed
xbeta opened this issue Jul 23, 2014 · 8 comments
Closed

adding --exclude option? #9

xbeta opened this issue Jul 23, 2014 · 8 comments
Labels
done The issue is fixed/applied/implemented FR

Comments

@xbeta
Copy link

xbeta commented Jul 23, 2014

Hello all,

Read the manual, but didn't see this option. I believe it wasn't designed, but I could be missing something.
I'm not sure if this is already being implemented and/or in-plan for doing so, but I would like to request to have this feature added.

Thanks,

@xbeta xbeta changed the title adding --exclude ability? adding --exclude option? Jul 23, 2014
@rhash
Copy link
Owner

rhash commented Jul 24, 2014

Does the --accept option is really not enough? I need a reason to add the feature.

Also some things shall be resolved.

  1. The --exclude option can be implimented like --accept in very dumb way - it will take a list of comma delimited file suffixes (extensions). RHash currently doesn't supports file masks or regex'es for simplicity and portability reasons.
  2. If a user specify both --accept and --exlude options than the exlude should apply after accept.
  3. RHash has separate --accept-crc option for the --check mode, so it look that somebody will ask for an --exclude-crc.

@xbeta
Copy link
Author

xbeta commented Jul 25, 2014

@rhash I have an unknown number of files/folders to traverse and they are outside of my control on how they were updated, but I do have only 1 file that I know for sure that I want to exclude. So I think there's a valid use case for it.

@rhash
Copy link
Owner

rhash commented Jul 26, 2014

Ok, it's a good reason. I've put the feature request into the todo list.

Just to note, it's better to ask for features on the sourceforge project page to keep them in one place.

@rhash
Copy link
Owner

rhash commented Aug 5, 2014

The --exclude option is now supported in Rhash v1.3.3.

@rhash rhash closed this as completed Aug 5, 2014
@xbeta
Copy link
Author

xbeta commented Aug 6, 2014

@rhash thanks man, will test it out!

@kvz
Copy link

kvz commented Mar 2, 2017

I just tested this and it works in v1.3.3, but it's not in the --help yet, just a friendly tip:

$ rhash --version && rhash --help |grep ex
RHash v1.3.3
  -V, --version Print program version and exit.

@newhoa
Copy link

newhoa commented Jan 24, 2018

Is there any way to get --exclude to allow excluding listed directories? When hashing in recursive mode sometimes there may be certain time-consuming but irrelevant subdirectories you'd like to ignore. Thanks.

@rhash
Copy link
Owner

rhash commented Jan 24, 2018

@newhoa the --exclude option works only for files, for excluding directories you should apply shell script magic using find/grep/xargs e.t.c.

@rhash rhash added done The issue is fixed/applied/implemented FR labels Jul 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
done The issue is fixed/applied/implemented FR
Projects
None yet
Development

No branches or pull requests

4 participants