Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- ## Script will cleanup the location from the directories at LOCATION older than DAYSLIMIT days
- #define days in ctime
- DAYSLIMIT=30
- LOCATION="/mnt/c/Users/xxxvo"
- find ${LOCATION} -type f -ctime +${DAYSLIMIT} |while read folder; do
- echo "${folder}"
- ##delete
- #rm -rf "${folder}"
- ##TEST- print only
- echo "rm -rf ${folder}"
- #echo "${folder}"
- done
- exit 0
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement