Linuxの倍のコマンド
リナックス倍コマンドは、ファイルの列の幅を制限するために使用されます。
倍の命令列を標準出力デバイスに追加の文字を追加した後、指定したファイルから内容が列の幅以上になります読み取ります。 「 - 」によって与えられたファイル名またはファイル名を指定しない場合は、命令は、標準的な入力装置からデータを読み出す折り畳みます。
文法
fold [-bs][-w<每列行数>][--help][--version][文件...]
パラメータ:
- -bまたは単位ではなく、ユニットの行番号を使用するためのバイト列幅で--bytes。
- ブレークポイントを--spacesとして-sまたはスペース文字。
- -w <列あたりの行数>または--width <列あたりの行数は、>列あたりの最大行数を設定します。
- オンラインヘルプを--help。
- --versionバージョン情報を表示。
例
30の幅に折り畳まれた行testfileという名前のファイルには、次のコマンドを使用します。
fold -w 30 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