Jump to content


file spec: show dirs at a specific level


  • Please log in to reply
4 replies to this topic

#1 Miles O'Neal

Miles O'Neal

    Advanced Member

  • Members
  • PipPipPip
  • 111 posts

Posted 16 April 2019 - 08:09 PM

I need to be able to get a list of "subdirs" within a file spec, typically just under the depot level. Using spec as an example, I cannot get a list of most of what is in //spec . (This applies to other depots as well; spec simply shows it a little better.)
I want to see something like:
//spec/client
//spec/label
etc. I'm basically looking for the "ls -d" equivalent.
I cannot seem to get those except by using "p4 files //spec/..." and parsing it, which takes a long time because we have a LOT of data (spec and otherwise).
What I see:
% p4 files //spec
//spec - must refer to client 'p4restore'.
% p4 files //spec/
//spec/ - no such file(s).
% p4 files //spec/\*
//spec/license.p4s#2 - edit default change (text+CS8)
//spec/protect.p4s#2153 - edit default change (text+C)
//spec/triggers.p4s#285 - edit default change (text+C)
//spec/typemap.p4s#10 - edit default change (text+C)
% p4 files //spec/\*/
//spec/*/ - no such file(s).


Is there a way to quickly get this list? (the same would be true with //project_depot/*/*/).

#2 Sambwise

Sambwise

    Advanced Member

  • Members
  • PipPipPip
  • 819 posts

Posted 16 April 2019 - 08:58 PM

"p4 dirs"?

#3 Matt Janulewicz

Matt Janulewicz

    Advanced Member

  • Members
  • PipPipPip
  • 166 posts
  • LocationSan Francisco, CA

Posted 17 April 2019 - 12:27 AM

View PostSambwise, on 16 April 2019 - 08:58 PM, said:

"p4 dirs"?


Also worth noting that if you want to include directories that are deleted in their entirety, user 'p4 dirs -D //spec/*'.
-Matt Janulewicz
Staff SCM Engineer, Perforce Administrator
Dolby Laboratories, Inc.
1275 Market St.
San Francisco, CA 94103, USA
majanu@dolby.com

#4 Miles O'Neal

Miles O'Neal

    Advanced Member

  • Members
  • PipPipPip
  • 111 posts

Posted 17 April 2019 - 04:42 PM

Egad. Thanks. I haven't used this since training several years ago, and forgot all about it.

#5 Ruby96

Ruby96

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 23 May 2019 - 06:47 AM

Lol..Many of us hasn't..And its quite difficult to remember it now MySchoolBucks




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users