Monthly Archives: July 2015

A bit of cleanups

for i in $(ls /apps/ldap_backups); do k=$(ls /apps/ldap_backups/$i | wc -l)&& if [ $(expr $k) -gt 10 ]; then for l in $(ls -tr /apps/ldap_backups/$i |head -$(expr $k – 10));do echo removing “/apps/ldap_backups/$i/$l” && rm -rf /apps/ldap_backups/$i/$l; done ; fi … Continue reading

Posted in Uncategorized | Tagged | Leave a comment