2010-05-17 37 views
4

想知道zip命令中-j選項的含義是什麼。我找到如下解釋:zip -j命令,-j選項是什麼意思?

-j 
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 path). 

但是不太清楚它的確切含義是什麼?任何人都可以用下面的命令來解釋它嗎?

C:\programs\zip -j myzipfile file1 file2 file3 

謝謝。

回答

6

這樣會更有意義有不同的例子:

C:\programs\zip myzipfile a/file1 b/file2 c/file3 

通常這會導致包含三個 「子目錄」 拉鍊:

a/ 
+ file1 

b/ 
+ file2 

c/ 
+ file3 

和-J,您可以:

./ 
+ file1 
+ file2 
+ file3 
+0

I c。所以-j命令只是忽略目錄路徑,只把文件名放在當前文件夾中? – 2010-05-17 18:59:02

+0

這是正確的。 – 2010-05-19 17:18:12

-2

-j是「J unk pathnames」

1

在這種情況下,它不會做任何特別的事情。

但如果,比如你鍵入

C:\programs\zip -j myzipfile directory1 

directory1包含子目錄,你的壓縮文件,解壓縮時,將被放置在同一個目錄中,而不管他們在什麼最初子目錄。

+0

「提取時」有意義。謝謝。 – 2010-05-17 19:01:09

相關問題