|
NAME
SYNOPSISua [OPTION]... [FILE]...DESCRIPTIONGiven a list of files, ua finds sets comprised of identical ones. ua was designed to take input from find or ls and produce output that is trivial to process by line oriented tools, such as sed, xargs, awk, wc, grep etc. For example, counting the number of sets of duplicates, simply:
or to find the largest such set:
OPTIONS
OUTPUTEach line of the output represents one set of identical files. The columns are the path names separated by sep (-ssep). When -p set, the first column will be the hash value. Remember that if -i or -w are set, the hash value will likely be different from what md5sum would give.ALGORITHMCalculation proceeds in three steps:
-w implies -n, since the byte count is irrelevant information in this case. The two-stage hashing algorithm first calculates identical sets considering only a fixed-size prefix (thus the -2 option requires -m) and then from these sets calculates the final result. This can be much faster when there are many files with the same size or when comparing files with whitespaces ignored. When -w and -m max are both set, the max refers to the first max non-white space characters. EXAMPLES
In the first case, the files are read from the command line, while in the second the file names are read from the standard input. The letter one also prints the hashcode.
Compares the three files ignoring letter case and white spaces. Intermediate steps will be reported on stderr (-v). The -w implies -n, thus file sizes are not grouped. The internal buffer size is reduced to 256, since the whitespaces will cause data to be moved in the buffer.
Considering the large number of files, the calculation will be performed with a two stage hash (-2). Only files that pass the 256 byte prefix hash will be fully hashed.
Ignore white spaces -w (thus use a smaller buffer -b256). Perform the calculation in two stages (-2), first cluster based on the whitespace-free first 256 characters (-m256). Also, separate the identical files in the output by commas (-s,). VERSION1.0, ua -h will tell you whether you have the hashed or the tree version.AUTHOR© Istv´an T. Hern´advolgyi, EU.EDGE LLC, 2007<istvan.hernadvolgyi@gmail.com> LICENSEThis is free software. You may redistribute copies of it under the terms of the Mozilla Public License <http://www.mozilla.org/MPL/>. There is NO WARRANTY, to the extent permitted by law.SEE ALSOMD5(3), md5sum(1), find(1)
Visit the GSP FreeBSD Man Page Interface. |