Fold (Unix)

fold
Original author(s)Bill Joy
Initial release1977; 47 years ago (1977)
Operating systemUnix and Unix-like
PlatformCross-platform
TypeCommand
Licensecoreutils: GNU GPL v3

fold is a Unix command used for making a file with long lines more readable on a limited width computer terminal by performing a line wrap.

Most Unix terminals have a default screen width of 80, and therefore reading files with long lines could get annoying. The fold command puts a line feed every X characters if it does not reach a new line before that point. If the -w argument is set, the fold command allows the user to set the maximum length of a line.