Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ディレクトリに何千ものhtmlファイルがあります。ファイル名に Chennai を含むファイルを抽出し、別のフォルダーに入れたい。私はそれが可能であると確信しています。ファイルを別のフォルダーにコピーするのに十分なほど近くにありません。
試す:
find directory_with_htmls -type f -name "*Chennai*.html" -exec cp {} some_other_folder \;
これにより、名前にdirectory_with_htmls含まれるディレクトリ内のhtmlファイルがディレクトリにコピーされます。Chennaisome_other_folder
directory_with_htmls
Chennai
some_other_folder