Describe Linux/FindGrepAwkSedXargs here.

Find files containing something in Linux

Search dir for files containing string and replace all of them

##e.g. search for tentant -> tenant
grep -irlZ 'tentant' ./ |  xargs -0  sed -i 's/tentant/tenant/g'

Delete files older than 30 days

find /opt/backup -type f -mtime +30 }}}

Bash loop over files

awk script to duplicate section under " labels:" of k8s yaml file to " spec: { selector: { matchLables: <...> } }


CategoryLinux

Linux/FindGrepAwkSedXargs (last edited 2024-01-24 20:48:46 by PieterSmit)