Empty directory quickly

Support Wissensdatenbank

Du bist hier:
Print

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
War dieser Artikel hilfreich?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
Wie können wir diesen Artikel verbessern?
Please submit the reason for your vote so that we can improve the article.
Brauchst du Hilfe?
Related Post