Skip to content

Instantly share code, notes, and snippets.

@vpnwall-services
Created October 15, 2020 19:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save vpnwall-services/8b880aa5947c8f13d9450ae262d1e805 to your computer and use it in GitHub Desktop.
Save vpnwall-services/8b880aa5947c8f13d9450ae262d1e805 to your computer and use it in GitHub Desktop.
[Fast Delete] Fast delete big folders #bash #debian #fast #delete #big #folders

Fast delete with rsync

mkdir /tmp/empty
rsync -a --delete /tmp/empty /tmp/big_folder/

And with Perl

cd yourdirectory
perl -e 'for(<*>){((stat)[9]<(unlink))}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment