Linux-fach-Befehl
Linux-fach-Befehl wird verwendet, um die Datei Spaltenbreite zu begrenzen.
fach liest den Inhalt aus der angegebenen Datei wird mehr sein als die Breite der Spalte nach der Spalte zusätzliche Zeichen zur Standard-Ausgabegerät hinzugefügt. Wenn keine Dateinamen oder Dateinamen gegeben angeben "-", dann falten Befehlsdaten aus dem Standardeingabegerät liest.
Grammatik
fold [-bs][-w<每列行数>][--help][--version][文件...]
Parameter:
- -b oder --bytes in Byte Spaltenbreite für das Gerät, anstatt der Verwendung der Zeilennummer der Einheiten.
- -s oder ein Leerzeichen als --spaces Punkte Breaks.
- -w <Anzahl der Zeilen pro Spalte> oder --width <Anzahl der Zeilen pro Spalte> Legt die maximale Anzahl der Zeilen pro Spalte.
- --help Online-Hilfe.
- --version Versionsnummer anzeigen.
Beispiele
Die Zeile Namen testfile-Datei in eine Breite von 30 gefaltet, verwenden Sie den folgenden Befehl ein:
fold -w 30 testfile
Zum Vergleich ist die erste Testdatei Dateiausgabe wie folgt:
$ 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.
Dann nutzen Sie die Falte Faltdisplay-Befehl:
$ 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