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

Show already calculated hashes? #5

Open
sergeevabc opened this issue May 9, 2024 · 6 comments
Open

Show already calculated hashes? #5

sergeevabc opened this issue May 9, 2024 · 6 comments

Comments

@sergeevabc
Copy link

Windows 7 x64, Hashit 1.2.0

$ busybox.exe find *.7z -type f -exec hashit.exe -p -c sha256 -f sum --threads 1 {} +

[====================================================================] file: hello01.7z
[====================================================================] file: hello02.7z

[====================================================================] file: hello04.7z

[====================================================================] file: hello05.7z

[====================================================================] file: hello07.7z

[====================================================================] file: hello09.7z

[--------------------------------------------------------------------] file: hello11.7z

Ben, as you can see, some files are already processed, yet their hashes are not shown.

@boyter
Copy link
Owner

boyter commented May 9, 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?

@sergeevabc
Copy link
Author

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.

@boyter
Copy link
Owner

boyter commented May 10, 2024

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

@boyter
Copy link
Owner

boyter commented May 10, 2024

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

@sergeevabc
Copy link
Author

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.

@boyter
Copy link
Owner

boyter commented Aug 12, 2024

Have not forgotten about this, but looking to work on globbing support for this at least in the case of windows.

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

2 participants