How do I list files in date order?



  • To list files in date order just use the following list command and switches

    $ ls -lt
    

    If the listing goes off the screen use the more command (use the letter q to quit out of the more command), to page through the results like this, do not worry about the | at the moment, it's called pipe, it will be discussed in another article. You do not need spaces around the pipe but it makes it easier to read

    $ ls -lt | more
    

    If you want a reverse listing, useful if you only want to see the last few files, without using the pipe and more.

    $ ls -ltr
    

    Or to page through

    $ ls -ltr | more
    

Log in to reply
 

© Lightnetics 2024