Linux Lite Forums

Software - Support => Other => Topic started by: bigskill on October 26, 2018, 04:30:32 PM

Title: file type/category search?
Post by: bigskill on October 26, 2018, 04:30:32 PM
Is there a search program or file manager that will search for file types/categories?
 IE: video files, audio files image files?
Title: Re: file type/category search?
Post by: bitsnpcs on October 26, 2018, 04:36:29 PM
Hello bigskill,
I use Fsearch, if I type .mp3 it only finds mp3's, but if I type audio it finds anything of any type that has the word audio in its name, such as a folder for a software.
Title: Re: file type/category search?
Post by: bigskill on October 26, 2018, 04:53:10 PM
Not  exactly what I mean.
For example I wold like it to search for all audio files IE all mp3, flac, m3u,m4p, midi, ogg etc 
Or all video files or image files
Not files with the audio in the name.
Title: Re: file type/category search?
Post by: bitsnpcs on October 26, 2018, 05:28:36 PM
This will find all the files with the extensions of .mp3 and .png, (as I don't have any music files other than .mp3 and I don't have any video files, so I used these extensions to test it works),  just extend it as below to include whatever file types you want.

Code: [Select]
find . -type f \( -name "*.mp3" -o -name "*.png" \)
the . after find will make it search in the current working directory, otherwise remove it for a wider search outside the current directory.
Title: Re: file type/category search?
Post by: firenice03 on October 26, 2018, 05:50:18 PM

Code: [Select]
find . -type f \( -name "*.mp3" -o -name "*.png" \)


I found the command above ran without the \( .. \ )
Code: [Select]
find . -type f -name "*.mp3" -o -name "*.png" FYI if you want to search root (/) use sudo..


You should be able to use locate as well..
Code: [Select]
locate *.mkv *.webm *.flv *.vob *.ogg *.ogv *.drc *gifv *.mng *.avi$ *.mov Adding/changing the extensions as needed...


Additional / variations
*.mkv *.webm *.flv *.vob *.ogg *.ogv *.drc *gifv *.mng *.avi$ *.mov *.qt *.wmv *.yuv *.rm *.rmvb *.asf *.amv *.mp4$ *.m4v *.mp *.m?v *.svi *.3gp *.flv *.f4v