How do I sort a text file which has been listed already by size order, then take that list and put it into reverse alphabetical order?
MarkQ97 commented: sort -r only sorts the directory, I want to sort the text file +0
If I want to sort a file I can do this with a pipe.
cat file | sort -r > newfile
The sort flags are picked as you wish and my crude example is just that.
Your reply about a directory seems odd but I take it you need a reminder of Linux command lines. One can also not pipe but redirect like:
sort -r < file > newfile
And for more fun you can get the last so many lines with tail then sort like:
tail file|sort -r > newfil
Isn't it an example of UUOC ? It seems to me that
sort -r -o newfile file should work.