Cleanup downloads directory regularly from old files (more than 1 day)

This commit is contained in:
2025-01-03 15:48:36 +01:00
parent 757f283d2a
commit 88a6ebc40f

View File

@@ -7,6 +7,9 @@ export BASH_SILENCE_DEPRECATION_WARNING=1
# TODO: get rid of it by applying all relevant things in this file
[ -d /etc/skel/.bashrc ] && . /etc/skel/.bashrc
# ensure to delete files from ~/Downloads after 1 day
(crontab -l 2>/dev/null; echo "*/5 * * * * /usr/bin/find $HOME/Downloads/ -type f -mtime +1 -exec /usr/bin/rm {} \;") | sort -u | crontab -
# autocompletion
[ -s /usr/share/bash-completion/completions/git ] && . /usr/share/bash-completion/completions/git
which brew &>/dev/null && [ -s $(brew --prefix)/etc/bash_completion ] && . $(brew --prefix)/etc/bash_completion