与cleartool mkdir的mkdir -p等效

时间:2019-04-11 13:02:01

标签: clearcase cleartool

UNIX mkdir具有-p标志,用于创建父目录(如果不存在)。是否有等效的cleartool?显然,cleartool mkdir foo/bar/不存在时,foo不起作用。

2 个答案:

答案 0 :(得分:0)

最简单的方法是在目录结构中创建文件并使用mkelem -mkpath ...

我在我的一个沙箱文件夹中创建了一个“ temp1”目录,一个“ temp2”目录和一个“ temp.txt”文件,然后从“ temp1”的父目录使用-mkpath将文件添加到源代码管理“查看私有目录。

PS M:\tempview\foobarf\Documents> cleartool mkelem -mkpath .\temp1\temp2\temp.txt
Creating parent directory element ".\temp1\temp2".
Creating parent directory element ".\temp1".
Created directory element ".\temp1".
Checking out parent directory ".\temp1".
Created directory element ".\temp1\temp2".
Checking out parent directory ".\temp1\temp2".
Creation comments for ".\temp1\temp2\temp.txt":
Test1.
.
Created element ".\temp1\temp2\temp.txt" (type "utf16le_file").
Checked out ".\temp1\temp2\temp.txt" from version "\main\0".

它是UTF-16LE,因为Powershell的区域设置是宽字符,并且使用“ dir> temp1 \ temp2 \ temp.txt”创建了“ temp.txt”。

答案 1 :(得分:0)

添加一个文件时,

cleartool mkelem -mkpath是一个不错的选择。

但是,如果要添加多个文件,在尚不存在的树结构中,请不要忘记clearfsimport:它可以在一个命令中import flat files to a branch ,并会为您创建任何丢失的文件夹。

seen hereclearfsimport -rec -nset <Source> <target>

相关问题