FANDOM


Here, simply, is a collection of information for doing various things on a unix system. Quite simply, my quick reference list.

regex

  • Lookarounds (regex exceptions): On linux box, grep messages log for occurrences of sudo access from userA and userB, but exclude korn and posix shells and the additional "no passwd entry for -i" message that goes with those logs.
/bin/grep -P '^.*sudo:( )+(userA|userB) :.*(?<!USER=userC ; COMMAND=/usr/bin/[k]sh|no passwd entry for -i!)$' /var/log/messages

mount on loop device

Loop devices are handy for mounting ISOs and RAM disks.

$ mkdir /home/user/DVD_mountpoint
$ sudo mount /home/user/path/to/DVD.iso /home/user/DVD_mountpoint -t iso9660 -o loop

Ad blocker interference detected!


Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.