Using Ubuntu: What Package Did This File Come From? Використання Ubuntu: Який пакет чи це фото прийшли?
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. Скільки разів ви помітили, сидять файлів в директорії і питає ... де ж це фото прийшов? Або ви намагаєтеся розповісти другу, як використовувати утиліту, але він не він встановлений, і ви не можете згадати який пакет ви встановили його отримати.
Sure, you can head over to google, but don't you always wonder how those people know? Звичайно, ви можете вирушити до Google, але не завжди цікаво, як ці люди знають? It's simple, install the dlocate utility, which is a faster alternative to dpkg for this type of query. Це просто, встановити dlocate утиліта, яка є більш швидкою альтернативою Dpkg для цього типу запиту.
sudo apt-get install dlocate Суду Apt-Get установці dlocate
You can use the command with the syntax 'dlocate <filename>', which will give you this output: Ви можете використовувати команду з dlocate синтаксис '<fileName> ", який дасть Вам наступний висновок:
$ dlocate flac $ Dlocate FLAC
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 libtunepimp5: / USR / LIB / tunepimp / плагіни / flac.tpp
gstreamer0.10-plugins-good: /usr/lib/gstreamer-0.10/libgstflac.so gstreamer0.10-плагіни-добре: / 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 —— - Обрізати --
That's a lot of output! You can see that there are a lot of filenames that partially match. Це багато вихідних! Ви можете бачити, що є багато імен, які частково збігаються. Better to pass the full path to the filename. Краще пройти повний шлях до файлу. In this case, you can use 'which flac' to determine which flac command you are using, and then pass the full path to dlocate. У цьому випадку, ви можете використовувати ", який FLAC ', щоб визначити, які команди FLAC ви користуєтеся, а потім пройти повний шлях до dlocate.
$ which flac $, Які 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”. Тепер ми знаємо, що FLAC команда знаходиться в пакеті з ім'ям "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) (Так, цей приклад дуже простий) ви можете отримати ще більш творчо (використання символу поруч з 1 ключем, а не одна цитата)
$ dlocate `which flac` $ `Dlocate які 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. Якщо вам не хочеться встановлювати іншу утиліту, ви можете використовувати опцію '-S Dpkg <filename> команди ", яка побудована в, але висновок не так швидко й організовано. Just make sure you pass the full path of the file to either utility and you should get good results. Просто переконайтеся, що ви проходьте повний шлях до файлу, або утиліту, і ви повинні отримати хороші результати.

Daily Email Updates Email Щоденні оновлення
You can get our how-to articles in your inbox each day for free. Ви можете отримати наші довідкові статті у Вашу поштову скриньку щодня безкоштовно. Just enter your name and email below: Просто введіть ваші ім'я та адресу електронної пошти нижче:


