rmoldest in purgerepo umbenannt.
This commit is contained in:
14
purgerepo.sh
Executable file
14
purgerepo.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
|
||||
|
||||
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