shred

फ़ाइल और डायरेक्टरी

इस्तेमाल

shred -u [file]

मिटाने से पहले bytes ऊपर से लिख देता है, पर SSD और btrfs या APFS जैसे copy-on-write systems में पुराने block बचे रह सकते हैं, इसलिए असली उत्तर पूरी डिस्क का encryption है।

आम विकल्प

विकल्पअर्थ
-uRemove the file after overwriting it
-nHow many overwrite passes; the default is 3
-zFinish with one pass of zeros so the shredding is not obvious
-vShow the progress of each pass
-sShred only the first N bytes

उदाहरण

shred -uvz secret.key

Overwrites, zeroes and then deletes.

sudo shred -vn 1 /dev/sdb

One pass over a whole disk.

rm -P secret.key

The nearest thing macOS ships.

हटाना, मिटाना और ढूँढना। कुछ कमांड दोबारा नहीं पूछते, इसीलिए -i लगाने की आदत हाथ बचाती है।

कैसे पढ़ें

  • बड़े कोष्ठक [ ] उस हिस्से को दिखाते हैं जिसे छोड़ा जा सकता है।
  • तीन बिंदु … का मतलब है एक से ज़्यादा दिए जा सकते हैं।
  • विकल्पों में बड़े-छोटे अक्षर मायने रखते हैं — कुछ कमांड में -r और -R अलग काम करते हैं।

आम सवाल

Q. shred क्या करता है?

मिटाने से पहले bytes ऊपर से लिख देता है, पर SSD और btrfs या APFS जैसे copy-on-write systems में पुराने block बचे रह सकते हैं, इसलिए असली उत्तर पूरी डिस्क का encryption है।

Q. इसे कैसे लिखें?

shred -u [file] — बड़े कोष्ठक वह हिस्सा दिखाते हैं जो छोड़ा जा सकता है।

Q. कितने विकल्प जानने लायक़ हैं?

यहाँ 5 दिए हैं; पूरी सूची man shred में है। यह कमांड फ़ाइल और डायरेक्टरी में आती है।

मिलती-जुलती कमांड

man पेज: man shred