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

 
 

bug #20997: Patterns in files and directories

Submitted by:  None
Submitted on:  Fri 07 Sep 2007 02:58:47 PM UTC  
 
Category: findSeverity: 1 - Wish
Item Group: NoneStatus: Works For Me
Privacy: PublicAssigned to: None
Originator Name: Vladimir GiszpencOriginator Email: -unavailable-
Open/Closed: ClosedRelease: None
Fixed Release: None

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

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

No response from submitter, closing.

James Youngman <jay>
Project 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>
Project 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>
Project 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 File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 10 Nov 2007 04:00:10 PM UTCjayOpen/ClosedOpen=>Closed
    Sat 08 Sep 2007 01:53:41 PM UTCjaySeverity3 - Normal=>1 - Wish
    Fri 07 Sep 2007 03:05:41 PM UTCericbStatusNone=>Works For Me

    Back to the top


    Powered by Savane 3.1-cleanup1