mpifileutils icon indicating copy to clipboard operation
mpifileutils copied to clipboard

Draft: Add dfind "--printf FMT" option

Open ofaaland opened this issue 6 months ago • 2 comments

Add a --printf option to dfind, enabling the user to produce strings with an arbitrary format using values discovered during the find (e.g. filename, file size, blocks allocated). For example:

$ srun -N1 -n16 /g/g0/faaland1/projects/mfu-install/bin/^Cind --printf "%p blocks %b size %s"  /p/lflood/faaland1/swl/callan-toss4/
[2025-07-31T18:35:46] Walking /p/lflood/faaland1/swl/callan-toss4
[2025-07-31T18:35:56] Walked 486036 items in 10.004 secs (48582.588 items/sec) ...
[2025-07-31T18:36:02] Walked 765358 items in 15.729 secs (48658.632 items/sec) ...
[2025-07-31T18:36:02] Walked 765358 items in 15.731 seconds (48652.838 items/sec)
/p/lflood/faaland1/swl/callan-toss4/4.8-14rc0-pass1 blocks 260 size 133120
/p/lflood/faaland1/swl/callan-toss4/4.8-14rc0-pass1/sphot_998.stdout blocks 66 size 58056
/p/lflood/faaland1/swl/callan-toss4/4.8-14rc0-pass1/minimd_667.stderr blocks 66 size 1647
/p/lflood/faaland1/swl/callan-toss4/4.8-14rc0-pass1/pynamic_1042 blocks 52 size 26624

ofaaland avatar Aug 01 '25 01:08 ofaaland