I have directory path in which there are several sub directories. In all these sub dir there will be one env.cnf file.
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>'
But this only prints path of file in zip file and not the zip file name itself!
Thanks
Hi ,
i have some files of specific pattern ...i need to look for files which are having size greater than zero and move those files to another directory..
Ex...
abc_0702,
abc_0709,
abc_782
abc_1234 ...etc
need to find out which is having the size >0 and move those to target directory..
Thanks in advance..
Siva Santosh
I am wanting to search recursively through a directory and find all files that are not hidden files themselves and are not in a hidden dir. I tried using find .
I've been trying to find png image files a certain height (over 500px). I know that file will return image dimensions. Example:
$ file TestImg1a.png
TestImg1a.png: PNG image data, 764 x 200, 4-bit colormap, non-interlaced
But I need to use this to find all files in a directory with a height over 500px. I know how to print out all files regardless of height:
find .
Hello,
I want remove files have same size in a directory.
this command only find this files.
Code:
ls -l | awk '$1!~/^d/{if(size[$5]!=""){ print}size[$5]=$8}'
I want to remove the files of the same size.
samples: 5 files are same size. I want to keep only first file.
Thank you very much for your help.
At best I would like to have a call like this:
# $searchtool /path/to/search/ -contained-file-name "*vacation*jpg"
...
I want to get the size of all directories within a specific directory. I was thinking something like
find . -type d -exec du -sh {} \;
But that returns all directories recursively. How can I limit the depth?
Hi All,
The script below read the path and searches for the directories/subdirectories and for the files.