Using Terminal

How to delete a file or folder in terminal

To delete a file, use the rm (remove) command followed by the name of the file. For example, to delete a file named "file.txt", you would use the command rm file.txt.

To remove multiple files, use following command-

rm file1.txt file2.txt file3.txt 

If you want to delete a directory, you need to use the rm command with the -r (recursive) flag. This flag tells the command to delete the directory and its contents recursively. For example, to delete a directory named "folder", you would use the command rm -r folder


To create a new .txt file on Debian 11 using a keyboard shortcut, you can use the terminal. This is how to do it:

1. Open a terminal: in your parent directory.

2. Create the new file: You can do this with the `touch` command. For example, to create a new file called "newfile.txt", you would type `touch newfile.txt`.

Comments