Command dir (A better dir (yes, Windows' dir)) - fcorbelli/zpaqfranz GitHub Wiki
On *nix the ls command really, really sucks
There is no easy way to get a recursive list of files, their total size, and maybe free space, like with the Windows dir command
On Windows subfolders gets a messy output, and no easy way to make a |tail
CMD dir (yes, dir as in Windows, even better).
+ : I really hate ls: does not show the cumulative filesize (!)
'Mini clone' of Windows's dir command, with the main switches
+ : /s Recursive (note: Win-switch must be BEFORE 'normal' switch
+ : /os Order by size
+ : /a Show all (hidden)
+ : -checksum Show hashes for every file
+ : -(somehash) Use (somehash) to find duplicate/show checksums
+ : -nochecksum -crc32 -xxhash -sha1 -sha256 -xxh3 -blake3 -sha3 -md5 -windate -whirlpoo
l -highway64 -highway128 -highway256
+ : -crc32c -wyhash -nilsimsa -entropy -quick
+ : -n X like |tail -X
+ : -maxsize X Filter on filesize. Use K, M, G, T and KB,MB,GB,TB
+ : -minsize Y ex. 3000000, 3.000.000, 3000K, 3.2KB, 3M, 3MB, 2G, 3GB, 2TB, 3T
Examples:
Windows-dir command clone: dir /root/script /od
Show the 10 largest .mp4 file in c:\:dir c:\ /s /os -n 10 -find .mp4
Find .mp4 duplicate in C:\: dir c:\ /s -crc32 -find .mp4
How big is c:\z,with subdirs?: dir c:\z /s -n 1
100 biggest dup. files in c:\z?: dir c:\z /s -crc32 -n 100
Show -md5 checksum, recurse by size: dir z:\cb /s /os -checksum -md5
Like dir: dir z:\cb\*.avi
Better than dir: dir c:\*.cpp /s /os -n 100