Alternative command without an explicit loop (man find
):
find . -type f -exec mv '{}' '{}'.jpg ;
Explanation: this recursively finds all files (-type f
) starting from the current directory (.
) and applies the move command (mv
) to each of them. Note also the quotes around {}
, so that filenames with spaces (and even newlines...) are properly handled.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…