Remove all files and folders including hidden files on bash

To remove all files and folders including hidden files such .gitignore, .htaccess, .git etc. on bash you can use the following command:

$> rm -rf /PATH/TO/FOLDER/{*,.*}

Is the same as:

$> rm -rf ${DOCROOT}/*
$> rm -rf ${DOCROOT}/.*

But ever shorter. 😉

Leave a Reply

Your email address will not be published. Required fields are marked *

 

This site uses Akismet to reduce spam. Learn how your comment data is processed.