comando volte Linux
comando di Linux volte viene utilizzato per limitare la larghezza della colonna file.
piegare istruzione legge il contenuto del file specificato sarà superiore alla larghezza della colonna dopo colonna aggiunto caratteri aggiuntivi al dispositivo di uscita standard. Se non specifichi il nome del file o il nome del file indicato con "-", quindi piegare l'istruzione legge i dati dal dispositivo di input standard.
grammatica
fold [-bs][-w<每列行数>][--help][--version][文件...]
parametri:
- -b o --bytes in Byte larghezza di colonna per l'unità, piuttosto che l'uso del numero linea di unità.
- -s o un carattere spazio come --spaces Breaks punti.
- -w <numero di righe per colonna> o --width <numero di righe per colonna> Imposta il numero massimo di righe per colonna.
- --help guida in linea.
- --version informazioni sulla versione di visualizzazione.
Esempi
Il file testfile riga denominata piegato in una larghezza di 30, utilizzare il seguente comando:
fold -w 30 testfile
Per confronto, la prima uscita di file testfile è il seguente:
$ 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.
Quindi utilizzare il comando display pieghevole piega:
$ 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