{"id":685,"date":"2023-09-03T11:08:41","date_gmt":"2023-09-03T09:08:41","guid":{"rendered":"https:\/\/linux-bibel.at\/?p=685"},"modified":"2023-09-03T11:08:42","modified_gmt":"2023-09-03T09:08:42","slug":"trash-cli-unter-linux-am-terminal-in-den-papierkorb-loeschen","status":"publish","type":"post","link":"https:\/\/linux-bibel.at\/index.php\/2023\/09\/03\/trash-cli-unter-linux-am-terminal-in-den-papierkorb-loeschen\/","title":{"rendered":"Trash-CLI &#8211; Unter Linux am Terminal in den Papierkorb l\u00f6schen"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">Das\u00a0Terminal\u00a0unter Linux vereinfacht vieles, was selbst auf der grafischen Oberfl\u00e4che unter Windows umst\u00e4ndlich ist. Aber &#8211; l\u00f6scht man Dateien oder Verzeichnisse mittels des Befehls:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">sind diese tats\u00e4chlich ohne Umweg gel\u00f6scht und landen nicht im Papierkorb, um diese notfalls wiederherstellen zu k\u00f6nnen. Mit der Software Trash-CLI umgehen Sie dieses Problem.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Trash-CLI installieren<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Unter auf Debian basierenden Linux-Distributionen installieren Sie diese Software wie \u00fcblich ganz einfach \u00fcber die\u00a0Paket-Verwaltung\u00a0durch das Paket &#8222;<strong>trash-cli<\/strong>&#8222;. Dies gelingt auch \u00fcber die Paket-Verwaltungen von Arch Linux und Fedora.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Die Installation gelingt auch mittels PIP und PIPX \u00fcber das\u00a0Python-Repository.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Trash-CLI nutzen<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Statt des Befehls:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">nutzen Sie den Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">um Dateien oder Verzeichnisse zu l\u00f6schen. Also etwa:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash dateiname.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">statt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm dateiname.txt<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Oder:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash Verzeichnis\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">statt:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>rm -rf Verzeichnis\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Die gel\u00f6schten Dateien landen im Home-Verzeichnis unter &#8222;<em>.local\/share\/Trash\/files<\/em>&#8222;, f\u00fcr als\u00a0root\u00a0gel\u00f6schte Dateien unter &#8222;<em>\/root\/.local\/share\/Trash\/files<\/em>&#8222;.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Jetzt k\u00f6nnen wir mit dem Befehl:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash-list<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">die im Papierkorb liegenden Dateien und Verzeichnisse anzeigen lassen:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"576\" src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/trash-1024x576.jpg\" alt=\"\" class=\"wp-image-686\" srcset=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/trash-1024x576.jpg 1024w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/trash-300x169.jpg 300w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/trash-768x432.jpg 768w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/trash-1536x864.jpg 1536w, https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/09\/trash.jpg 1920w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Mit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash-restore dateiname<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">oder:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash-restore Verzeichnis\/<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">k\u00f6nnen wir Dateien und Verzeichnisse wiederherstellen. Mit:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>trash-empty<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">leeren wir den Papierkorb komplett.<\/p>\n<div class=\"pld-like-dislike-wrap pld-custom\">\r\n    <div class=\"pld-like-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-like-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir\" data-post-id=\"685\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Hoch.png\" alt=\"Gef\u00e4llt mir\" \/>\r\n            <\/a>\r\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\r\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\r\n    <a href=\"javascript:void(0)\" class=\"pld-dislike-trigger pld-like-dislike-trigger  \" title=\"Gef\u00e4llt mir nicht\" data-post-id=\"685\" data-trigger-type=\"dislike\" data-restriction=\"cookie\" data-already-liked=\"0\">\r\n                            <img src=\"https:\/\/linux-bibel.at\/wp-content\/uploads\/2023\/12\/Daumen-Runter.png\" alt=\"Gef\u00e4llt mir nicht\" \/>\r\n            <\/a>\r\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\r\n<\/div><\/div>","protected":false},"excerpt":{"rendered":"<p>Das\u00a0Terminal\u00a0unter Linux vereinfacht vieles, was selbst auf der grafischen Oberfl\u00e4che unter Windows umst\u00e4ndlich ist. Aber &#8211; l\u00f6scht man Dateien oder Verzeichnisse mittels des Befehls: sind diese tats\u00e4chlich ohne Umweg gel\u00f6scht und landen nicht im Papierkorb, um diese notfalls wiederherstellen zu k\u00f6nnen. Mit der Software Trash-CLI umgehen Sie dieses Problem. Trash-CLI installieren Unter auf Debian basierenden [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":686,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[12,7,6],"class_list":["post-685","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-terminal","tag-kommandozeile","tag-shell","tag-terminal"],"_links":{"self":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/685","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/comments?post=685"}],"version-history":[{"count":1,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/685\/revisions"}],"predecessor-version":[{"id":687,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/posts\/685\/revisions\/687"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media\/686"}],"wp:attachment":[{"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/media?parent=685"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/categories?post=685"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/linux-bibel.at\/index.php\/wp-json\/wp\/v2\/tags?post=685"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}