Cookbook

ffind -- file find script

A little ksh script* called ffind (file find) that interfaces
with the find command to locate files by name or name fragment.
The find syntax, and the need for quoting, is kind of funky,
particularly if looking for multiple fragments.


  $ find . -name '*foo*' -print


is bad enough and can be replaced with ffind foo.  But if you
want to look for both "foo" and "bar" files you need to OR them
with "-o" and group them with parens.  And don't forget to quote
the parens!  So a simple ffind foo bar would become:


  $ find . \( -name '*foo*' -o -name '*bar*' ')' -print


If you don't give any arguments to ffind it will prompt you for them:


  $ ffind
  Enter a file name fragment to search for
  (A blank line ends input): 

  
The only ffind option is "-i" to ignore case in matches.  It uses
find's "-iname" option instead of "-name".

Hope you find it useful.

Jon

locate

So in the dizzyingly complex Linux systems I tend to work with (my Desktop being one of the worst), I've found locate to be my goto tool for locating anything and everything that's listed as a file. Locate is great, works blazingly fast, doesn't encounter permission denied errors like find. The only issue I've encountered with locate is that it uses an index database of the local file system to search for your pattern string. This database needs to be updated prior to searches, in some shared environments this update is controlled by a cron run, but if you have sudo rights or are the root user then you can run the "locate -u" command which is often aliased as "updatedb".


user@hp-laptop:~$ locate tcpdump.
/usr/share/man/man8/tcpdump.8.gz
/var/lib/dpkg/info/tcpdump.conffiles
/var/lib/dpkg/info/tcpdump.list
/var/lib/dpkg/info/tcpdump.md5sums
/var/lib/dpkg/info/tcpdump.postinst
/var/lib/dpkg/info/tcpdump.postrm
user@hp-laptop:~$

Drupal, A Practical Guide

In the interest of giving back to the community that has given me so much I'm going to share my trials and triumphs across the interwebs with the CMS known as Drupal. In the hopes that some of these little bits of knowledge help other people who choose to work with or just experiment with Drupal. -John W

novalug.com