Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How do I list/find all the files created on Sundays or Mondays?

How do I use the date parameter to display them?

Something like :

ls -f date + %a


find -type f | date +%A


find -type f -mtime -6
share|improve this question

migrated from stackoverflow.com Oct 8 '12 at 14:01

This question came from our site for professional and enthusiast programmers.

up vote 5 down vote accepted

Something like this?

find -type f -printf '%Ta\t%p\n' | egrep "^(Sun|Mon)" | cut -f 2-

Note that this uses the file's last modification time, not creation time (which, as far as I know, isn't kept anywhere)

share|improve this answer

In *nix operating systems there is no way to get the file creation date. mtime will give you last modification time and atime will give you last accessed time. But there is no way to get the file creation time.

If you need creation time then you have to save it in some file yourself.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.