commande pli Linux
commande pli Linux est utilisé pour limiter la largeur de colonne de fichier.
pliez instruction lit le contenu du fichier spécifié sera plus que la largeur de la colonne après colonne ajouté caractères supplémentaires pour le périphérique de sortie standard. Si pas spécifier un nom de fichier ou le nom de fichier donné par "-", puis pliez instruction lit les données à partir du dispositif d'entrée standard.
grammaire
fold [-bs][-w<每列行数>][--help][--version][文件...]
Paramètres:
- -b ou --bytes en Byte largeur de colonne pour l'unité, plutôt que l'utilisation du numéro de la ligne d'unités.
- -s ou un espace comme --spaces Breaks points.
- -w <nombre de lignes par colonne> ou --width <nombre de lignes par colonne> Définit le nombre maximal de lignes par colonne.
- --help aide en ligne.
- --version informations sur la version d'affichage.
Exemples
Le fichier testfile de ligne nommé plié en une largeur de 30, utilisez la commande suivante:
fold -w 30 testfile
A titre de comparaison, la sortie du premier fichier fichier_test est la suivante:
$ 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.
Utilisez ensuite la commande d'affichage de pliage double:
$ 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