sudo sh -c "rm /usr/share/mime/packages/kde.xml && update-mime-database /usr/share/mime"

Fix "Unknown media type in type" warnings when installing packages


0
By: lordtoran
2015-09-28 23:27:57

These Might Interest You

  • Watch out if you have several USB drives plugged in: it scans the whole /media/ folder !!! You can replace /media/ by the path of a specific USB drive (something like /media/F77A-530B/) I use a sound recorder and I want to plug the recorder and grab the most recent sound. That's what this command does. Use mv instead of cp to move instead of copy. Change *.wav to the required file type.


    0
    cp $(find /media/ -type f -name "*.wav" -printf "%T@ %h/%f\n" | sort | tail -1 | awk '{ print $2 }') .
    hamoid · 2012-06-01 12:45:43 0
  • This assumes you have the 'rpm', 'rpm2cpio' and 'cpio' packages installed. This will extract the contents of the RPM package to your current directory. This is useful for working with the files that the package provides without installing the package on your system. Might be useful to create a temporary directory to hold the packages before running the extraction: mkdir /tmp/new-package/; cd /tmp/new-package


    2
    rpm2cpio /path/to/file.rpm | cpio -i -d
    atoponce · 2009-03-10 21:02:14 0
  • Recursive. Ignores non-media files. Requires ffprobe, paste, and bc. Show Sample Output


    0
    find -type f -exec ffprobe -i "{}" -show_entries format=duration -v quiet -of csv="p=0" \; | paste -sd+ | bc
    Hype · 2014-08-29 23:45:09 0
  • From live CD mount(open) the Ubuntu installed drive. Copy the location (press Ctrl+l, Ctrl+c ) eg: /media/ubuntuuuu Open terminal (Apllication->accessories->terminal) Type this: sudo grub-install --root-directory=/media/ubuntuuuu /dev/sda (replace /media/ubuntuuuu with what u got (ie paste)) Will show success message. Now reboot


    -2
    sudo grub-install --root-directory=/media/ubuntu /dev/sda
    totti · 2011-09-27 17:51:56 0
  • zsh has a powerful correction mechanism. If you type a command in the wrong way it suggests corrections. What happend here is that dir is an unknown command and zsh suggests gdir, while maybe ls was what you wanted. If you want to execute gdir hit y (yes) If you want to try to execute dir anyway hit n (no) If you want to execute completely different spelt command like ls hit a (abort) and type your command If you want to execute a similar spelt commant like udir hit e (edit) and edit your command. Show Sample Output


    -1
    setopt correct
    evandrix · 2012-09-11 01:47:20 0
  • Usefull to determine unknown file type Show Sample Output


    1
    hexdump -C -n 20 filename
    aminehmida · 2012-03-05 15:57:41 0

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down.

Share Your Commands



Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: