Help me lsf size human

rclone lsf -R --hash MD5 --format shp --separator "|" --files-only --csv --dry-run Encrypt_TD1: > "D:\Programs\rclone\list.txt"

result :::

93274923336||example/ex.zip

i need size human mb gb tb

Thanks for the help.

what is your question?

i need size human

mb gb tb

in this post,


@Animosity022 shared this script which runs on linux but you are a windows user.

rclone ls gcrypt:Movies/"Unsane (2018)" |  awk '{ byte =$1 /1024/1024**2 ; print byte" " $2 }'
24.157 Unsane

as i am trying to learn more about microsoft windows subsystem for linux, i converted that script to run on windows and made a small tweak to it, so that it works with lsf, instead of ls

tho if i really need a good solution i would script it in python.

rclone.exe lsf --format=shp -R --hash=MD5 --files-only --csv --separator="|" wasabieast2:vserver03/en07.veaam/rclone/backup/EN07 | wsl awk -F"|" '{byte =$1 /1024/1024**2; print byte"GB|"$2"|"$3}'

which gave me the following output

58.0154GB|a3b20f37523b26ab1abc8c71c14ac522|EN072019-06-01T104442.vbk
52.0804GB|30f1ecccc7c866f0977a6a86b595c2b1|EN072019-08-01T130715.vbk
45.4572GB|9a661389f2720fb297a413d25b56fb8e|EN072019-10-19T111117.vbk
37.5203GB|a1cbdc10231949c03d2d123d5f1cdca6|EN072019-11-09T113532.vbk
41.2946GB|fad2746520e9bd6cb20320a62cb2c135|EN072019-12-28T111110.vbk
41.1725GB|e8ff11318d8aba1f6961f6acbf0779af|EN072020-01-04T121304.vbk
44.6523GB|3da16fb8c173162baeefb2e1e165d56a|EN072020-01-11T103741.vbk
1.51434GB|6c5c324ce16df31e1d26b767cd5e3b0e|EN072020-01-12T120429.vib
3.30023GB|982437500f5b0634d0cf44f3a0aeaacf|EN072020-01-14T203722.vib
2.29303GB|02796aec470568b25b389a8d255d8c97|EN072020-01-16T175310.vib
5.87744GB|711b51bdf8ee7fd54c4c484fe20adf3d|EN072020-01-17T152810.vib
44.7849GB|62412f14c33466e1b4c0deb83d6308ae|EN072020-01-18T104532.vbk
6.90552GB|3bb24bf9944943fc76f92c4cc31d60e8|EN072020-01-20T155540.vib
4.28113GB|057a1d9bbc6e07380b487f0daf0996e3|EN072020-01-21T180423.vib
2.57642GB|d84b0011a086b1e2ad9bc5caba5b3692|EN072020-01-23T162740.vib
2.41309GB|8537da3d9c68b1e9ef6365238c63d4dc|EN072020-01-24T180838.vib
0.426392GB|b82db602333056a07ca3e19e6111ded0|EN072020-01-24T183038.vib
43.1191GB|2ff4886b1f339c960da154475e9964eb|EN072020-01-25T110834.vbk

1 Like

I would stick the csv into a spreadsheet and divide by 10241024 to get MiB or 10241024*1024 to get GiB.

1 Like

=A2/1024/1024*1024

image

i don't get GiB.

i use formula

=if(A2>=1024, if(A2>=(10241024), if(A2>=(102410241024), A2/(102410241024)&" GB", A2/(10241024)&" MB"),A2/1024&" kB"),A2&"bytes")

work

Thank you for all the help. :heart_eyes: :heart_eyes: :heart_eyes:

Cool formula!

1 GiB = 102410241024 bytes = 1073741824 bytes = 1.073741824 GB
1 MiB = 1024*1024 bytes = 1048476 bytes = 1.048576 MB

Your formula uses GiB/MiB because of all the 1024.

Normally we measure computer stuff in GiB/MiB (eg RAM), except for disk drives which usually use GB and MB.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.