YouTip LogoYouTip

Linux Comm Fold

# Linux fold Command [![Image 3: Linux Command Reference](#) Linux Command Reference](#) The Linux fold command is used to limit the column width of a file. The fold command reads content from specified files, adds a line break character after columns that exceed the specified width, and outputs to the standard output device. If no file name is specified, or if the given file name is "-", the fold command reads data from the standard input device. ### Syntax fold [file...] **Parameters**: * -b or --bytes Calculate column width in bytes, rather than using line count. * -s or --spaces Use space characters as the break point. * -w or --width Set the maximum number of columns. * --help Online help. * --version Display version information. ### Examples To fold the lines of a file named testfile to a width of 30, you can use the following command: fold -w 30 testfile For comparison, first output the contents of the testfile as follows: $ cat testfile #View the contents of testfile Linux networks are becoming more and more common, but security is often an overlooked issue. Unfortunately, in today’s environment all networks are potential hacker targets, from top-secret military research networks to small home LANs. Linux Network Security focuses on securing Linux in a networked environment, where the security of the entire network needs to be considered rather than just isolated machines. It uses a mix of theory and practical techniques to teach administrators how to install and use security applications, as well as how the applications work and why they are necessary. Then use the fold command to display the folded output: $ fold -w 30 testfile #Fold lines to a width of 30, display the testfile content Linux networks are becoming mo re and more common, but securi ty is often an overlooked issu e. Unfortunately, in today’s environment all networks are potential hacker targets, from top-secret military research networks to small home LANs. Linux Network Security focuses on securing Linux in a networ ked environment, where the sec urity of the entire network ne eds to be considered rather th an just isolated machines. It uses a mix of theory and pract ical techniques to teach admin istrators how to install and u se security applications, as w ell as how the applications wo rk and why they are necessary [![Image 4: Linux Command Reference](#) Linux Command Reference](#)
← Linux Comm GrepLinux Comm Fmt β†’