次のコマンドを使用して zip ファイルを作成する必要があります。
zip /dir/to/file/newZip /data/to/zip/data.txt
これは機能しますが、作成された zip ファイルは、raw ファイルのディレクトリを模倣したディレクトリ構造を作成します。不要な余分なフォルダーがたくさんあります。
man ページをざっと見た程度でも、Google 検索しても答えは見つかりませんでした。
ベストアンサー1
を使用できます-j
。
-j
--junk-paths
Store just the name of a saved file (junk the path), and do not
store directory names. By default, zip will store the full path
(relative to the current directory).