The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 09-20-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
You need spaces between the -k and the field_start,field_end portion

ls -al |sort -k 1,1 -k 9,9r

If you are thinking that it isn't working, check again. It may be the first column (the file permissions) that makes it look like the last column (file name) isn't sorted, but it is.

Last edited by RTM; 09-20-2005 at 08:42 AM..