Showing posts with label bashshell. Show all posts
Wednesday, July 31, 2013
Clear file by time create
This is bash shell to clear file create by time with 60 m * 8 hour = 480 m :
#!/bin/bash
homedir=( folderName1
folderName2
folderName3
folderName4
)
for d in ${homedir[@]}
do
echo "Homedir: /var/nginx/cached/$d"
find "/var/nginx/cached/$d" -type f -amin +480 -exec rm {} \;
done
Subscribe to:
Posts
(
Atom
)