{"id":963,"date":"2014-05-12T23:41:48","date_gmt":"2014-05-12T23:41:48","guid":{"rendered":"http:\/\/www.plugged.in\/?p=963"},"modified":"2014-05-12T23:41:48","modified_gmt":"2014-05-12T23:41:48","slug":"faster-way-delete-files","status":"publish","type":"post","link":"https:\/\/www.veriteknik.net.tr\/en\/faster-way-delete-files\/","title":{"rendered":"A faster way to delete files"},"content":{"rendered":"<p>If you are struggling with millions of SPAM messages like me, you should rather use &#8220;find&#8221; instead of &#8220;rm&#8221; while deleting files in a folder. This method is tested to be faster than rm -rf:<\/p>\n<p>switch to the folder containing files, in my case:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">cd \/var\/spool\/exim\/<\/pre>\n<p>ans start deleting files by typing:<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">find . -maxdepth 1 -type f -delete<\/pre>\n<p>you can track the number of remaining files easily by tiping the below command from another terminal: (cd to same directory)<\/p>\n<pre class=\"brush: bash; gutter: true; first-line: 1\">find . -maxdepth 1 -type f | wc -l<\/pre>\n<p>..<\/p>\n","protected":false},"excerpt":{"rendered":"<p>If you are struggling with millions of SPAM messages like me, you should rather use &#8220;find&#8221; instead of &#8220;rm&#8221; while deleting files in a folder. This method is tested to be faster than rm -rf: switch to the folder containing files, in my case: cd \/var\/spool\/exim\/ ans start deleting files by typing: find . -maxdepth [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[461,370],"tags":[458,593,594,473,591,595],"yst_prominent_words":[1080,1078,711,1081,1079],"class_list":["post-963","post","type-post","status-publish","format-standard","hentry","category-directadmin-linux","category-linux","tag-exim","tag-fast","tag-faster","tag-find","tag-rm","tag-unlink"],"jetpack_featured_media_url":"","uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false},"uagb_author_info":{"display_name":"ckaraca","author_link":"https:\/\/www.veriteknik.net.tr\/en\/author\/ckaraca\/"},"uagb_comment_info":0,"uagb_excerpt":"If you are struggling with millions of SPAM messages like me, you should rather use &#8220;find&#8221; instead of &#8220;rm&#8221; while deleting files in a folder. This method is tested to be faster than rm -rf: switch to the folder containing files, in my case: cd \/var\/spool\/exim\/ ans start deleting files by typing: find . -maxdepth&hellip;","_links":{"self":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/963","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/comments?post=963"}],"version-history":[{"count":0,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/posts\/963\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/media?parent=963"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/categories?post=963"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/tags?post=963"},{"taxonomy":"yst_prominent_words","embeddable":true,"href":"https:\/\/www.veriteknik.net.tr\/en\/wp-json\/wp\/v2\/yst_prominent_words?post=963"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}