Empty directory quickly

Skip to main content
Du bist hier:
Drucken

Empty directory quickly

In order to empty a directory in Linux as fast as possible, there are the following fast possibilities:

  1. The fastest way is as follows:
    mkdir /empty_dir
    rsync -a --delete /empty_dir/ /unterordner/Zielordner/
  2. If it takes a little longer, deletes all files in the open directory:
    cd /unterordner/Zielordner/
    for i in ./* ; do rm $i ; done
Related Post