"a rattling sound or effect," 1680s, echoic, originally of a cooper hammering tubs.
also rat's-tail, from rat (n.) + tail (n.1). Used since 16c. of conditions, growths, or devices held to resemble a rat's long, hairless tail in any way, including "lank lock of hair" (1810); "end of a rope" (1867). Related: Rat-tailed. A rat-tail file (1744) is a fine, round file used for enlarging holes in metal.