1 min to read
Do you use ls -lrt?
Bro, You're pro!
Hey folks, as a coder or techie we often do use terminal to interact with our files. And we all are familiar with ls command.Basically we use ls command for listing the contents of a directory.
ls command :
But what about if there are thousands of files inside a folder and we have to pick or sort a particular file within time frame? In such case using ls command and going line by line doesn’t makes sense?
So here we do have lrt option which is bascially combo three different options which provide us extra flexibility.
l : It displays the listing of the content with ownerships, permissions and size of a file.
r : It reverse the order of command output.
t : It sortlists files on the time basis.
The combination of these commands display the files in reverse chronological order from same file directory.
Thanks for reading blog,Keep learning Keep Troubleshooting!