![]() ![]() Each of these utilities have a wide range of forecasts for efficient navigation, most common of which I summarized in the cheat sheet. In this previous lecture, we looked at how to view and edit files using more Common utilities such as cat, last and nano. We can see that modification date was updated to the time when the touch command was run last. Now let's run the tight command once again. Let's look at this file attributes using LS with one additional arguments dash dash full time to see the modification date with the seconds. If I add a file name to the TTY argument empty file, it will create a new empty file with this name. There's one more command that I'd like to mention here, which is called touch. All of the text editors have their own space so to say. Nonetheless, later on, you will probably want to learn tools for more advanced editing Such as writing code. In my opinion, nano is easier to learn to the first editor as it doesn't have that much possibilities as VI and he might have. For example, when you work on remote computer, there are also numerous other editors such as VI, vim or Emacs. In general, text editors like nano or Pico can be very handy when you don't have direct access to file editing with the user interface. ![]() Some people might still actually use it, it was quite useful to check mails when you work on a remote server. Pico stands for Python composer, which was the text editor for the mail client called pine. And as you can probably guess, these applications resemble the names of powers of 10. nano was created as a free clone of the editor called Pico. The name is a recursive acronym which gets clear when read Nanos, another editor. There's a quite a funny story behind them nano. As you can see, there are tons of key combinations available for your service to make your work much more efficient. If I make the screen even bigger, there will be even more commands visible. In the bottom of the screen you can see some most useful key combinations I should Ctrl G to get help. But I don't want to save all the changes so i discard them by pressing n. I would now like to quit the nano editor by pressing Ctrl x. I can also copy paste multiple lines at once, pressing CTRL k twice and control U. If I press Ctrl w again and then press enter it will search for echo again We can copy a line using Ctrl K and paste it using Ctrl u, I can do it twice. I will type in the equal string that I want to search for. We can also search in the file using Ctrl W. We can go to the last line of the file without slash and to the first line without backslash. We can also go to the beginning and end of each line with combination Ctrl A and Ctrl E. We can navigate in the file in a similar way as we did with the last few, we're using navigation arrows left and right up and down. ![]() It is printing the date waits for two seconds and prints the date again. I will wait for two seconds using sleep command and I will print another text and it will print the date again I will save the file using Ctrl o confirm quit using Ctrl x. I will print the current date using date command. I will add a few more commands to the script. Here we will edit our bundled sh file using nano editor. ![]() For this let's go to our work directory where we created our shell script. And now it is time to have a closer look. Now let's look at file editing, which really ties to this point in the previous sections. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |