Linux commands: Difference between revisions

Jump to navigation Jump to search
335 bytes added ,  2 February 2018
Line 19: Line 19:
* [http://tailforwin32.sourceforge.net/ Tail for Win32] GUI interface ({{Win}}) {{exclaim}} not support Unicode file for v.4.2.6
* [http://tailforwin32.sourceforge.net/ Tail for Win32] GUI interface ({{Win}}) {{exclaim}} not support Unicode file for v.4.2.6


=== Display the entire content of text file ===
=== Display the content of text file ===
 
==== Display the entire content of text file ====
* [http://en.wikipedia.org/wiki/Vi vi] <nowiki>[options]</nowiki> ''filename''  ({{Linux}})
* [http://en.wikipedia.org/wiki/Vi vi] <nowiki>[options]</nowiki> ''filename''  ({{Linux}})
* {{kbd | key=<nowiki>cat <filename></nowiki>}}  ({{Linux}})
* {{kbd | key=<nowiki>cat <filename></nowiki>}}  ({{Linux}})
* {{kbd | key=<nowiki>type <filename></nowiki>}}  ({{Win}})
* {{kbd | key=<nowiki>type <filename></nowiki>}}  ({{Win}})


=== Display the partial content of large text file page by page ===
==== Display the partial content of large text file page by page ====
* {{kbd | key=<nowiki>cat <filename> | less</nowiki>}}  ({{Linux}} or Cygwin on {{Win}}) {{exclaim}} Chinese issue<ref>[https://stackoverflow.com/questions/6943928/show-special-characters-in-unix-while-using-less-command linux - Show special characters in Unix while using 'less' Command - Stack Overflow] ''un-verified''</ref>
* {{kbd | key=<nowiki>cat <filename> | less</nowiki>}}  ({{Linux}} or Cygwin on {{Win}}) {{exclaim}} Chinese issue<ref>[https://stackoverflow.com/questions/6943928/show-special-characters-in-unix-while-using-less-command linux - Show special characters in Unix while using 'less' Command - Stack Overflow] ''un-verified''</ref>
* {{kbd | key=<nowiki>type <filename> | more</nowiki>}}  ({{Win}}) If the file was encoded in UTF-8, you need to key in {{kbd | key=chcp 65001}} first <ref>[http://fatting10.blogspot.tw/2015/08/solved-window.html (Solved) Window命令視窗中文亂碼 改編碼方法]</ref>.
* {{kbd | key=<nowiki>type <filename> | more</nowiki>}}  ({{Win}}) If the file was encoded in UTF-8, you need to key in {{kbd | key=chcp 65001}} first <ref>[http://fatting10.blogspot.tw/2015/08/solved-window.html (Solved) Window命令視窗中文亂碼 改編碼方法]</ref>.
==== Display only certain lines by number ====
[https://unix.stackexchange.com/questions/288521/with-the-linux-cat-command-how-do-i-show-only-certain-lines-by-number text processing - With the Linux "cat" command, how do I show only certain lines by number - Unix & Linux Stack Exchange]


=== Newline count (count the number of lines of a file), word count ===
=== Newline count (count the number of lines of a file), word count ===

Navigation menu