用p4 获得大于 50000个文件的 目录
2014-04-23 15:13
162 查看
由于单位管理员限制,perforce 只能取回不大于50000个文件的文件夹
Request too large (over 50000); see 'p4 help maxresults'
偏偏有些项目的文件数大于这个限制
于是写了一段脚本来遍历perforce文件夹来取回文件
Request too large (over 50000); see 'p4 help maxresults'
偏偏有些项目的文件数大于这个限制
于是写了一段脚本来遍历perforce文件夹来取回文件
<pre style="padding: 0px; margin-top: 10px; margin-bottom: 10px; overflow: visible; font-size: 13.3333330154419px; line-height: 17.3333339691162px; background-color: rgb(255, 255, 255);">#!/bin/bash
function syncdir(){
fullpath=$1/...$2 filepath=$1/*$2
#Encounter maxresults error? if ! p4 sync $fullpath 2>&1 | sed ''/maxresults/' {q1} ' then #sync files only p4 sync $filepath
#go to sub directory for d in `p4 dirs $1/*` do syncdir $d $2 done fi }
echo 'depot path'=$1 echo 'revision/lable/CL'=$2
#$1 depot path, without /... #$2 change list/revision/label
syncdir $1 $2
相关文章推荐
- 用p4 获得大于 50000个文件的 目录
- C_获得当前的工作路径 _getcwd()函数:取得当前的工作目录(unix c和vc+6.0的都文件的区别)
- .net,C#,Ftp各种操作,上传,下载,删除文件,创建目录,删除目录,获得文件列表等
- 获得目录下文件数和文件行数
- Python模块详解以及import本质,获得文件当前路径os.path.abspath,获得文件的父目录os.path.dirname,放到系统变量的第一位sys.path.insert(0,x)
- Windows Phone获得IsolatedStorage中指定目录下的所有文件
- 获得指定目录下的 文件和子目录
- 如何获得gcc/g++编译宏定义和头文件搜索目录的方法说明
- shell查找当前目录下大于1M的文件的三种方法分享
- 获得指定目录下的所有文件的列表(包括子目录下的文件)——VB2005
- Java 递归获得文件目录
- .net,C#,Ftp各种操作,上传,下载,删除文件,创建目录,删除目录,获得文件列表等
- .net,C#,Ftp各种操作,上传,下载,删除文件,创建目录,删除目录,获得文件列表
- 获得文件所在目录 - 获得程序的根(主)目录
- 打印目录中文件大小大于多少的文件
- python获得当前目录下文件,并写到name.txt
- php手记-获得文件或文件夹的上级目录、spl_autoload_register、__autoload
- bash , 查找当前目录,文件大于1024kb ,移动到新的目录中,如果没有这个目录,就创建
- C++ 获得指定目录下的所有文件名称
- 找出指定目录下,大于指定大小的文件(LINUX SHELL)