#search
6 one-liners with this tag.
All one-liners tagged search
Find a file by name
$find /var/www/vhosts -iname '*wp-config*' 2>/dev/null
Find commits that added or removed specific text
$git log -S 'define('WP_DEBUG'' --oneline --all
Find out which cron job runs a command
#grep -rn "wp-cron.php" /etc/crontab /etc/cron.d /etc/cron.hourly /etc/cron.daily /etc/cron.weekly /etc/cron.monthly /var/spool/cron/crontabs 2>/dev/null
Search for text in all files of a directory
$grep -rnI --include='*.php' 'base64_decode' /var/www/vhosts/example.com/httpdocs
Search for text in all versions of a repository
$git rev-list --all | xargs git grep -F 'DB_PASSWORD'
Search rotated and compressed logs too
#zgrep -h "Out of memory" /var/log/syslog*