Working on Linux Files - Basic Commands
In this article we will be seeing some basic commands while working on files in Linux. In Linux there are more applications to create and edit a file. Some of them are Vi editor , Vim editor (extended version for vi), Nano , Emacs , etc..,. These text editors are applicable in minimal installation. In GUI we can use Gedit, Sublime text, etc.,. Creating a File: You can create a empty file using touch command, $ touch example.txt To add contents to the file use echo command, $ echo This is first line > example.txt To add more contents use >> symbol which will append the new content on the preceding line, $ echo This is Second line >> example.txt $ echo This is Third line >> example.txt $ echo This is Fourth line >> example.txt You can use cat or less command to see the content of the file, It only prints the content of the file.To edit the file you can open the file with any of the text editors as ment...