B
Bill-NotBillGates
Hello, all.
I am either seeing a bug in sort or I am not using it - or understanding it - correctly.
I have a file "filelist.txt" that contains a listing of files on my Windows 10 system. The size is 65,772,625 bytes. When I sort the file and place the results into a second file "filelist.sorted.txt", the size of the sorted file is substantially smaller - 19,227,323 bytes. Here is how I create the file, then sort it:
Directory of c:\Temp
Here are line count results using find with count option:
So I am missing 321,271 lines. I tried using redirect, i.e., "sort filelist.txt > filelist.sorted.txt" and have the same result. On-line help says there are no file size restrictions in sort. I tried adding options like /m and /rec to increase memory and record size, but those didn't help. I also cleared c:\windows\temp and C:\Users\<myid>\AppData\Local\Temp, but that had no effect. Has anyone experienced this or see what I am missing, or perhaps this is a bug?
Thank you!
Bill
Continue reading...
I am either seeing a bug in sort or I am not using it - or understanding it - correctly.
I have a file "filelist.txt" that contains a listing of files on my Windows 10 system. The size is 65,772,625 bytes. When I sort the file and place the results into a second file "filelist.sorted.txt", the size of the sorted file is substantially smaller - 19,227,323 bytes. Here is how I create the file, then sort it:
c:\Temp> dir /s/b/n/o:n c:\ > filelist.txt
c:\Temp> dir /o:s filelist.txt
Volume in drive C is WINDOWS
Volume Serial Number is C24B-76BD
Volume in drive C is WINDOWS
Volume Serial Number is C24B-76BD
Directory of c:\Temp
03/10/2020 12:18 PM 65,772,625 filelist.txt
1 File(s) 65,772,625 bytes
0 Dir(s) 21,143,392,256 bytes free
1 File(s) 65,772,625 bytes
0 Dir(s) 21,143,392,256 bytes free
c:\Temp> sort /o filelist.sorted.txt filelist.txt
c:\Temp> dir /o:s filelist.txt filelist.sorted.txt
Volume in drive C is WINDOWS
Volume Serial Number is C24B-76BD
Volume in drive C is WINDOWS
Volume Serial Number is C24B-76BD
Directory of c:\Temp
Directory of c:\Temp
03/10/2020 12:19 PM 19,227,323 filelist.sorted.txt
03/10/2020 12:18 PM 65,772,625 filelist.txt
2 File(s) 84,999,948 bytes
0 Dir(s) 21,121,150,976 bytes free
03/10/2020 12:18 PM 65,772,625 filelist.txt
2 File(s) 84,999,948 bytes
0 Dir(s) 21,121,150,976 bytes free
Here are line count results using find with count option:
c:\Temp> find /i /c "c:\" filelist.txt filelist.sorted.txt
---------- FILELIST.TXT: 499721
---------- FILELIST.SORTED.TXT: 178450
So I am missing 321,271 lines. I tried using redirect, i.e., "sort filelist.txt > filelist.sorted.txt" and have the same result. On-line help says there are no file size restrictions in sort. I tried adding options like /m and /rec to increase memory and record size, but those didn't help. I also cleared c:\windows\temp and C:\Users\<myid>\AppData\Local\Temp, but that had no effect. Has anyone experienced this or see what I am missing, or perhaps this is a bug?
Thank you!
Bill
Continue reading...