Using Ubuntu: What Package Did This File Come From? Utilizarea Ubuntu: Ce pachet Ai provin de la acest fişier?
How many times have you noticed a file sitting in a directory and wondered… where did this file come from? Or you are trying to tell a friend how to use a utility but he doesn't have it installed, and you can't remember what package you installed to get it. De câte ori aţi observat un fişier şedinţe într-un director şi se întrebă ... în cazul în care nu provin de la acest fişier? Sau dacă încercaţi să-i spuneţi unui prieten cum să utilizaţi un utilitar, dar el nu aveţi instalat, şi nu vă puteţi aminti ceea ce pachet aţi instalat să-l.
Sure, you can head over to google, but don't you always wonder how those people know? Sigur, puteţi peste cap de la Google, dar nu întotdeauna întreb cum acei oameni ştiu? It's simple, install the dlocate utility, which is a faster alternative to dpkg for this type of query. E simplu, instalaţi utilitarul dlocate, care este o alternativă mai rapid pentru a dpkg pentru acest tip de interogare.
sudo apt-get install dlocate sudo apt-get install dlocate
You can use the command with the syntax 'dlocate <filename>', which will give you this output: Aveţi posibilitatea să utilizaţi comanda cu dlocate sintaxa '<nume-fişier> ", care vă va oferi acest ieşire:
$ dlocate flac Flac $ dlocate
libxine1: /usr/lib/xine/plugins/1.1.4/xineplug_flac.so libxine1: / usr/lib/xine/plugins/1.1.4/xineplug_flac.so
libtunepimp5: /usr/lib/tunepimp/plugins/flac.tpp plugin-uri libtunepimp5: / usr / lib / tunepimp / / flac.tpp
gstreamer0.10-plugins-good: /usr/lib/gstreamer-0.10/libgstflac.so gstreamer0.10-plugins-bun: / usr/lib/gstreamer-0.10/libgstflac.so
flac: /. Flac: /.
flac: /usr Flac: / usr
flac: /usr/bin Flac: / usr / bin
flac: /usr/bin/flac Flac: / usr / bin / Flac
—– trimmed —— - Tuns --
That's a lot of output! You can see that there are a lot of filenames that partially match. Aceasta este o mulţime de ieşire! Puteţi vedea că există o mulţime de nume de fişiere pe care parţial se potrivesc. Better to pass the full path to the filename. O mai bună pentru a trece calea completă la numele fişierului. In this case, you can use 'which flac' to determine which flac command you are using, and then pass the full path to dlocate. În acest caz, puteţi folosi ", care Flac" pentru a determina care Flac de comandă pe care îl utilizaţi, apoi trece calea completă la dlocate.
$ which flac $ Care Flac
/usr/bin/flac / usr / bin / Flac
$ dlocate /usr/bin/flac $ Dlocate / usr / bin / Flac
flac: /usr/bin/flac Flac: / usr / bin / Flac
Now we know that the flac command is found in the package called “flac”. Acum ştim că comanda Flac se găseşte în pachetul numit "Flac". (Yes, this example was very simple) You could even get more creative (use the character next to the 1 key, not a single quote) (Da, acest exemplu a fost foarte simplu) Ai putea obţine chiar mai mult de creatie (utiliza caracterul de lângă tasta 1, nu un citat unic)
$ dlocate `which flac` $ Dlocate `, care Flac`
flac: /usr/bin/flac Flac: / usr / bin / Flac
If you don't feel like installing another utility, you can use the 'dpkg -S <filename>' command that is built in, but the output isn't nearly as fast or organized. Dacă nu simt ca a instala un alt utilitar, puteţi folosi 'dpkg-S comanda <nume-fişier> "care este construit in, dar ieşirea nu este aproape la fel de rapid sau organizat. Just make sure you pass the full path of the file to either utility and you should get good results. Doar asiguraţi-vă că aţi trece calea completă a fişierului să fie de utilitate şi ar trebui să obţine rezultate bune.

Daily Email Updates Daily Actualizări de email
You can get our how-to articles in your inbox each day for free. Aveţi posibilitatea să obţineţi modul nostru de-a articole în Inbox în fiecare zi pentru drum liber. Just enter your name and email below: Doar introduceţi numele dvs. şi e-mail de mai jos:


