base64

टेक्स्ट प्रोसेसिंग

इस्तेमाल

base64 [file]

bytes को ASCII पाठ में और वापस बदलता है ताकि binary केवल-पाठ रास्तों से जा सके; यह encoding है, encryption नहीं, और decode का विकल्प GNU में -d पर पुराने macOS में -D है।

आम विकल्प

विकल्पअर्थ
-dDecode. GNU and recent macOS take -d; older macOS needs -D
-wGNU: wrap at N columns, and -w0 keeps it on one line
-iGNU: ignore junk while decoding. On macOS -i names the input file
-oBSD and macOS: write to this file
-bBSD and macOS: wrap the encoded output at N characters

उदाहरण

base64 -w0 cert.pem

One long line, no wrapping (GNU).

echo aGVsbG8= | base64 -d

Decodes back to hello.

base64 -i photo.png -o photo.txt

Encoding into a file on macOS.

ये पाइप से जोड़कर चलाने के लिए बने हैं। एक ही कमांड से सब करवाने के बजाय तीन जोड़ना छोटा पड़ता है।

कैसे पढ़ें

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

आम सवाल

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

bytes को ASCII पाठ में और वापस बदलता है ताकि binary केवल-पाठ रास्तों से जा सके; यह encoding है, encryption नहीं, और decode का विकल्प GNU में -d पर पुराने macOS में -D है।

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

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

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

यहाँ 5 दिए हैं; पूरी सूची man base64 में है। यह कमांड टेक्स्ट प्रोसेसिंग में आती है।

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

man पेज: man base64