DWALK(1)
π DWALK(1) β the distributed walk & list moment
okay bestie, welcome to dwalk, brought to you by the mpiFileUtils fam (that's the manual name, mwah π). this is the page for dwalk(1) and honestly? it's giving "ls and du had a glow-up and went parallel." let's get into it.
β¨ SYNOPSIS β¨
dwalk [OPTION] PATH ...
that's it. options, then one or more paths. slay.
πΈ DESCRIPTION πΈ
okay so first thing: dwalk is a parallel MPI application that recursively walks a directory and lists what's inside. like, recursively. tree mode. all the way down. π³
bestie it's literally ls(1) and du(1) energy combined:
- like
du(1), it reports a summary of the total number of files and bytes π - like
ls(1), it sorts and prints information about individual files β¨
and the fun part? you can sort the output on different fields β name, user, group, size, etc. β and you can compute a histogram of file sizes, listing how many files fall into bins you define. custom bins. main character behavior fr fr. π
π OPTIONS π
-i,--inputFILE β read the source list from FILE. heads up: FILE must have been generated by another tool from the mpiFileUtils suite. no random files, iykyk.-o,--outputFILE β write the processed list to FILE in binary format. the format can be changed with the--textoption.-t,--textβ must be used with the--outputoption. writes the processed list of files to FILE in ascii text format. π-l,--liteβ walk the file system without stat. light work, no stat, no stress.-s,--sortFIELD β sort output by comma-delimited fields (scroll down to SORT FIELDS, bestie π).-d,--distributionsize:SEPARATORSβ print the distribution of file sizes. for example, specifyingsize:0,80,100will report the number of files that have size0bytes, between1-80bytes, between81-99bytes, and100bytes or greater. bins on bins on bins π-f,--file-histogramβ creates a file histogram without requiring the user to provide the bin sizes. the bins are created dynamically based on the max file size. the first bin is always for only zero byte files, and the rest go up until the max file size is included in the very last bin. it always goes up by orders of magnitude in powers of two. so, an example of bin separators would be:0, 2^10, 2^20, 2^30β assuming the max file size was somewhere within the2^20-2^30range. the histogram also includes both files and directories. iconic. π-p,--printβ print files to the screen. yes queen, show us everything.--no-atimeβ must be used with the--liteoption. do not update last file access time. leave that atime alone π-L,--dereferenceβ dereference symbolic links and walk the target file or directory that each symbolic link refers to. π¦--progressN β print a progress message to stdout approximately every N seconds. the number of seconds must be a non-negative integer. a value of0disables progress messages.-v,--verboseβ run in verbose mode. extra chatter, we love that for us.-q,--quietβ run tool silently. no output is printed. π€«-h,--helpβ print usage.
π₯ SORT FIELDS π₯
by default, the list of files dwalk captures is not sorted. (chaos, honestly.) to sort it, you can specify one or more fields in a comma-delimited list:
name,user,group,uid,gid,atime,mtime,ctime,size
a field name can be preceded with - to sort by that field in reverse order. (yes bestie, -size for the big files first, we see you π)
and if you give more than one field, a lexicographic sort is executed. no cap.
β EXAMPLES β
1. to print summary information for a directory:
mpirun -np 128 dwalk -v /dir/to/walk
2. to print a list of files, sorted by file size, then by file name:
mpirun -np 128 dwalk βprint βsort size,name /dir/to/walk
3. to save the list of files:
mpirun -np 128 dwalk βoutput out.dwalk /dir/to/walk
4. print the file distribution for a specified histogram based on the size field from the top level directory:
mpirun -np 128 dwalk -v βprint -d size:0,20,1G src/
ok real talk, that's exactly how the examples appear in the original page β including those funky dashes onβprint,βsort, andβoutput. copying them character for character because that's the assignment π
π SEE ALSO π
the mpiFileUtils source code and all documentation may be downloaded from <https://github.com/hpc/mpifileutils> β go be nosy, bestie, it's a whole vibe.
π AUTHOR π
HPC
π«Ά COPYRIGHT π«Ά
2022, LLNL/LANL/UT-Battelle/DDN
aaaand that's the page! π this was version 0.12, dated Jan 29, 2025 β so if you're reading this in the future, hi, hope the filesystem's cute. bye bestie, go walk some directories πβ¨π¦
π¦ where this page comes from
- nixpkgs unstable: mpifileutils 0.12
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms