You are not logged in.

Dear visitor, welcome to KDE-Forum.org. If this is your first visit here, please read the Help. It explains in detail how this page works. To use all features of this page, you should consider registering. Please use the registration form, to register here or read more information about the registration process. If you are already registered, please login here.

1

Wednesday, November 22nd 2006, 11:51am

Is there a KDE MIME filter?

I am looking for a command line tool where I can pipe in a list of files and then pipe out a list of files from one MIME type. E.G.

Source code

1
ls | MIMEfilter image/jpeg | more


prints a list of all jpeg's in the current folder (yes I know you can use ls *.jpeg but firstly this is just an example and secodnly that won't catch files with the wrong extension)

Also the program will need to use KDE's list of MIME types.

bram85

Professional

Posts: 948

Location: Eindhoven

Occupation: Software Engineer

  • Send private message

2

Wednesday, November 22nd 2006, 5:48pm

RE: Is there a KDE MIME filter?

Use the 'file' command for that and the MIME's are defined in $KDEDIR/shrae/mimelnk and $KDEHOME/share/mimelnk
Bram Schoenmakers
KDE Netherlands (www.kde.nl)