I was able to find the fifth largest file in the given sub-directory named foo
by ls -Ss foo/*.csv | head -5
but this gives me largest five files. I wanted to extract only the fifth largest file, which would be the last one in this given list.
Then I found the number of characters in this file, which I was able to observe the list I found in the previous list. But what I wanted to do was to return only the fifth largest file and possibly pipe it to get the number of characters in this file.
Instead of getting top 5 largest files, how can I get the fifth largest file?