Skip to content

Instantly share code, notes, and snippets.

Avatar

Denis L.E. Favreau daidais

View GitHub Profile
@daidais
daidais / list-cron.sh
Created Dec 8, 2017
List all cron task
View list-cron.sh
#!/bin/bash
# Source https://stackoverflow.com/a/137173
# System-wide crontab file and cron job directory. Change these for your system.
CRONTAB='/etc/crontab'
CRONDIR='/etc/cron.d'
# Single tab character. Annoyingly necessary.
tab=$(echo -en "\t")
@daidais
daidais / find-examples.sh
Created Dec 1, 2017
find reminder commands
View find-examples.sh
# Remove files older than 15 days
find /var/log/elasticsearch/ -type f -mtime +15 -exec /bin/rm -f {} \;
@daidais
daidais / grep-examples.sh
Last active Nov 17, 2017
grep reminder commands
View grep-examples.sh
#Listing all files in /etc/nginx/ containing image_filter
grep -rnw '/etc/nginx/' -e 'image_filter'