In this article i will show you how to create a file on lubuntu/ubuntu, and this tutorial is for beginners, so you don't have to read it if you already know.
Alright to create a file on lubuntu is very simple, you just use touch command it will create an empty file for you.
touch [filename]
touch README.txt
You can create any kind of file you want, like txt, html, php, css, json, xml, even jpg, bmp, pdf, etc. But ideally you should create only text based file.
touch index.htm
touch index.php
touch style.css
touch data.xml
touch image.jpg
Once the file is created, you can edit the content using text editor like vi, vim, gedit, etc. Here's an example :
- touch test.php
- vim test.php
- inside vim, press insert (or i) and then type the content you want
- after done inserting content, press escape button (Esc)
- and then exit with :wq
- > diary.txt
- echo this is my diary >> diary.txt
- echo i love working with lubuntu >> diary.txt
- cat diary.txt
No comments:
Post a Comment