Delete files within folder (Drupal)

Use this command to delete the files within a folder for a Drupal project. 

First, change the permissions: 

chmod 755 -R sites

Next, remove the files, including the hidden ones, within the folder: 

rm -rf path/* path/.*

-r: recursive
-f: force
.*: remove hidden files

Add new comment

Plain text

  • No HTML tags allowed.
  • Web page addresses and email addresses turn into links automatically.
  • Lines and paragraphs break automatically.