1

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.

3
  • From a shell prompt, start with man stat. Note that most filesystems do not store a file's create date. Commented Jun 8, 2015 at 20:16
  • @glennjackman they do store last written date. Commented Jun 8, 2015 at 20:24
  • Have a look at ls and * (globs). I.e ls -l * or stat * Commented Jun 8, 2015 at 20:25

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .