- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我有一个 .RAR 文件,其中包含同名的不同文件。
例如,
index.txt 40 Text Document 04/01/2010 4:40PM
index.txt 22 Text Document 04/01/2010 4:42PM
index.txt 10 Text Document 04/01/2010 4:45PM
index.txt 13 Text Document 04/01/2010 4:50PM
为什么?
最佳答案
如前所述,文件可能位于不同的路径中,但正如我将进一步展示的那样,情况并非总是如此。
如果您使用 WinRAR 列出文件内容并且您的选项设置如下,那么它只会显示您有同名的文件,但它们位于不同的路径。
在 CRC32 列之后,有一个称为 Path。如果情况不同,那么在以下情况下提取应该不是问题:
如果是不提取路径,由于文件系统的限制,WinRAR 会要求你重命名它们。我认为在这种情况下命令行 unrar 不会有问题,因为您需要指定其他参数来更改其默认行为。
RAR 压缩文件可能在同一个目录中有多个同名文件。 如果您使用 Windows,请使用 "C:\Program Files\WinRAR\Rar。 exe"而不是 rar 在以下示例中的命令行中。
创建一个新文件并将其添加到 RAR 存档中。您还可以通过列出其内容来检查更改。
rar a rarfile.rar testfile.txt
rar l rarfile.rar
rar a rarfile.rar testfile.txt
如果您尝试重新添加此文件,rar 将替换已添加的同名文件。
Updating archive rarfile.rar
Updating testfile.txt OK
Done
创建另一个文件或重命名第一个文件并将其添加到 RAR 文件中。
move testfile.txt second.txt (new file)
rar a rarfile.rar second.txt (add it)
rar lb rarfile.rar (list archive, bare info)
将第二个文件重命名为第一个文件的名称。
rar rn rarfile.rar second.txt testfile.txt
这就是您如何在同一路径中创建包含多个同名文件的 RAR 文件。这些步骤在 WinRAR 中是类似的。如果您再次尝试重命名文件,该目录中所有文件的文件名也会更改。
为什么有人要这样做?
我能想到的唯一解释是创建此存档的人想要模仿版本控制/备份系统。但是,如果您只想提取一个特定版本而不是第一个,WinRAR 会提取错误的文件。看来我发现了一个非常模糊的 WinRAR 错误 :-)
编辑:在 RAR 文档中找到这个后似乎是一个不好的解释:
-ver[n] File version control
Forces RAR to keep previous file versions when updating
files in the already existing archive. Old versions are
renamed to 'filename;n', where 'n' is the version number.
By default, when unpacking an archive without the switch
-ver, RAR extracts only the last added file version, the name
of which does not include a numeric suffix. But if you specify
a file name exactly, including a version, it will be also
unpacked. For example, 'rar x arcname' will unpack only
last versions, when 'rar x arcname file.txt;5' will unpack
'file.txt;5', if it is present in the archive.
If you specify -ver switch without a parameter when unpacking,
RAR will extract all versions of all files that match
the entered file mask. In this case a version number is
not removed from unpacked file names. You may also extract
a concrete file version specifying its number as -ver parameter.
It will tell RAR to unpack only this version and remove
a version number from file names. For example,
'rar x -ver5 arcname' will unpack only 5th file versions.
If you specify 'n' parameter when archiving, it will limit
the maximum number of file versions stored in the archive.
Old file versions exceeding this threshold will be removed.
关于rar - 为什么 .RAR 文件包含同名的不同文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6371953/
我有一个 .RAR 文件,其中包含同名的不同文件。 例如, index.txt 40 Text Document 04/01/2010 4:40PM index.txt 22 Text Documen
嘿 guyz 我想要 rar(不是 tar)我服务器上的文件夹,使用 php 压缩包 RAR 3.93 Copyright (c) 1993-2010 Alexander Roshal 15 Mar
他们指的是同一件事吗?它们有关系吗? 根据 Oracle,资源适配器存档 (RAR) 是: Resource Adapter Archive (RAR): A RAR file holds a res
灵感来自this answer ,我正在使用: java -jar %BUILDTOOLSPATH%\jill.jar --output classes.jayce src java -jar %BU
有人知道如何比较 archiwum.rar 中的文件数量和文件大小及其在文件夹中提取的内容吗? 我想这样做的原因是,我正在使用的服务器在提取过程中已重新启动几次,我不确定是否所有文件都已正确提取。 .
我正在尝试在 C# WinForms .NET 3.5 中使用 SevenZipSharp 或/和 Unrar 库。我对具有不同命名的多 rar 文件有这个问题,例如: .rar, r01, r02,
我有 7 个扩展名为 xyz.rar.001 - xyz.rar.007 的文件,显然它们是单个文件的一部分。我有所有的 7 个部分。我使用文件连接器将它们加入单个文件 xyz.rar 并尝试使用 W
1) 我有一个名为 CCBuilds 的文件夹,其中包含以下路径中的几个文件:E:\Testing\Builds\CCBuilds . 2) 我已将 C# 代码 (Process.Start) 写入
我想要这个 RAR 组件:http://www.philippewechsler.ch/RARComponent.php 通过菲利普韦克斯勒。 但我不明白我如何才能为存档中的文件而不是存档请求密码?
我正在尝试暴力破解受 3 个字符密码保护的 RAR 压缩文件: import os Alphabets = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" for a in range(0,
我正在尝试对 rar 存档进行暴力攻击,我需要尽快进行密码检查。我以这种方式从我的程序中调用 rarlab 的“unrar”命令行实用程序: unrar t -p[password] archive.
我想 rar 一个文件夹,但排除某些文件夹和它们下面的所有文件 - .svn 文件夹。 如何使用 rar 控制台命令 (rar.exe) 实现这一点? 最佳答案 你试过-x.svn*吗 关于svn -
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 1年前关闭。 Improve thi
这是我的案例:用户上传包含多个文件的 .rar 文件。 显示.rar文件并可下载。 但是如何在前端实现一个功能,该功能将显示要下载的 .rar 文件以及链接(整个文件),然后也可以显示 .rar 中的
我正在尝试创建一个自解压存档,使用 WinRar 解压到“%USERPROFILE%\Desktop”。但是,当我运行它时,它会解压到 SFX 的当前目录,而不是我的桌面。 提取路径选项是否有效? 我
我尝试从 RAR 加载文件。我正在使用 sFileName=Thread.currentThread().getContextClassLoader().getResource("common.xml
我通过互联网查看了 winrar 的命令行参数是如何工作的,这就是我目前所了解的 void LOCK(string fld, string pw) { Proc
我该怎么做?我见过一个解决方案,因为 ruby 不支持 loookaround 断言,所以不对 ruby 使用单个正则表达式。但是在 C# 中可能吗? [Test] public void R
已关闭。此问题旨在寻求有关书籍、工具、软件库等的建议。不符合Stack Overflow guidelines .它目前不接受答案。 我们不允许提问寻求书籍、工具、软件库等的推荐。您可以编辑问题,以
我想列出文件夹及其子文件夹中的 .rar 文件,直到没有文件夹为止。 这是我目前使用的代码: private String getFileNums(File file) { if (f
我是一名优秀的程序员,十分优秀!