如何从 CLI 压缩 mobi 文件?

如何从 CLI 压缩 mobi 文件?

使用tar效果很好:

thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ ll
total 9720
drwxr-xr-x  2 thufir thufir    4096 Jun 13 13:14  ./
drwxr-xr-x 48 thufir thufir    4096 Jun 13 00:46  ../
-rw-r--r--  1 thufir thufir 9941769 Jun 12 23:43 'Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi'
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ tar -czf kali.tar.gz Learning\ Kali\ Linux_\ Security\ Testing\,\ Pen\ -\ Ric\ Messier.mobi
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ ll
total 16748
drwxr-xr-x  2 thufir thufir    4096 Jun 13 13:15  ./
drwxr-xr-x 48 thufir thufir    4096 Jun 13 00:46  ../
-rw-rw-r--  1 thufir thufir 7194557 Jun 13 13:15  kali.tar.gz
-rw-r--r--  1 thufir thufir 9941769 Jun 12 23:43 'Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi'
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ rm 'Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi' 
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ tar -xf kali.tar.gz 
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ ll
total 16748
drwxr-xr-x  2 thufir thufir    4096 Jun 13 13:15  ./
drwxr-xr-x 48 thufir thufir    4096 Jun 13 00:46  ../
-rw-rw-r--  1 thufir thufir 7194557 Jun 13 13:15  kali.tar.gz
-rw-r--r--  1 thufir thufir 9941769 Jun 12 23:43 'Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi'
thufir@dur:~/Desktop$ 

但我该如何创建类似的zip文件发送要 kindle 服务吗?

答案1

也许有点傻:

thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ zip 'Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi' 
    zip warning: missing end signature--probably not a zip file (did you
    zip warning: remember to use binary mode when you transferred it?)
    zip warning: (if you are trying to read a damaged archive try -F)

zip error: Zip file structure invalid (Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi)
thufir@dur:~/Desktop$ 
thufir@dur:~/Desktop$ zip kali.zip 'Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi' 
  adding: Learning Kali Linux_ Security Testing, Pen - Ric Messier.mobi (deflated 28%)
thufir@dur:~/Desktop$ 

相关内容