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.
Asked
Active
Viewed 271 times
1
1 Answers
1
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. – glenn jackman Jun 08 '15 at 20:16ls
and*
(globs). I.els -l *
orstat *
– ctrl-alt-delor Jun 08 '15 at 20:25