从多个文件夹中移动txt文件并重命名

问题描述 投票:-2回答:2

我有多个文件夹,每个文件夹中都有一个文件名“tabled_output.tab”。我想将此文件移动到新文件夹中,并使用原始文件夹名称重命名该文件。我需要在循环中运行它来移动所有“tabled_output.tab”文件。

这是我到目前为止:

 cd /storage/home/iul116/.ssh/poblacionesmaices/inputfiles_osr/Output/
 ls > razas.txt
 cd /storage/home/iul116/.ssh/poblacionesmaices/inputfiles_osr/Output/(x)
 mv tabled_output.tab (x)
 mv (x) /storage/home/iul116/.ssh/poblacionesmaices/inputfiles_osr/Results/
linux ubuntu
2个回答
© www.soinside.com 2019 - 2024. All rights reserved.