grep string between strings
echo "beforestring-THIS IS THE STRING I WANT-afterstring" | \
grep -o -P '(?<=beforestring-).*(?=-afterstring)'
echo "beforestring-THIS IS THE STRING I WANT-afterstring" | \
grep -o -P '(?<=beforestring-).*(?=-afterstring)'
In this example we want to archive a huge number of .xml files in the current directory:
# find . -name "*.xml" -print > ./file.lst # tar czvf ./archive.tgz --files-from ./file.lst
And delete all archived files:
# xargs -a ./file.lst rm -v # rm ./file.lst
# openssl pkcs12 -in xxx_v1_apns_production.p12 -out xxx_v1_apns_production.pem -nodes -clcerts
# cd /root/of/wp/installation # find . -type d -exec chmod 0755 {} \; # find . -type f -exec chmod 0644 {} \; (yeah living on the edge, always as root)