Share, Vote, & Discuss Ideas

We're constantly looking for new ways to improve our products and are asking you to help us by sharing your own ideas, voting for ideas you like, and discussing them with the rest of the community.

p4 find

It would be great if I had a simple command that could find files for certain criteria such as - full regular expression search in file and directory names - files that have +k type, whether it is ktext or text+kx - files submitted within the last two weeks - files larger than 10MB The output should be so that I can simply pipe it into another Perforce command such as 'p4 verify' or even 'p4 obliterate' :-)
  • Guest
  • May 29 2015
  • Attach files
  • Lester Cheung commented
    June 24, 2015 06:56

    This is "p4 grep" - already implemented idea from ideaX.

  • Guest commented
    July 20, 2015 13:48

    Nope it isn't. 'p4 grep' only searches through the file content, it doesn't know anything about the file type.

    I cannot use 'p4 grep' to find files of a certain type or file size, or perform a case insensitive search on the file name on a case sensitive server.

    'p4 find' would be modelled on the Unix find command (similar on how 'p4 grep' is modelled on the Unix grep command). 

  • Jeff Anton commented
    July 27, 2015 18:01

    I can think of several occasions where this would have been very useful.

    Tricky though, we don't like to scan the whole depot much.  But with lockless now, it should not be too bad.

  • Lester Cheung commented
    December 16, 2015 05:27

    Ah - yes I've been doing this a lot lately with something like: "p4 -F %depotFile% files //depot/...|grep/sed/perl|someother script"... Would be great if one could filter by other attributes like filetype as you said without resorting to p4todb...

    (Hello from the other side of the firewall!)

  • Guest commented
    April 20, 2017 21:43

    I'm rather surprised this has so few votes. I have wished for this since shortly after diving into the Perforce pool. It would be a HUGE help right now. Instead I'm going to have to get funky.