%s/[Cc][Aa][Tt]/dog/g
Tidbits I've collected on various firewall and IDS/IPS technologies over the years. Linux, CheckPoint, Juniper Netscreen/SSG, Cisco ASA, Cisco IPS, & Sourcefire/Snort
Showing posts with label one-liners. Show all posts
Showing posts with label one-liners. Show all posts
Monday, August 30, 2010
Simple Search & Replace in VI
In vi, this will replace any (uppercase or lowercase variation of the word "cat", or CAT, or cAt, with the word "dog" globally in the entire file.
%s/[Cc][Aa][Tt]/dog/g
%s/[Cc][Aa][Tt]/dog/g
Labels:
Linux,
one-liners
Find files modified in the last 90 minutes
Find files modified in last 90 minutes:
find / -mmin -90
find / -mmin -90
Labels:
Linux,
one-liners
Quick one-liner to find large files on Linux
find / -type f -size +20000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
Labels:
Linux,
one-liners
Subscribe to:
Posts (Atom)