rmoldest in purgerepo umbenannt.
This commit is contained in:
14
backupsd
14
backupsd
@@ -6,6 +6,20 @@ verbose=false
|
||||
testmode=false
|
||||
bzip2=false
|
||||
|
||||
if [ $# -ne 2 ]
|
||||
then
|
||||
echo "Usage: backupsd <src_device> <target_file>"
|
||||
echo "Please try again."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if !command -v dd > /dev/null 2>&1
|
||||
then
|
||||
echo "required command dd is not installed."
|
||||
echo " Please check."
|
||||
exit 2
|
||||
fi
|
||||
|
||||
function isolate_checksum() {
|
||||
checksum=($(echo ${1} | tr " " "\n"[0]))
|
||||
|
||||
|
@@ -6,6 +6,7 @@ files_to_remove=$(find . -maxdepth 1 -type f|cut -c3-|xargs ls -t|tail -3)
|
||||
echo "eldest files ${files_toremove}"
|
||||
for backupfile in ${files_to_remove}; do
|
||||
echo "deleting backup ${backupfile}"
|
||||
rm -f "${backupfile}"
|
||||
done
|
||||
|
||||
|
Reference in New Issue
Block a user