List the contents of all .zip, .jar, .ear, .war, .aar, .tar, .tar.gz, tar.bz2 and .tgz files in a folder and all subfolders, including archives nested within other archives, with the free Swiss File Knife tool for the Windows, Intel Mac OS X and Linux command line. Fully portable, no installation.
Download the free Swiss File Knife,
then type for example:
sfk -arc list mydir
this command will list
- all .zip, .jar, .ear, .war, .aar, .tar, .tar.gz, tar.bz2 and .tgz file contents found within the mydir tree.
- all .zip, .jar, .ear, ... file contents found within other .zip, .jar, .ear, ... files (recursive nesting).
- all normal (non-archive) files within mydir, and within all subdirectories of mydir.
which may produce a long list of very long SFK style filenames, looking like
mydir\foo\bar.zip\\sub\dir\tools.jar\\com\the\company\docs.jar\\intro.html
(under Windows)
mydir/foo/bar.zip//sub/dir/tools.jar//com/the/company/docs.jar//intro.html
(under Linux)
In this example, there is an intro.html within a docs.jar, within a tools.jar, within bar.zip, within the mydir directory tree.
more examples:
sfk -arc list -dir mydir *.jar -file .class
|
list only .class files within .jar files within mydir (Linux users type "%" instead of "*"). this example for the Windows command line uses a path mask ".jar" which is identified by a wildcard "*". under Linux, such wildcards are misinterpreted by the shell, therefore "\*" or "%" must be used instead.
|
sfk -arc list -dir foo bar *.ear !*\depr -file .class
|
list only .class files within .ear files within the foo and bar directory tree, however excluding any files within directories named like "depr". (Linux users type ":" instead of "!")
|
sfk list -arc eclipse-SDK-3.4-win32.zip
|
list everything within the eclipse SDK, in total over 70000 files.
|
sfk -arc list -big eclipse-SDK-3.4-win32.zip .java
|
what are the biggest .java source files within the eclipse SDK? the result:
281535 | |
eclipse-SDK-3.4-win32.zip\\eclipse\plugins
\org.eclipse.jdt.core.source_3.4.0.v_874.jar\\org\eclipse
\jdt\internal\compiler\problem\ProblemReporter.java
|
286523 | |
eclipse-SDK-3.4-win32.zip\\eclipse\plugins
\org.eclipse.swt.win32.win32.x86.source_3.4.0.v3448f.jar\\org
\eclipse\swt\custom\StyledText.java
|
356264 | |
eclipse-SDK-3.4-win32.zip\\eclipse\plugins
\org.eclipse.jdt.core.source_3.4.0.v_874.jar\\org\eclipse
\jdt\internal\compiler\ClassFile.java
|
388268 | |
eclipse-SDK-3.4-win32.zip\\eclipse\plugins
\org.eclipse.jdt.core.source_3.4.0.v_874.jar\\org\eclipse
\jdt\internal\codeassist\CompletionEngine.java
|
393718 | |
eclipse-SDK-3.4-win32.zip\\eclipse\plugins
\org.eclipse.jdt.core.source_3.4.0.v_874.jar\\org\eclipse
\jdt\internal\compiler\parser\Parser.java
|
|
see also:
- how to search single .zip and .jar files for words with the free zzfind tool.
- how to get the original unzip for the command line, which can however list only a single zip file's content.
|