Nguyễn Thanh Uyên
New member
How do you delete the contents of a file in Unix?
Answer
Deleting files (rm command)
Answer
Deleting files (rm command)
- To delete the file named myfile, type the following: rm myfile.
- To delete all the files in the mydir directory, one by one, type the following: rm -i mydir/* After each file name displays, type y and press Enter to delete the file. Or to keep the file, just press Enter.