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

Scanning list of directories? #130

harryjmoss opened this issue Jul 8, 2019 · 2 comments


Copy link

commented Jul 8, 2019

I'm trying to pass a newline-separated list of directories to siegfried with the -f flag, but obviously run into the error:

file is of type directory; only regular files can be scanned

I can get around this for input lists with a few directories by piping the contents of the file to stdout, but this becomes unwieldy when the number of directories in the list approaches a few hundred - eventually I would like to profile the contents of around 10000 directories. Is there some functionality I'm missing where passing a list of directories in this way is possible or could this be added? Thanks!


This comment has been minimized.

Copy link

commented Jul 8, 2019

thanks for posting this Harry. Let me have a think about this one & whether would be desirable to add as a new feature. Rather than pipe the file contents to stdout, which would have the undesirable effect of re-running the sf executable repeatedly, you could pipe the the list of filenames instead. I.e. you can do find . | sf -f - (now sf is running once but streaming a list of file names from the file command). So perhaps a command like: find $(cat my_list.txt) -type f | sf -f - would do the trick??


This comment has been minimized.

Copy link

commented Jul 10, 2019

Thanks for the quick reply! find $(cat my_list.txt) -type f | sf -f - definitely seems to work for this purpose and I'll use this going forward. My only hesitation was if this approach would still hold once the number of directories in the input files becomes more than a few hundred, or whether I'll be hit with an 'argument list too long' error (or similar). I had another thought that passing a list of directories might be useful for producing a DROID-style report that shows parent directories etc.

@richardlehane richardlehane self-assigned this Jul 28, 2019

@richardlehane richardlehane added this to the 1.7.13 milestone Jul 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.