For older files, it shows the year (notice 2021?). Linux shows the time for the files created in the current year. The newest files are displayed at the top. I am going to sort ls command output by size in long listing with ls -lt: ls -ltĭo you notice the change? Now the entries are sorted by time. rwxr-xr-x 1 abhishek abhishek 57430439 Mar 17 07:52 pcloudĭrwxr-xr-x 2 abhishek abhishek 4096 PenguinSubtitlePlayer-Linux rwxr-xr-x 1 abhishek abhishek 89697412 balenaEtcher-1.5.116-圆4.AppImageĭrwxr-xr-x 6 abhishek abhishek 4096 cpufetch Now, if I use ls -l, it will display one entry per line, still sorted in alphabetical order. Obsidian-0.13.19.AppImage ScreenCloud-v1.5.3-x86_64.AppImageīy default, it just gives the name of the files and directories in alphabetical order. Let me show you the contents of my sample directory: ls Let's go a little further and understand it with practical examples. You'll get the same result for ls -lrt and ls -ltr. The order of the options doesn't matter here. The newest files are shown at the bottom. So when you combine them all, you display the contents in the present directory sorted in reverse chronological order. r: This one reverses the order of ls command output.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |