bash - How can I find all video files on my system? - Ask Ubuntu
i tried using unity lens file search *.*
, filtering last modified=all, type=videos, , size=all found nothing although know there .3gp files in pictures folder. know have numerous video files on drive mounted on file system well. compiled list of extensions , tried numerous iterations of find
command utilizing these find ./ -name "*.ext" -o (etc, etc, ad nauseum) no luck whatsoever. solution?
alternative: search on file:
sudo find . -type f -exec file -n -i -- {} + | grep video
or if want filenames ...
sudo find . -type f -exec file -n -i -- {} + | sed -n 's!: video/[^:]*$!!p'
-n, --no-pad
: don't pad filenames
-i, --mime
: causes file command output mime type strings rather more traditional human readable ones. may 'text/plain; charset=us-ascii' rather 'ascii text'. in order option work, file changes way handles files recognized command (such many of text file types, directories etc), , makes use of alternative 'magic' file. (see files section, below).
the files section points to:
files
/usr/share/misc/magic.mgc
default compiled list of magic.
/usr/share/misc/magic
directory containing default magic files.
file
slowwwwwwwwwwwwwwwww though (it open files find finds) has advantage not need add extentions.
using locate:
locate *.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
Comments
Post a Comment