How Do I Delete a Text File in Ubuntu Terminal?
Contents Type the Rm Command, a Space, and Then the Name of the File You Want to Delete. If the File Is Not in the Current Working Directory, Provide a Path to...
Contents
Type the rm command, a space, and then the name of the file you want to delete. If the file is not in the current working directory, provide a path to the file’s location. You can pass more than one filename to rm . Doing so deletes all of the specified files.
How do I delete a text file in Ubuntu?
Command to delete and remove files on Ubuntu Linux
- Open the Ubuntu terminal application (bash shell)
- Type any one of the following command to delete a file named ubuntu.nixcraft.txt in the current directory.
- rm ubuntu.nixcraft.txt. unlink ubuntu.nixcraft.txt.
How do you delete a text file in Linux?
How to Remove Files
- To delete a single file, use the rm or unlink command followed by the file name: unlink filename rm filename. …
- To delete multiple files at once, use the rm command followed by the file names separated by space. …
- Use the rm with the -i option to confirm each file before deleting it: rm -i filename(s)