Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

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

I'm struggling using the find command that will allow me to find all files that were modified over 7 days ago and that are larger than 1 MB.

Here's what I have -

find /path/to/files* -mtime +7 | -size +1M

But I don't think this is the right syntax.

share|improve this question
read the fine manual. manpagez.com/man/1/find – Alexej Magura Jul 31 '13 at 19:22
on most systems you really can access the man pages offline. You may try man find – user1146332 Jul 31 '13 at 19:30

Please try the next line

find /path/to/files -mtime +7 -size +1M
share|improve this answer
You have to prepend 7 and 1M with a + sign – user1146332 Jul 31 '13 at 19:35

The bar | is interpreted by your shell. Try the following

find /path/to/files* -mtime +7 -a -size +1M
share|improve this answer
-and is not portable and actually does nothing in this case. -and is implied. – jordanm Jul 31 '13 at 19:49
Thanks for the hint! Changed -and to -a. I think a visible operator makes the statement more legible. – user1146332 Jul 31 '13 at 19:53

Your Answer


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

Not the answer you're looking for? Browse other questions tagged or ask your own question.