bugfindutils - Bugs: bug #20997, Patterns in files and directories

 
 

bug #20997: Patterns in files and directories

Submitter:  None
Submitted:  Fri 07 Sep 2007 02:58:47 PM UTC
   
 
Category:  find Severity:  1 - Wish
Item Group:  None Status:  Works For Me
Privacy:  Public Assigned to:  None
Originator Name:  Vladimir Giszpenc Originator Email:  -email is unavailable-
Open/Closed:  Closed Release:  None
Fixed Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Sat 10 Nov 2007 04:00:10 PM UTC, comment #3: 

No response from submitter, closing.

James Youngman <jay>
Group administrator
Sat 08 Sep 2007 01:53:41 PM UTC, comment #2: 

I think find already does what you want.   Can you think of a case where it can't?

James Youngman <jay>
Group administrator
Fri 07 Sep 2007 03:05:41 PM UTC, comment #1: 

Dual pattern matching is already possible.  For example, this finds all directories that match C??, followed by all files in those directories that match R*:

$ find -wholename '*/C??/*' -name 'R*'
./CVS/Repository
./CVS/Root
./doc/CVS/Repository
./doc/CVS/Root

You may want to provide more details of the exact patterns you are trying to find, so that we can help determine a working expression for that goal.

Likewise, dual file-type matching is already possible, as in this example that finds both directories and regular files:

$ find CVS \( -type d -o -type f \)
CVS
CVS/Entries
CVS/Repository
CVS/Root
CVS/Template

Eric Blake <ericb>
Group administrator
Fri 07 Sep 2007 02:58:47 PM UTC, original submission:  

Hi,

This is more of an enhancement request than a bug, and hopefully it is accurate.  My overall goal is search for directories that match a pattern and within those directories search for files that match another pattern.

The pattern matching available is only for files or wholenames, but does not allow for two patterns.  I understand could do this in two shots, but I thought others might like the convenience of a pattern for paths separate from the files as well one for files.

The other possible enhancement would be to allow multiple types.  So if one only wants regular files and directories, one could do -type d,f (or whatever syntax you choose).  This would exclude all the other file types...

Best regards,

Vladimir Giszpenc

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jay (Posted a comment)
  • -email is unavailable- added by ericb (Posted a comment)
  • -email is unavailable- added by None (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2007-11-10 jay Open/ClosedOpen Closed
    2007-09-08 jay Severity3 - Normal 1 - Wish
    2007-09-07 ericb StatusNone Works For Me

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code