I had downloaded a video a few months back. I'm not very well remembering the name by which it is saved. Is there any command or any method that will output only video files so that I can search for my video there? From man pages, I couldn't find any option of find doing that work.
The video file I downloaded may have any extension (like webm etc) and also it may be possible that I had that time changed the name to anything like 'abcde' which I don't remember now. So the search can't be based on file name!
(Just mentioning one similarity: In perl there are commands to check whether a file is text file or binary , etc. Similarly there may be a way to check if its video file or multimedia file)
Best Answer
The basic idea is to use the file utility to determine the type of each file, and filter on video files.
This prints the names of all files in
/some/directory
and its subdirectories recursively whose MIME type is a video type.The
file
command needs to open every file, which can be slow. To speed things up:/tmp
,/var/tmp
and your home directory.Here's an example which constrains the modification time to be at least 60 days ago and the ctime to be no more than 100 days ago.