diff options
author | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-05-06 11:22:49 +0200 |
---|---|---|
committer | Aleksander Mistewicz <a.mistewicz@samsung.com> | 2016-06-23 17:05:14 +0200 |
commit | 76ebf187a46341dcde24205033dd8052f0a3809b (patch) | |
tree | 63535aaaaec4645773a4ccdc2c89cd457b8f65d9 /tsp/scripts | |
parent | a5b7192f6666794997cc67d6641951f757d31887 (diff) | |
download | major-76ebf187a46341dcde24205033dd8052f0a3809b.tar.gz major-76ebf187a46341dcde24205033dd8052f0a3809b.tar.bz2 major-76ebf187a46341dcde24205033dd8052f0a3809b.zip |
Add tsp/scripts/free_diskspace.sh
Change-Id: Iae5463f09e9c20d118c456ee4c7b85fc6ae1da86
Signed-off-by: Aleksander Mistewicz <a.mistewicz@samsung.com>
Diffstat (limited to 'tsp/scripts')
-rwxr-xr-x | tsp/scripts/free_diskspace.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/tsp/scripts/free_diskspace.sh b/tsp/scripts/free_diskspace.sh new file mode 100755 index 0000000..88ff2ed --- /dev/null +++ b/tsp/scripts/free_diskspace.sh @@ -0,0 +1,24 @@ +#!/bin/sh + +# Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# Author: Aleksander Mistewicz <a.mistewicz@samsung.com> + +# Assume that most of the space is taken up by downloaded images. +# Delete ones that were modified at least 3 days ago. +for i in $(find "${HOME}/ws/dwn" -type d -mtime +2) +do + rm -vr "$i" +done |