Which command is used to delete all files in a directory?
28 views
- del *
- rm * (Correct Answer)
- mv *
- rmdir *
Explanation
To delete all files in a directory, use (*) with rm command. It acts as a meta-character and delete all files without displaying any message on the terminal. So use this command cautiously.