Author:
erics, 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 […]
Categories: How-To's, Technology Tags: chown, exportfs, Find, howto, mount, nfs, rpcinfo, service, sudo, tips
|
No comments
Author:
erics, July 9th, 2020
Show commits and messages that match
|
git log --all --grep='SEARCH_STRING_HERE' |
Include code diffs
|
git log --all --grep='SEARCH_STRING_HERE' -p |
Include file names
|
git log --all --grep='SEARCH_STRING_HERE' --name-only |
Categories: How-To's, Technology Tags: commit, contains, Find, git, git log, howto, Log, Log message, Message, tips
|
No comments
Author:
erics, April 24th, 2018
https://linux.die.net/man/8/lsblk # lsblk -a
|
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT nvme1n1 259:0 0 100G 0 disk /volumes/data nvme0n1 259:1 0 20G 0 disk ├─nvme0n1p1 259:2 0 20G 0 part / └─nvme0n1p128 259:3 0 1M 0 part |
Categories: How-To's, Technology Tags: Amazon, Attached, AWS, Device, Disk, Drive, Find, howto, Linux, Locate, lsblk, tips
|
No comments
Author:
erics, July 7th, 2015
To search for non-ASCII characters: /[^\d0-\d127] Use the substitute function to clean them up: :%s/[^\d0-\d127]/ /g
Categories: How-To's, Technology Tags: ASCII, Char, Characters, Find, howto, Replace, search, tips, vi, vim
|
No comments
Author:
erics, August 29th, 2014
find . -mtime +7 ! -name “*.gz” -exec gzip {} \;
Categories: How-To's, Technology Tags: Compress, Cron, Find, gzip, howto, mtime, tips, Week
|
No comments
Author:
erics, July 2nd, 2011
|
var WhichButton; jQuery('button').live('click', function() { WhichButton = this.id; }); jQuery('form').live( 'submit', function() { alert( 'Button ID: ' + WhichButton ); return false; }); |
Categories: How-To's, Technology Tags: Button, Find, form, howto, ID, JQuery, Submit, tips
|
No comments
Author:
erics, June 30th, 2011
|
/usr/bin/find /my/dir -name "*.css" -a -not -name "*.min.*" -exec rm {} \; |
Categories: How-To's, Technology Tags: CSS, Delete, Development, Find, howto, javascript, JS, minimized, tips
|
No comments
Author:
erics, June 20th, 2011
|
var Obj = jQuery(this).parent().nextAll('.myClass:first'); |
Categories: How-To's, Technology Tags: Class, Find, howto, javascript, JQuery, JS, Next, NextAll, tips
|
No comments
Author:
erics, November 27th, 2010
Delete all comment lines: :g/^#/d Delete all blank lines: :g/^$/d
Categories: How-To's, Technology Tags: Delete, Find, Global delete, howto, Search and Replace, tips, vim
|
No comments