Results 1 to 2 of 2

Thread: Locate and sort

  1. #1
    Member
    Join Date
    Feb 2010
    Location
    Root
    Posts
    121

    Default Locate and sort

    Noob question of the day, is there a way to locate a certain type of document (ie. .txt) and sort the result by last usage or last time it was modified? To help clarify, I have txt documents stored in various directories, I'd like to locate them, and sort the results by last usage.
    Uhh, I think I just said all that twice.

    Thanks

    **Never mind, found what I needed**

  2. #2
    Senior Member
    Join Date
    Apr 2008
    Posts
    2,008

    Default

    Quote Originally Posted by ghost40 View Post
    **Never mind, found what I needed**
    Please post the method you used, so that other people with the same question can use this thread for reference in the future. The following command, although from memory, should search for all .txt files in the /root/Desktop folder and list them starting from the one modified most recently:
    Code:
    find /root/Desktop -name *.txt |xargs ls -t
    -Monkeys are like nature's humans.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •