Sort -u by itself had no effect on the file size.
If you give 'sort' a text file in argument, it will not be modified, if that
is what you mean. It is how all text-processing command work (well, 'sed'
actually has an --in-place option): you must redirect their output to a file
(or use the
'sort -u' does remove all duplicates. What you consider duplicates in its
output must differ in some subtle way, e.g., an additional space at the end
of the line. Those differences can be ironed out. For instance, that
command "squeezes" the spaces (only leaves one if there are more) in
You want 'sort -u', which is faster that 'sort | uniq' in presence of many
duplicates.