Option for ls command to list directories with and ending slash. Just to visualize directories in a different way.
ls -p
Tag: ls
-
List folders with a slash
-
List large files in Linux
Command to find and list all files above a defined size. Works for debian based distros and Centos. If the output its wrong in other systems, you can play with awk params.
find . -type f -size +50000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }' -
Find latest file in a directory methods
Sometimes there are so many files in a directory that it’s hard to find the last file in the directory. We show you here 2 ways for finding it out.
With awk we print the last argument of the last line:
$ ls -lrt | awk '{ f=$NF }; END{ print f }'Reverse ordering with ls and then getting the first line:
$ ls -t1 | head -n1