What’s the equivalent of “git clean” with Perforce?
git-clean – Remove untracked files from the working tree
Cleans the working tree by recursively removing files that are not under version control, starting from the current directory.
-x Don’t use the standard ignore rules read from .gitignore (per
directory) and $GIT_DIR/info/exclude, but do still use the ignore
rules given with -e options. This allows removing all untracked files,
including build products. This can be used (possibly in conjunction
with git reset) to create a pristine working directory to test a clean
build.-X Remove only files ignored by Git. This may be useful to rebuild
everything from scratch, but keep manually created files.
Try (for Unix) from your top-level:
Or, for a clean -f kind of approach just pipe directly to xargs rm instead of first staging the file list in /tmp/list.