User Tools

Site Tools


linux_notes

tasks

remove large directories

Use rsync to delete large directories.

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

As per https://unix.stackexchange.com/questions/37329/efficiently-delete-large-directory-containing-thousands-of-files, it is more efficient than running “rm -rf” or some combination of find + “rm -rf”.

stackoverflow answers I came across

get file modified time in shell script

linux_notes.txt · Last modified: 2021/09/30 15:56 by raju