Save space by deletion of unnecessary folders
Remove all folders which are more than day old. Related-Bug: #1662521 Change-Id: Ia154c82ff7356105cfb359b0491ed6bb92b7cc9c
This commit is contained in:
parent
99100b61a9
commit
6cf511141b
|
@ -46,7 +46,9 @@ for DIR in $DIRS2TEST ; do
|
|||
break
|
||||
done
|
||||
|
||||
# Remove any files older then 3 days that arn't the current-tripleo pin
|
||||
find */*/* -type f -name metadata.txt -mtime +3 -not -samefile current-tripleo/metadata.txt | \
|
||||
# Remove any files older then 1 day that arn't the current-tripleo pin
|
||||
find */*/* -type f -name metadata.txt -mtime +0 -not -samefile current-tripleo/metadata.txt | \
|
||||
xargs --no-run-if-empty dirname | \
|
||||
xargs --no-run-if-empty -t rm -rf
|
||||
# Remove all empty nested directories
|
||||
find . -type d -empty -delete
|
Loading…
Reference in New Issue