【发布时间】:2017-11-24 08:45:30
【问题描述】:
I have a text file which has list of file names, I want to search these file names in a folder which has thousands of files and move the matching files to different location on linux.
有人可以帮助我执行此命令吗?
下面是我正在使用的代码
#!/bin/bash
file="/home/BILEKJ/Reprocess/data.txt"
while IFS= read -r line
do
mv "/home/BILEKJ/Reprocess/EDI855/$line" "/home/BILEKJ/Reprocess/Final855" >/dev/null 2>&1
done <"$file"
【问题讨论】:
-
该文件名列表有多“大”?
-
该列表有大约 4000 个文件名