![]() echo "SGksIFRoaXMgaXMgZnJvbSBDeWJlcklUSHViCg=" | base64 -decode Similarly, if you have sent any file or stored it somewhere in encoded format and now you are looking to decode it back to the original data then you need to pass the encoded data to base64 utility as shown below. echo Y3liZXJpdGh1Yi5jb20K | base64 -decodeĮxample 4: How to do base64 Decoding of a File Data You will be able to see the original data on the output. If you have sent the data or stored it somewhere in encoded format and now you want to decode it back to the original data then you need to pass that encoded data to base64 utility with -decode option enabled as shown below. base64 example.txtĮxample 3: How to do base64 Decoding of Data You just need to use base64 example.txt command to encode the contents of example.txt file as shown below. If you have a text file with some data like below then you can pass this file as an argument to base64 utility to encode the contents. echo "" | base64Įxample 2: How to do base64 Encoding of a File Data ![]() If you have some sample data to encode then you can pass it to base64 utility using echo "" | base64 command and get the encoded output as shown below. How to Perform base64 Encoding and Decoding Using Linux Command LineĪlso Read: How to Password Protect GRUB Boot Loader in Ubuntu 20.04 LTS Example 1: How to do base64 Encoding of Data We will see some real world examples to perform base64 Encoding and decoding in below section. At the receiving end, it can then be decoded back to the original data. Base64 encoding are mostly used to encode data into ASCII format so that it can be stored or transferred very easily. In this article, I will take you through different examples to perform base64 Encoding and Decoding Using Linux Command Line but before that let me ask you a quick question - Do you know where exactly base64 encoding and decoding is required ? Well, the first and foremost thing you need to understand is that encoding and decoding is not the same as encryption and decryption. Example 6: How to Ignore Non-Alphabet Characters. ![]() ![]() Example 4: How to do base64 Decoding of a File Data.Example 3: How to do base64 Decoding of Data.Example 2: How to do base64 Encoding of a File Data.Example 1: How to do base64 Encoding of Data.How to Perform base64 Encoding and Decoding Using Linux Command Line. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |