The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 20,785     Votes:  16     ✅ Solution
Tags: configuration   ftp   default-programs   image-viewers  
Link: 🔍 See Original Answer on Ask Ubuntu ⧉ 🔗

Title: How to find `.desktop` file location for a particular application
ID: /2019/07/24/How-to-find-_.desktop_-file-location-for-a-particular-application
Created: July 24, 2019    Edited:  February 1, 2023
Upload: June 16, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false

A much faster and more universal search is with locate command:

$ locate '*image*desktop'

locate can search millions of files in a few seconds where it would take find many many minutes:

$ time find / -name '*image*.desktop'
real	0m52.563s
user	0m6.271s
sys	    0m9.002s

$ time locate '*image*desktop'
real	0m0.705s
user	0m0.693s
sys	    0m0.012s

Notice how grep was eliminated from original method and find command was ammended.

The disadvantage of locate is the database is updated daily. If you just installed the application you are searching for today, you will first need to run:

sudo updatedb


In newer versions of Ubuntu, you can install locate by installing the package plocate:

sudo apt install plocate
⇧ ndiswrapper windows drivers uninstall issue How do I edit configuration files?  ⇩