# Command Question...

**URL:** <https://community.unix.com/t/command-question/169186>\
**Category:** UNIX for Dummies Questions & Answers\
**Created:** [February 16, 2007, 12:23pm UTC](https://community.unix.com/t/command-question/169186 "2007-02-16T12:23:55Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![DBoy12](https://community.unix.com/letter_avatar/dboy12/32/6_449c533f586939b6e5f246632a46421f.png) [@DBoy12](https://community.unix.com/u/DBoy12)\
**Post date:** [February 16, 2007, 12:23pm UTC](https://community.unix.com/t/command-question/169186/1 "2007-02-16T12:23:55Z")

</div>

Hi Everyone

I'm a student in college working with Unix Linux for the first time. I've been tasked with finding information on different commands on a Unix/Linux system.

I have to find a command that will list all the files under a certian directory and it's subdirectories that have been created or changed within the last 30 minutes.

I think it would be some sort of grep command, but other than that I know nothing 😕

Does anyone know what the command would be?

---

<div class="post-metadata">

**Author:** ![BOFH](https://community.unix.com/letter_avatar/bofh/32/6_449c533f586939b6e5f246632a46421f.png) [@BOFH](https://community.unix.com/u/BOFH)\
**Post date:** [February 16, 2007, 1:13pm UTC](https://community.unix.com/t/command-question/169186/2 "2007-02-16T13:13:16Z")

</div>

man find

🙂

Carl

---

<div class="post-metadata">

**Author:** ![sb008](https://community.unix.com/letter_avatar/sb008/32/6_449c533f586939b6e5f246632a46421f.png) [@sb008](https://community.unix.com/u/sb008)\
**Post date:** [February 16, 2007, 1:14pm UTC](https://community.unix.com/t/command-question/169186/3 "2007-02-16T13:14:41Z")

</div>

Create a file with a timestamp of 30 minutes ago.  
See the "touch" command: "man touch"

Next do a use the "find" command with the "-newer" option.  
See the "find" command: "man find"

---

<div class="post-metadata">

**Author:** ![DBoy12](https://community.unix.com/letter_avatar/dboy12/32/6_449c533f586939b6e5f246632a46421f.png) [@DBoy12](https://community.unix.com/u/DBoy12)\
**Post date:** [February 16, 2007, 1:29pm UTC](https://community.unix.com/t/command-question/169186/4 "2007-02-16T13:29:46Z")

</div>

Thank you for your quick replies, but I'm still a little confused...

The command would be "find -mmin 30 (filename)" to list the files that were changed within the last 30 minutes, but how do I list the files that were created in the last 30 minutes as well?

---

<div class="post-metadata">

**Author:** ![sb008](https://community.unix.com/letter_avatar/sb008/32/6_449c533f586939b6e5f246632a46421f.png) [@sb008](https://community.unix.com/u/sb008)\
**Post date:** [February 16, 2007, 2:14pm UTC](https://community.unix.com/t/command-question/169186/5 "2007-02-16T14:14:44Z")

</div>

If your "find" supports the "-mmin" option there is no need to use the "touch" command.

-mmin +30 =\> older than 30 mins (30 mins or more)  
-mmin 30 =\> exactly 30 mins  
-mmin -30 =\> younger than 30 mins (30 mins or less)
