I am using ls -t | head -8
to show the last 8 files modified in a directory, but this only prints the file name.
Is there a way to alter the above command so that it shows the modified date for the file names as well?
14.04command line
I am using ls -t | head -8
to show the last 8 files modified in a directory, but this only prints the file name.
Is there a way to alter the above command so that it shows the modified date for the file names as well?
Best Answer
You'll want to use
stat
to get the file metadata: