right tool for the job
Derek Martin
invalid at pizzashack.org
Thu Mar 4 10:37:14 EST 2004
On Thu, Mar 04, 2004 at 09:59:40AM -0500, Rob Lembree wrote:
>
> I need to make a list of files based on a few things.
> The list needs to explicitly exclude some directories,
> but with exceptions.
>
> So for example, I want to grab a whole directory hierarchy
> such as 'files', but exclude subdirectory 'exclude', but
> include subdirectory 'exclude/include'
>
> files
> files/exclude <---- this directory is excluded
> files/exclude/include <---- except this directory or file
> files/exclude/others...
Yucky.
The first thing that occurs to me is that it may be worth looking at
whether or not you can reorganize your data. The second thing that
occurs to me is that depending on the nature of the beast
(organization, depth, exact paths, how many files and directories
there are, and how static the directory structure is), you might make
your job easier by simply making symbolic links from the 'include'
directory to somewhere outside of 'exclude', and then do your
processing, finding canonical names of paths which include symlinks if
necessary.
Or, something like that.
Often, it's not about the code... it's about the data.
--
Derek D. Martin
http://www.pizzashack.org/
GPG Key ID: 0xDFBEAD02
-=-=-=-=-
This message is posted from an invalid address.
Replying to it will result in undeliverable mail.
Sorry for the inconvenience. Thank the spammers.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.gnhlug.org/mailman/private/gnhlug-discuss/attachments/20040305/a8f8e65d/attachment.bin
More information about the gnhlug-discuss
mailing list