Created
August 30, 2018 17:09
-
-
Save tareqy/de28135360ad610aa780cf6cef2bcebf to your computer and use it in GitHub Desktop.
List All files that was not accessed in the last 7 days
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
# List All files that was not accessed in the last 7 days | |
find /home/vod/vod/ -type f -name '*.mp4' -atime +7 | |
# Total Files Count | |
find /home/vod/vod/ -type f -name '*.mp4' -atime +7 | wc -l | |
# Delete The Files | |
find /home/vod/vod/ -type f -name '*.mp4' -atime +7 -exec rm -f {} \; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment