sed command collection

#find and replace all file
## change full url
find . -type f -exec sed -i "s,https://youtube.com,https://video.com,g" {} \;
find $PWD -type f -exec sed -i 's/yahoo.com/google.com/g' {} +

#change all rotate to 3 in logrotate.d
sudo cp -rv /etc/logrotate.d /etc/logrotate.d.backup
sudo find /etc/logrotate.d/ -type f -exec sed -i 's/rotate [0-9][0-9]*/rotate 3/' {} \;

#remove all .env value
sed -i 's/\(.*=\).*/\1/' .env