I'm trying to write a bash script that will see all files in a directory, and then tell me each file's size and each of their dates of creation.
1 Answer
Getting the creation date will be a tough one on a Linux system as it isn't stored.
Related question: How to find creation date of file?
Use the ls
command to list files, try the options -a
and -s
to list all, and list their sizes. Use the command man ls
on the command line to read a full description on the ls
command
man stat
. Note that most filesystems do not store a file's create date.ls
and*
(globs). I.els -l *
orstat *