I have a movie directory in my NAS containing over 130 folders each folder contains the movie file along with some other files such as .jpg’s .nfo’s etc and every folder contains a file called folder.jpg and I want to locate one of them, the problem is I only have the file size to go on
I don’t really fancy the prospect of opening each folder individually and checking the filesize of each folder.jpg file so my question is is there a command I can run that will list all these folder.jpg files along with their file size so I can identify the one I’m looking for
I tried to cd into the directory and running ls & ls -l but that only lists the sub directories and the man page doesn’t show anything that might do it
You could try:
cd in to base directory where all other sub directories reside.
find . -name "folder.jpg" -size 1024k
The . represents current directory where find runs ‘file’ on every file in or below of this directory.
You could specify the full path here if you do not fancy cd ing in.
Set size accordingly
'c' for bytes
'k' for Kilobytes (units of 1024 bytes)
'M' for Megabytes (units of 1048576 bytes)
Be Aware - that also applies to the gnome-search-tool as it’s really just a GUI for the “find” command, so bear that in mind when defining the “size at least” and “size at most” parameters.
I found the file using the search tool, I set the search criteria between 340kb-350kb and only 1 file was found and it turned out to the file I was looking for