Fold (Unix)
| fold | |
|---|---|
| Original author(s) | Bill Joy |
| Initial release | 1977 |
| Operating system | Unix and Unix-like |
| Platform | Cross-platform |
| Type | Command |
| License | coreutils: 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.