Skip to content

Include option to be used with -f <file> to accept null-character (zero byte) delimiting for file names. #416

Description

@aghsmith

hashdeep can accept a list of files to be hashed, which can be very useful given its otherwise limited file selection ability.

I have used it with an invocation like:
hashdeep -c md5 -f <(find . -type f )
together with some other filters for find, which in the most part works. However files in Unix like file systems can have \r and \n (carriage-return and line-feed) characters in their names.

Hashdeep is too simple in accepting only line separations as the file name delimiters with the -f option.

A file like:
touch filename$'\r'
cannot be accepted though hashdeep if received through find like this, though hashdeep can handle the file on its own without receiving the file list through an external file list..

Find has an option though to zero separate file names:
find . -type f -print0

Currently hashdeep is unable to process this (unless there is only one file in the list)

It seems like this would be a fairly easy feature to develop and would be very helpful for handling the edge-cases with -f <file>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions