2 ms·
Sometimes, in the command line of windows... I'll type something like D:\source>dir *.jpg /s to find out how many gigabytes of photos I've taken in the past
by mikewarot 2y ago
Sometimes, in the command line of windows... I'll type something like
D:\source>dir *.jpg /s
to find out how many gigabytes of photos I've taken in the past 3 decades... I really don't care about anything other than the total, and maybe file count.
Total Files Listed:
343340 File(s) 539,323,481,512 bytes
0 Dir(s) 1,662,307,921,920 bytes free
D:\Source>
The faster the terminal renders, the quicker I get the totals. Tip: if you minimize the window, it usually runs much quicker.
- drivingmenuts 2y agoSo Windows has to actually render out the filenames and sizes somewhere to get the total amount of space used by the files? That seems a bit ... non-optimal.
- Jtsummers 2y agoNo, it doesn't have to do that. Get-ChildItem *.jpg | Measure-Object -property length -sum Stats included in this are the sum total of the sizes (in bytes). That's Powershell which has been around for a while now, I've never bothered to learn it though and always have to look things up. Get-ChildItem can be replaced with ls or dir.
- solardev 2y agoI feel like that's a quirk of their Powershell and Windows Terminal apps. Using cmd.exe, it's instant.