How do I delete all files in a folder?

How do I delete all files in a folder?
Answer
Another option is to use
the rm command
to delete all files in a directory.

…

The procedure to remove all files from a directory:
  1. Open the terminal application.
  2. To delete everything in a directory run: rm /path/to/dir/*
  3. To remove all sub-directories and files: rm -r /path/to/dir/*
 

Tìm kiếm

Back
Top