That's what I would do, is what I did, though it ended up more advanced than you probably need.Maybe it is time for me to make a my own commend like findmw (short for find my work in the home partition)
You could start as simple as this -
Code:
#!/usr/bin/env python3import osimport sysuser = os.environ["USER"]print("Scanning /home/" + user)for path, dirs, files in os.walk("/home/" + user): for file in files: for match in sys.argv[1:]: if file.lower().find(match.lower()) >= 0: print(path + "/" + file) break
Code:
pi@Pi4B:~/apps/ff $ ./findmw.py gcc-14Scanning /home/pi/home/pi/apps/riscv-for-aarch64/bin/riscv32-unknown-elf-gcc-14.2.1/home/pi/apps/riscv/riscv-gnu-toolchain/gcc-14/.git/logs/refs/heads/releases/gcc-14/home/pi/apps/riscv/riscv-gnu-toolchain/gcc-14/.git/refs/heads/releases/gcc-14/home/pi/apps/riscv/bin/riscv32-corev-elf-gcc-14.1.0pi@Pi4B:~/apps/ff $
Statistics: Posted by hippy — Mon Sep 16, 2024 8:18 pm