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 mydirthis 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.
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:
|
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.