1

How can I find all the files which have been modified 50 days before?

I'm trying this:

find -maxdepth 1 -mtime -50 

is it the right command to find files that have been modified in the last 50 days?

2
  • 1
    I removed the request to send the answer to the OP's email address - that's not how SO works. Commented Dec 2, 2014 at 12:04
  • Note that Linux is just the kernel, what matters here is the utilities shipped with the system. That will be different if that Linux kernel is in a Debian, OpenWRT, Android or ChromeOS system for instance. The "Linux" tag is generally not useful if the question is about a command. Commented Dec 2, 2014 at 12:48

1 Answer 1

3

Use -type f if you only want regular files. If on a GNU system, the -printf predicate can show you the date.

find -maxdepth 1 -type f -mtime -50 -printf "%T+ %p\n" 

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.