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"
如何 “大” 是*文件名列表*? – RomanPerekhrest
该列表有大约4000个文件名 – user2231076