How to create a file in Linux?
In Linux, you can create a file using the following command:
- make physical contact with
touch filename
This will create an empty file named ‘filename’ in the current directory.
- reverberate
echo "text content" > filename
This will create a file with the name ‘filename’ in the current directory, and write the text content into the file.
- Yes
- a small particle
vi filename
nano filename
These commands will open a text editor where you can create and edit a file named filename.
You can create a file as needed using any method.