How To Fix Server Ownership When Files Have Been Altered By Mistake

Author: , March 16th, 2022

Situation: Newbie mistake, used copy-and-paste to create a script that used variables with the incorrect variable name, then ran chown -R / OUCH Resolution: Since I had aa clone host nearby, I decided to export the remote root fs via NFS, mount it on the fouled nnode, and use find magic to repair. Here are […]

How To Find All git Commits Containing a Specific Log Message

Author: , July 9th, 2020

Show commits and messages that match

Include code diffs

Include file names

How To Locate Attached Disk Devices in Linux

Author: , April 24th, 2018

https://linux.die.net/man/8/lsblk # lsblk -a

How To Find Non-ASCII Characters in Vi

Author: , July 7th, 2015

To search for non-ASCII characters: /[^\d0-\d127] Use the substitute function to clean them up: :%s/[^\d0-\d127]/ /g

How To GZip Uncompressed Files Older Than a Week Using Find

Author: , August 29th, 2014

find . -mtime +7 ! -name “*.gz” -exec gzip {} \;

How To Find Which Button Was Clicked To Submit A Form Using jQuery

Author: , July 2nd, 2011

How To Delete Development File Versions (i.e. .css or .js)

Author: , June 30th, 2011

How To Find The Next Instance Of A Class Using jQuery

Author: , June 20th, 2011

How To Search For And Delete Lines Globally In Vim

Author: , November 27th, 2010

Delete all comment lines: :g/^#/d Delete all blank lines: :g/^$/d