검색했지만 비슷한 것을 찾을 수 없었습니다.
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 $