将特定扩展名的文件移动到目录

时间:2016-02-29 22:27:42

标签: bash

我正在尝试将.multianno.txt的所有文件从一个目录移动到另一个目录。我认为下面的命令可行,但*可能导致问题。谢谢你:)。

mv /home/cmccabe/Desktop/NGS/annovar/*.multianno.txt /home/cmccabe/Desktop/NGS/API/2-12-2015/annovar/
mv: cannot stat ‘/home/cmccabe/Desktop/NGS/annovar/*.multianno.txt’: No such file or directory

目录(/home/cmccabe/Desktop/NGS/annovar

TSVC_variants_IonXpress_001_variant_strandbias_readcount.vcf.hg19_multianno.txt
TSVC_variants_IonXpress_002_variant_strandbias_readcount.vcf.hg19_multianno.txt

TSVC_variants_IonXpress_003_variant_strandbias_readcount.vcf.hg19_multianno.txt

1 个答案:

答案 0 :(得分:2)

您的文件名以_multianno.txt结尾,而不是.multianno.txt,因此请使用

mv /home/cmccabe/Desktop/NGS/annovar/*_multianno.txt /home/cmccabe/Desktop/NGS/API/2-12-2015/annovar/