Linux 4 All

Best Linux tricks source

Sometimes you need a quick way to empty a huge folder. By far, the fastest way to clear a folder that contains tremendous number of files is to rsync an empty folder to it:

mkdir ~/empty_dir
rsync -a --delete ~/empty_dir/  /tremendous/directory

That will make it tiny again.

Top folders with largest numbers of files arrow-right
Next post

arrow-left Get a MySQL database size
Previous post

Leave a Reply

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