在GNU/Linux上尝试解码base64文件时,我收到了“base64: invalid input”错误提示。
$ base64 test.zip | base64 -d > test2.zip
base64: invalid input
$ ll test*
-rw-r--r-- 1 user grp 152 19 11:41 test.zip
-rw-r--r-- 1 user grp 57 19 11:42 test2.zip
I tried dos2unix 命令,但没有帮助。
我的base64版本:
$ base64 --version
base64 (GNU coreutils) 5.97
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software. You may redistribute copies of it under the terms of
the GNU General Public License <http://www.gnu.org/licenses/gpl.html>.
There is NO WARRANTY, to the extent permitted by law.
Written by Simon Josefsson.
-D
,而不是-d
。在你的系统上,base64 --help
显示什么? - John Zwinck