
linux - Find a file in lots of zip files (like find command for ...
Find recursively all archive files of diverse archive formats and search them for file name patterns. I need to search for a file in all zip files in a directory. Is there a tool like find that be able to search in ZIP files? I tried this: find /path/ -iname '*.zip' -print -exec unzip -l {} \; |grep -i '<filename>'
How to find a list of files and zip them into a single zip file?
find ... -exec zip ~/Desktop/files.zip {} ; find ... -exec zip ~/Desktop/files.zip {} + The + version aggregates the parameters at the end of the zip command and calls one zip for all the files (or several zip if your commands are really long).
How do I use grep to find all the zip files in a directory?
Jan 19, 2012 · find . -iname \*.zip. This will list all files ending with .zip regardless of case. If you only want the ones with lower-case change -iname to -name. The command grep searches for strings in files, not for files. You can use it with find to list all your .zip files like this. find . |grep …
how can i search for files and zip them in one zip file
Mar 29, 2015 · The command you use will run zip on each file separately, try this: find . -name <name> -print | zip newZipFile.zip -@ The -@ tells zip to read files from the input. From man zip(1),-@ file lists. If a file list is specified as -@ [Not on MacOS], zip takes the list of input files from standard input instead of from the command line.
View list of files in ZIP archive on Linux - Super User
Apr 21, 2017 · In Ubuntu, try view [zipfile]. You need the lesspipe helper installed to enable zip file support for less. It's standard on many linux systems but not on OSX, but you can install it with brew. It's a neat hack to use less, but unzip -l seems like the canonical answer, esp. given that it's a far more universal answer.
Find all zips, and unzip in place - Unix - Stack Overflow
Feb 11, 2013 · Use -execdir instead of -exec, which runs the command in the directory where the file is found, not the directory you run find from. find . -name '*.zip' -execdir unzip '{}' ';' Share
How to find all .zip files and file size in linux
Nov 15, 2019 · You should use find. find -iname *.zip. Example: to search for all .zip files in current directory and all sub-directories try this: find . -iname *.zip. This will list all files ending with .zip regarding of case. If you only want the ones with lower-case change -iname to -name. The command grep searches for stings in files, not for files.
ZIP command in Linux with examples - GeeksforGeeks
Apr 11, 2025 · Zip command in Linux is used to compress files and packaging them into a single .zip archive, which overall helps us in saving disk space and making it easy to handle big data. We have discussed various options used in zip command like -d, -u, -m, -r, -x, and -v.
grep - Searching for a string on multiple zip files - Unix & Linux ...
If you need just the list of matching zip files, you can use something like: if ( unzip -c "$file" | grep -q "ORA-1680"); then. echo "$file" fi. This way you are only decompressing to stdout (ie. to memory) instead of decompressing the files to disk.
Find and search inside all compressed files - Ask Ubuntu
Jun 8, 2015 · It's like find but uses SQL-WHERE syntax to filter and can search for files inside zip, tar, rar and 7z archives. Examples: # find files named *.jpg zfind 'name like "%.jpg"' # find files modified before 2010 inside a tar zfind 'date<"2010" and archive="tar"' # search for all files and show in long listing format zfind -l # show results in csv ...
- Some results have been removed