It is a common practice to use the ls command in shell scripts to extract file-related information like permissions, size, ownership, timestamps and more. This mostly involves running 'ls -l' or variations of the same and then extracting relevant fields using cut/awk commands.
In this video, you will learn how to use the 'stat' command instead of 'ls' for the same purpose, making your shell scripts more optimized.
...
https://www.youtube.com/watch?v=u_jVctBqqmI