[clug] command of the hour

Neil Symons neil.symons at gmail.com
Sat Feb 14 13:12:29 GMT 2009


Here is a common command I use to search for specific words in a active log
file.

Handy to monitor or debug for specific daemons in syslog

example

tail -f /var/log/syslog |grep  auth"\|"pop"\|"imap

and if you want to exclude certain lines that contain parts of your above
grep you can

tail -f /var/log/syslog | grep auth"\|"pop"\|"imap | grep -v SSL

maybe you can replace "tail -f" with "cat" and then > or >> to a file for
recording.
or even pipe it to mail -s "Subject" email at address to email the results to
you.

- N


On Thu, Feb 12, 2009 at 3:13 PM, Ian <darkstarsword at gmail.com> wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> Thanks for another useful command Kim.
>
> As has already been mentioned you can mount disks by ID and UUID - I
> use that all the time for my permanent disks. I have one encrypted
> removable disk that I wanted to be able to mount and unmount with
> minimal fuss so my solution was to create a new udev rule under
> /etc/udev/rules.d/10-local.rules containing:
> SUBSYSTEMS=="usb", PROGRAM="/lib/udev/vol_id -u %N",
> RESULT=="insert-your-disk-uuid-here", SYMLINK+="dse"
>
> Whenever I attach it udev automatically creates /dev/dse as a symlink
> to the _partition_ with that uuid. Then I can simply run 'pmount dse'
> which prompts me for my passphrase and mounts it under /media/dse - no
> need to set up /etc/crypttab or /etc/fstab and no need to sudo just to
> mount or decrypt it. When I'm done, 'pumount dse' will unmount and
> remove it from cryptsetup.
>
> Cheers,
> - -Ian
>
> - --
> http://darkstarshout.blogspot.com/
> - --
> On the day *I* go to work for Microsoft, faint oinking sounds will be
> heard from far overhead, the moon will not merely turn blue but
> develop polkadots, and hell will freeze over so solid the brimstone
> will go superconductive.
>     -- Erik Raymond, 2005
> - --
> Please avoid sending me Word or PowerPoint attachments.
> See http://www.gnu.org/philosophy/no-word-attachments.html
>
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
> Comment: Use GnuPG with Firefox : http://getfiregpg.org (Version: 0.7.3)
>
> iD8DBQFJk6HFrQR5CkD4dNARAtE+AKCX/D22GePGIyXL0G90LyCxpxTAvQCdENSp
> 2zg9N1LlupG36gPfVIR4OTA=
> =F3K8
> -----END PGP SIGNATURE-----
> --
> linux mailing list
> linux at lists.samba.org
> https://lists.samba.org/mailman/listinfo/linux
>


More information about the linux mailing list