7

Explanation of the sort command

view full story
linux-howto

http://www.unix.com – Hi everyone, I am wondering if someone could please break down and explain the following sort command for me: Code: ls ${DEST_LOCATION}/${FILES} | sort -rt -k 4,4n | head -1 I have tried working it out using 'man sort', but on AIX there is not a great explanation of this function. I know that it searches the source directory for the named file and returns the name of the latest dated, but I am particularly confused as to what Code: -k 4,4n | head -1 is doing. Thanks in advance. (HowTos)