{"id":1068,"date":"2017-08-29T07:19:05","date_gmt":"2017-08-29T05:19:05","guid":{"rendered":"https:\/\/abchaus.synology.me\/wordpress\/?p=1068"},"modified":"2018-02-25T11:53:33","modified_gmt":"2018-02-25T10:53:33","slug":"lschen-von-ganzen-bumen-unter-linux","status":"publish","type":"post","link":"https:\/\/abchaus.synology.me\/wordpress\/blog\/2017\/08\/29\/lschen-von-ganzen-bumen-unter-linux\/","title":{"rendered":"L&ouml;schen von ganzen B&auml;umen unter Linux"},"content":{"rendered":"<p align=\"justify\">Das Problem klingt simpel, ist es aber ganz offenbar nicht. Was tut man unter Linux, wenn man ganze B\u00e4ume von Verzeichnissen l\u00f6schen will? Na klar <code>rm \u2013rf dirname<\/code>. Aber wenn das Tage dauert???? Kann nicht sein? Doch, es braucht nur gen\u00fcgend Dateien. In meinem Fall wollte ich auf einer Synology ein altes TimeBackup Verzeichnis l\u00f6schen. Nach einer Woche Laufzeit des commands (das ist echt) waren noch 120 Millionen Dateien \u00fcbrig. Und nun? Mit ein bi\u00dfl Googlen kommt man auf folgende Beschleunigungen:<\/p>\n<p align=\"justify\">\nUsing rsync is surprising fast and simple.<br \/>\n<code>mkdir empty_dir<br \/>\n<\/code><br \/>\n<code>rsync -a --delete empty_dir\/ yourdirectory\/<br \/>\n<\/code><\/p>\n<p align=\"justify\">\nEven faster is Perl! Its benchmarks are faster than <code>rsync -a --delete<\/code>.<br \/>\n<code>cd yourdirectory<\/code><br \/>\n<code><br \/>\nperl -e 'for(&lt;*&gt;){((stat)[9]&lt;(unlink))}'<br \/>\n<\/code><\/p>\n<p align=\"justify\">\nSources:<\/p>\n<ul>\n<li>\n<div align=\"justify\">\n<a href=\"https:\/\/stackoverflow.com\/questions\/1795370\/unix-fast-remove-directory-for-cleaning-up-daily-builds\">https:\/\/stackoverflow.com\/questions\/1795370\/unix-fast-remove-directory-for-cleaning-up-daily-builds<\/a><\/div>\n<\/li>\n<li>\n<div align=\"justify\"><a href=\"http:\/\/www.slashroot.in\/which-is-the-fastest-method-to-delete-files-in-linux\">http:\/\/www.slashroot.in\/which-is-the-fastest-method-to-delete-files-in-linux<\/a><\/div>\n<\/li>\n<p align=\"justify\"><\/p>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Das Problem klingt simpel, ist es aber ganz offenbar nicht. Was tut man unter Linux, wenn man ganze B\u00e4ume von<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-1068","post","type-post","status-publish","format-standard","hentry","category-allgemein"],"_links":{"self":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/1068","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/comments?post=1068"}],"version-history":[{"count":4,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/1068\/revisions"}],"predecessor-version":[{"id":1160,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/posts\/1068\/revisions\/1160"}],"wp:attachment":[{"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/media?parent=1068"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/categories?post=1068"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/abchaus.synology.me\/wordpress\/wp-json\/wp\/v2\/tags?post=1068"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}