Команда Linux складка
Команда Linux складка используется для ограничения ширины столбца файла.
сложите инструкция считывает содержимое из указанного файла будет больше, чем ширина колонки после колонки добавили дополнительные символы в стандартное устройство вывода. Если не указать любое имя файла или имя файла, данное "-", затем сложите инструкция считывает данные из стандартного устройства ввода.
грамматика
fold [-bs][-w<每列行数>][--help][--version][文件...]
Параметры:
- -b или --bytes в байтовой ширины столбца для единицы, а не с использованием линии количества единиц.
- -s или символ пробела в качестве --spaces брейки точек.
- -w <число строк в столбце> или --width <число строк в столбце> Устанавливает максимальное количество строк в столбце.
- --help интерактивную справку.
- --version показать информацию о версии.
примеров
Строка с именем файла TestFile складывают в ширину 30, используйте следующую команду:
fold -w 30 testfile
Для сравнения, первый выход TestFile файл выглядит следующим образом:
$ cat testfile #查看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.
Затем используйте команду кратную складной дисплей:
$ fold -w 30 testfile #行折叠成宽度为30,显示testfile 文件 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