Command Line to Read File

Here the rest of linux command line to read a file

5. less

Less – opposite of more. Less is a program similar to more, but which allows backward movement in the file as well as forward movement. Also, less does not have to read the entire input file before starting, so with large input files it starts up faster than text editors like vi. Less uses termcap (or terminfo on some systems), so it can run on a variety of terminals. There is even limited support for hardcopy terminals.

example :

less /var/log/message

Press the [Space] bar to go down one page, the [B] to go back one page, the directional (or “arrow”) keys to move one line at a time, and [Q] to quit. To search the output of a text file using less, press [/] and enter the keyword to search for within the file.

If the filelist is missing, the editor will start with an empty buffer. Otherwise exactly one out of the following four may be used to choose one or more files to be edited. Vim behaves differently, depending on the name of the command (the executable may still be the same file).

vim

The “normal” way, everything is default.

ex

Start in Ex mode. Go to Normal mode with the “:vi” command. Can also be done with the “-e” argument.

view

Start in read-only mode. You will be protected from writing the files. Can also be done with the “-R” argument.

gvim gview

The GUI version. Starts a new window.

gex

Starts a new gvim window in Ex mode. Can also be done with the “-e” argument to gvim

vimx

Starts gvim in “Vi” mode similar to “vim”, but with additional features like xterm clipboard support

evim eview

The GUI version in easy mode. Starts a new window. Can also be done with the “-y” argument.

rvim rview rgvim rgview

Like the above, but with restrictions. It will not be possible to start shell commands, or suspend Vim. Can also be done with the “-Z” argument.

7. nano

nano – Nano’s ANOther editor, an enhanced free Pico clone. nano is a small, free and friendly editor which aims to replace Pico, the default editor included in the non-free Pine package. Rather than just copying Pico’s look and feel, nano also implements some missing (or disabled by default) features in Pico, such as “search and replace” and “go to line and column number”.

If no alternative spell checker command is specified on the command line or in one of the nanorc files, nano will check the SPELL environment variable for one.

In some cases nano will try to dump the buffer into an emergency file. This will happen mainly if nano receives a SIGHUP or SIGTERM or runs out of memory. It will write the buffer into a file named nano.save if the buffer didn’t have a name already, or will add a “.save” suffix to the current filename. If an emergency file with that name already exists in the current directory, it will add “.save” plus a number (e.g. “.save.1”) to the current filename in order to make it unique. In multibuffer mode, nano will write all the open buffers to their respective emergency files.

Well, that was all linux command line that i used so far in my experience.

My name is Desianto Abdillah. I am an IT Enthusiast. I'm interested in almost all IT realted things and i like to share it, whatever i like, whatever i know and whatever i just learned. :D
Warm Regards,
Desianto