検索しましたが、似たようなものが見つかりませんでした。
ext4 形式の NVME ドライブ (SAMSUNG 980Pro など) に、大容量コードベース (AOSP または Yocto) が保存されています。これらのコードベースは、数千のサブディレクトリにある数十万のファイルで構成されることがよくあります。
ファイルを検索するために find を使用する場合、通常は次のようにします。
find . -iname "filename.txt"
私はファイルを操作したくないだけでファイルを探したいと思います。
私はこれがマルチスレッドだとは思いません(私が間違っている場合は訂正してください)。
ファイルの検索がIOバインディングの場合が多いですが、ドライブ速度が速く、複数のスレッドでサブディレクトリを繰り返すことができるツールを使用すると、結果の検索速度を大幅に向上できると思います。
間違っていたら訂正してください。私が正しい場合は、そのようなツールがあるかどうか教えてください。
答え1
私が探していたツールを見つけました:https://github.com/sharkdp/fd
実際のシステムのテスト結果は次のとおりです。
stulluk /media/WORK/RDK/521 $ time find . -iname "dsAudio.c"
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/AMLTVT5W-134-Volumelevel_setting_to_0.patch/rpc/srv/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/0001-Add-audio-default-persistent-settings.patch/rpc/srv/dsAudio.c
./build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
./build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
real 0m11,925s
user 0m4,753s
sys 0m7,103s
stulluk /media/WORK/RDK/521 $ time find . -iname "dsAudio.c"
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/AMLTVT5W-134-Volumelevel_setting_to_0.patch/rpc/srv/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/0001-Add-audio-default-persistent-settings.patch/rpc/srv/dsAudio.c
./build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
./build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
real 0m11,898s
user 0m4,618s
sys 0m7,211s
stulluk /media/WORK/RDK/521 $ time find . -iname "dsAudio.c"
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/AMLTVT5W-134-Volumelevel_setting_to_0.patch/rpc/srv/dsAudio.c
./build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/0001-Add-audio-default-persistent-settings.patch/rpc/srv/dsAudio.c
./build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
./build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
real 0m11,880s
user 0m4,598s
sys 0m7,215s
stulluk /media/WORK/RDK/521 $ time fd dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
real 0m4,495s
user 0m23,689s
sys 0m41,132s
stulluk /media/WORK/RDK/521 $ time fd dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
real 0m4,491s
user 0m24,473s
sys 0m40,966s
stulluk /media/WORK/RDK/521 $ time fd -HI dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/0001-Add-audio-default-persistent-settings.patch/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/AMLTVT5W-134-Volumelevel_setting_to_0.patch/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
real 0m5,446s
user 0m17,727s
sys 0m58,009s
stulluk /media/WORK/RDK/521 $ time fd -HI dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/armv7at2hf-neon-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-headers/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/AMLTVT5W-134-Volumelevel_setting_to_0.patch/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/.pc/0001-Add-audio-default-persistent-settings.patch/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/cli/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings/rdkv-2023q2-dunfell+gitrAUTOINC+40fe1c3597-r0/git/rpc/srv/dsAudio.c
build/tmp/work/mesont5w_5.4_lib32_at301-rdkmllib32-linux-gnueabi/lib32-devicesettings-hal-amlogic-tv/gitAUTOINC+08aefcf7c0-r0/git/dsAudio.c
real 0m5,431s
user 0m19,166s
sys 0m56,250s
stulluk /media/WORK/RDK/521 $