감동, 마음이 움직이는 것

[Linux] Effectively delete a lot of files in a directory 본문

Tips (Utility, Computer Language, and etc.)

[Linux] Effectively delete a lot of files in a directory

Struggler J. 2016. 9. 17. 00:58

Ref - http://unix.stackexchange.com/questions/37329/efficiently-delete-large-directory-containing-thousands-of-files


When thousands of files are on one directory, it is really time consuming when delete al files.

In this case, you can effectively delete use rsync (To be honest, I don't know rsync, but just enter the follow commands: 

mkdir empty_dir
rsync -a --delete empty_dir/    yourdirectory/

It works!