In bash:
find /foo -iname '*.txt' -exec cp {} /dest/ ;
find
will find all the files under the path /foo
matching the wildcard *.txt
, case insensitively (That's what -iname
means). For each file, find
will execute cp {} /dest/
, with the found file in place of {}
.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…