Code Monkey home page Code Monkey logo

Comments (5)

boyter avatar boyter commented on August 20, 2024

Going to hazard a guess this is mostly due to Windows. If you do it without the progress option-p do you observe the same issue?

from hashit.

sergeevabc avatar sergeevabc commented on August 20, 2024

It seems Hashit does not play well with find so far, at least on Windows. I tried two implementations of find, Busybox and GNU. However, fd alternative to find brings relief in this case, but the progress lines look inconsistent nonetheless.

$ fd -g *.jpg -tf -x hashit.exe -p -c sha256 -f sum --threads 1 {}
47886ba3775621d68b5cfdf8359cbcbc7bcf5262e0951e2294acf1abf569b068  thumbs.jpg
[--------------------------------------------------------------------] file: DSC_6947.jpg
3bb846235a4e05cf98fca6a03e0dc4386439380120e8b41e94609e0ef349047c  DSC_6947.jpg
[====================================================================] file: DSC_6953.jpg
[--------------------------------------------------------------------] file: DSC_6943.jpg
a36dccefb15ea3b5b4aa1cdbeba92c84199b733f819254f50173aac6680f4cca  DSC_6943.jpg
[====================================================================] file: DSC_6945.jpg
d8dfe67de359bc31c387190649e597bcbd8c925e0236fe941c15d37266b209ac  DSC_6945.jpg
[====================================================================] file: DSC_6942.jpg
a7f1cec92875241241f6adba18158a3d5d74eaf34d5bcb3d3db9d0c7a30e221e  DSC_6942.jpg
ddc5c5b1e63cf54641965e32f54d463d5f442f05b3b08a91a8f255e5cb4bae21  DSC_6923.jpg
[====================================================================] file: DSC_6901.jpg
3b2edfe7631698caf334a62c1599f6063e76c4563df08f5786c0f12448569f85  DSC_6901.jpg

Now, if I remove -p flag, then…

$ find.exe *.jpg -type f -exec hashit.exe -c sha256 -f sum --threads 1 {} +
83389d6b6e7df07a5ffbf481dba7694823124d121b490d4431854fa99bcd109d  DSC_6894.jpg

885a08e3059923ddb422ffae023e1419c4a11b9d29f9067f0fa9dc698eeebc00  DSC_6895.jpg

6c1f5eb44a8ab658c3f0f8966b662bcd1515d44098fb8811e76f7db30814f089  DSC_6896.jpg

be84c656e1a3bbfcfafb3dc57e0dc4f62e8a84013fc491cb5a16122a58a986ce  DSC_6897.jpg

115b12d3489dcca23ea52218a1ce20431f442783e47f0ba68ab9b3515b30be6e  DSC_6898.jpg

ced3fa196f8f3853f09a538257c053c1626fe6ebb4fd1c8be52c5e7d825b80d6  DSC_6899.jpg

371f71bd7937609b9a6bb472cef100eb80668e68b8f27707ca57cfd565da064e  DSC_6900.jpg

3b2edfe7631698caf334a62c1599f6063e76c4563df08f5786c0f12448569f85  DSC_6901.jpg

$ fd -g *.jpg -tf -x hashit.exe -c sha256 -f sum --threads 1 {}
47886ba3775621d68b5cfdf8359cbcbc7bcf5262e0951e2294acf1abf569b068  thumbs.jpg
3bb846235a4e05cf98fca6a03e0dc4386439380120e8b41e94609e0ef349047c  DSC_6947.jpg
e617921da54ff734db3b8177f5739fc43f5ee5905017d79521331279e33372f7  DSC_6953.jpg
a36dccefb15ea3b5b4aa1cdbeba92c84199b733f819254f50173aac6680f4cca  DSC_6943.jpg
d8dfe67de359bc31c387190649e597bcbd8c925e0236fe941c15d37266b209ac  DSC_6945.jpg
3b2edfe7631698caf334a62c1599f6063e76c4563df08f5786c0f12448569f85  DSC_6901.jpg
a7f1cec92875241241f6adba18158a3d5d74eaf34d5bcb3d3db9d0c7a30e221e  DSC_6942.jpg
371f71bd7937609b9a6bb472cef100eb80668e68b8f27707ca57cfd565da064e  DSC_6900.jpg
ddc5c5b1e63cf54641965e32f54d463d5f442f05b3b08a91a8f255e5cb4bae21  DSC_6923.jpg
ced3fa196f8f3853f09a538257c053c1626fe6ebb4fd1c8be52c5e7d825b80d6  DSC_6899.jpg
115b12d3489dcca23ea52218a1ce20431f442783e47f0ba68ab9b3515b30be6e  DSC_6898.jpg
d4bc4e32ea4462b155abc3d0168c0d182439747df07034388acbac72d2ce3604  DSC_6907.jpg
2aa1d191d6e65c115e88512f825b61149b4c6e949d36530e392d7c346f6c3cf8  DSC_6906.jpg
be84c656e1a3bbfcfafb3dc57e0dc4f62e8a84013fc491cb5a16122a58a986ce  DSC_6897.jpg
eda90f8606d7ed871ac544a969366313c339fa32f36ba3f229df28b1f11f2986  DSC_6905.jpg
6c1f5eb44a8ab658c3f0f8966b662bcd1515d44098fb8811e76f7db30814f089  DSC_6896.jpg
885a08e3059923ddb422ffae023e1419c4a11b9d29f9067f0fa9dc698eeebc00  DSC_6895.jpg
0a558d0c7f7bdb43b2ef0032cbbd2e23d9107d9de7c5b061b83519f6add4fdff  DSC_6904.jpg
83389d6b6e7df07a5ffbf481dba7694823124d121b490d4431854fa99bcd109d  DSC_6894.jpg
1562373021258fab6556c2d02c141d0ba8ab2488e2cafe95cd6d4d2362bfa6c4  DSC_6902.jpg
d99ed238eae920ebd3d72d2273c56cd1843232c5d6a5fa7b42a419debfe2ec8d  DSC_6903.jpg

Perhaps, all this can be avoided if you refine the native support of wildcards.

from hashit.

boyter avatar boyter commented on August 20, 2024

Annoyingly supporting wildcards is... a bit of a pain. Its why I wanted the shell to take care of it for me initally.

from hashit.

boyter avatar boyter commented on August 20, 2024

Perhaps a better question to ask is what are you trying to achieve here? What is the end goal you have in mind?

from hashit.

sergeevabc avatar sergeevabc commented on August 20, 2024

Ben, I often need to calculate the hash of not one file, but several files using a mask (e.g. photos taken in May, img202405*.jpg). Since wildcards are not properly supported so far, I was looking for an alternative option to pass filenames.

from hashit.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.