remove a file in ubuntu 1

remove a file in ubuntu

rm  .. rm -r  .. r stands for recursive 

Here is what the above code is Doing:
1. We are creating a file named “test.txt”
2. We are opening the file in write mode
3. We are writing some text to the file
4. We are closing the file
5. We are opening the file in read mode
6. We are reading the contents of the file
7. We are printing the contents of the file
8. We are deleting the file

Similar Posts