我知道我可以使用以下命令将单个文件解压缩到当前工作目录(假设我有一个名为test.tar的tar文件,并且其中包含一个名为testfile1和testfile2的文件):
$tar xvf test.tar testfile1
Run Code Online (Sandbox Code Playgroud)
我可以使用-C选项将文件提取到另一个目录:
$tar xvf test.tar -C anotherDirectory/
Run Code Online (Sandbox Code Playgroud)
当我将上述两种技术结合在一起时,我想我可以将一个文件提取到另一个目录中.
$ tar xvf test.tar testfile1 -C anotherDirectory/
Run Code Online (Sandbox Code Playgroud)
但结果是我只能将testfile1提取到当前工作目录,而不是另一个目录.
我想知道如何从tar中提取单个文件到另一个目录?
所有
在Oracle sql*plus中创建表时,我想限制INTEGER列的长度只能为8.
例如:RegNumber是INTEGER,它必须是8位数字.
我在创建表格时如何做到这一点?
使用XML Schema声明a complexType只有一个子元素时,以下三种方法都实现了目标:
<xs:complexType> <xs:sequence> <xs:element ref="somevalue"/> </xs:sequence> </xs:comlexType>
<xs:complexType> <xs:choice> <xs:element ref="somevalue"/> </xs:choice> </xs:comlexType>
<xs:complexType> <xs:all> <xs:element ref="somevalue"/> </xs:all> </xs:comlexType>
Run Code Online (Sandbox Code Playgroud)
显然,sequence,choice和all不是必须的,为单独的元件,因为它们应当由用于指示多个元素的顺序.是否有一种更简洁的方式来声明complexType只有一个子元素?(即一个消除使用sequence,all或者choice,某种方式.)