``` find . -type f -mmin -60 ``` 60 being the amount of minutes. Change it to match your needs. t to match your needs. # Chat GPT answer to ``` In a mac terminal, how do I do a find that selects only the files modified in the last hour? What are the options for other modified dates? ``` The `find` command in a Mac Terminal provides several options for filtering files based on their modification, access, or change times. Here are the key options: ### Modification Time (`-mtime` and `-mmin`) - **`-mtime n`**: Finds files that were last modified exactly `n` days ago. - **`-mtime +n`**: Finds files modified more than `n` days ago. - **`-mtime -n`**: Finds files modified within the last `n` days. - **`-mmin n`**: Finds files that were last modified exactly `n` minutes ago. - **`-mmin +n`**: Finds files modified more than `n` minutes ago. - **`-mmin -n`**: Finds files modified within the last `n` minutes. ### Access Time (`-atime` and `-amin`) - **`-atime n`**: Finds files that were last accessed exactly `n` days ago. - **`-atime +n`**: Finds files accessed more than `n` days ago. - **`-atime -n`**: Finds files accessed within the last `n` days. - **`-amin n`**: Finds files that were last accessed exactly `n` minutes ago. - **`-amin +n`**: Finds files accessed more than `n` minutes ago. - **`-amin -n`**: Finds files accessed within the last `n` minutes. ### Change Time (`-ctime` and `-cmin`) - **`-ctime n`**: Finds files that had their metadata (e.g., permissions, owner) changed exactly `n` days ago. - **`-ctime +n`**: Finds files with metadata changed more than `n` days ago. - **`-ctime -n`**: Finds files with metadata changed within the last `n` days. - **`-cmin n`**: Finds files that had their metadata changed exactly `n` minutes ago. - **`-cmin +n`**: Finds files with metadata changed more than `n` minutes ago. - **`-cmin -n`**: Finds files with metadata changed within the last `n` minutes. ### Examples: 1. **Find files modified in the last 2 days:** ```bash find /path/to/search -type f -mtime -2 ``` 2. **Find files accessed exactly 30 minutes ago:** ```bash find /path/to/search -type f -amin 30 ``` 3. **Find files with metadata changed in the last 5 hours:** ```bash find /path/to/search -type f -cmin -300 ``` (Note: 5 hours = 300 minutes) These options provide powerful ways to filter files based on when they were last modified, accessed, or had their metadata changed.