Linux commands: Difference between revisions
Jump to navigation
Jump to search
→Display the content of text file
m (→network) |
|||
| Line 14: | Line 14: | ||
* [http://en.wikipedia.org/wiki/Vi vi] <nowiki>[options]</nowiki> ''filename'' (and press {{kbd | key=gg}}) ({{Linux}}) | * [http://en.wikipedia.org/wiki/Vi vi] <nowiki>[options]</nowiki> ''filename'' (and press {{kbd | key=gg}}) ({{Linux}}) | ||
* [http://www.tuxfiles.org/linuxhelp/vimcheat.html vim] <nowiki>[options]</nowiki> ''filename'' (and press {{kbd | key=gg}}) ({{Linux}}); Open file and press {{kbd | key=gg}} for [http://www.vim.org/ gVim] ({{Win}}) | * [http://www.tuxfiles.org/linuxhelp/vimcheat.html vim] <nowiki>[options]</nowiki> ''filename'' (and press {{kbd | key=gg}}) ({{Linux}}); Open file and press {{kbd | key=gg}} for [http://www.vim.org/ gVim] ({{Win}}) | ||
==== Display the first xxx characters of text file ==== | |||
* On {{Linux}}, To display the first 100 characters of text file<ref>[https://unix.stackexchange.com/questions/167814/get-first-x-characters-from-the-cat-command cut - get first X characters from the cat command? - Unix & Linux Stack Exchange]</ref> | |||
<pre> | |||
head -c 100 file_name | |||
</pre> | |||
==== Display the last few lines of text file ==== | ==== Display the last few lines of text file ==== | ||