Last active
March 28, 2019 21:07
-
-
Save vbarbarosh/2c8b7d87ee1fa0338ae07bff4db2b706 to your computer and use it in GitHub Desktop.
shell_find – Searching for files https://codescreens.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # http://www.gnu.org/software/bash/manual/bash.html#The-Set-Builtin | |
| # http://redsymbol.net/articles/unofficial-bash-strict-mode/ | |
| set -o nounset -o errexit -o pipefail | |
| # Find files modified more than 1 month ago (31 days) | |
| find -mtime 31 -type f | |
| # Find files accessed more than 1 month ago (31 days) | |
| find -atime 31 -type f |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment