特定の名前パターンを見つけるときに異なる形式のファイルを一覧表示する

特定の名前パターンを見つけるときに異なる形式のファイルを一覧表示する

txtファイルを編集したいですvideoAvideoBmovsファイル名に名前空間が含まれている場合のみ -test

例えば。

videoDir
    |-videoA
        |- videoA_v001_test.mov
        |- videoA_v001_info.txt
    |-videoB
        |- videoB_v001_test.mov
        |- videoB_v001_info.txt
    |-videoC
        |- videoC_v002.mov
        |- videoC_v002_info.txt

上記で修正したかったvideoDir/videoA/videoA_v001_info.txtのですが、そのファイル名に。videoDir/videoB/videoB_v001_info.txtvideoC_v002_info.txt.movtest

find -name "*.mov" | grep -rn "test" | find -name "*.txt"出力からtxtファイルでフィルタリングすると思ったので、-、find -name "*.txt"`コマンドを考えましたが、find -name "*.mov" | grep -rn "test" does indeed lists out the 2 files that fulfills the condition (videoA and videoB). I added inまだすべてのtxtファイルを一覧表示したので間違っていました。

ベストアンサー1

そしてzsh

vi ./**/*_test.mov(.s:_test.mov:_info.txt:)

おすすめ記事