The best thing is that you exit less (by pressing q), there are no lines displayed on the screen. Your terminal remains clean and pristine. I strongly recommend learning a few options of the Less command so that you can use it more effectively. There is also more command which was used in olden days but less command has more friendly features. This is why you might come across the humorous term 'less is more'. ![]() Head command is another way of viewing text file but with a slight difference. The head command displays the first 10 lines of a text file by default. ![]() You can change this behavior by using options with head command but the fundamental principle remains the same: head command starts operating from the head (beginning) of the file. Tail command in Linux is similar and yet opposite to the head command. While head command displays file from the beginning, the tail command displays file from the end.īy default, tail command displays the last 10 lines of a file. Head and Tail commands can be combined to display selected lines from a file. ![]() You can also use tail command to see the changes made to a file in real time. Okay! I promised to show only the commands for viewing text file. And this one deals with both text and binary files. Strings command displays the readable text from a binary file. No, it doesn’t convert binary files into text files. If the binary file consists of actual readable text, strings command displays those text on your screen. You can use the file command to find the type of a file in Linux. Some Linux users use Vim to view the text file but I think that’s overkill. My favorite command to open a file in Linux is the less command. ![]() It leaves the screen clear and has several options that makes viewing text file a lot easier. Since you now know ways to view files, maybe you would be interested in knowing how to edit text files in Linux. #View contents of linux iso file on mac how to Cut and Paste are two such commands that you can use for editing text in Linux terminal. You may also read about creating files in Linux command line.As always, we recommend Ninite as a safe place to grab tools of all sorts. On the ISO front, Ninite includes tools like InfraRecorder, ImgBurn, and CDBurnerXP. Just be sure to download them through Ninite.
0 Comments
Leave a Reply. |