Using Ubuntu: What Package Did This File Come From? Paggamit ng Ubuntu: Ano Package ba ito File Come Mula?
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. Ilang beses ka O Napansin ng isang file na upo sa isang direktoryo at wondered ... na kung saan ay ang file na ito nanggaling? Na sinusubukan mong sabihin sa isang kaibigan kung paano gamitin ang isang utility ngunit hindi siya ay may naka-install na ito, at hindi mo matandaan kung ano ang pakete na naka-install mo sa kumuha ito.
Sure, you can head over to google, but don't you always wonder how those people know? Sure, maaari mong tumuloy sa google, ngunit hindi palagi mong magtaka kung paano ang mga taong kilala? It's simple, install the dlocate utility, which is a faster alternative to dpkg for this type of query. Ito ay simple, i-install ang dlocate utility, na kung saan ay isang mas mabilis na alternatibo sa dpkg para sa ganitong uri ng tanong.
sudo apt-get install dlocate sudo APT-i-install ang makakuha ng dlocate
You can use the command with the syntax 'dlocate <filename>', which will give you this output: Maaari mong gamitin ang command na may dlocate ang syntax '<filename>', na kung saan ay magbibigay sa iyo ito output:
$ 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 / plugins / flac.tpp
gstreamer0.10-plugins-good: /usr/lib/gstreamer-0.10/libgstflac.so gstreamer0.10-plugins-magandang: / 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 —— - Trimmed --
That's a lot of output! You can see that there are a lot of filenames that partially match. Iyan ay isang pulutong ng output! Makikita mo na may isang pulutong ng filename na bahagyang tumutugma. Better to pass the full path to the filename. Mas mahusay na ipasa ang buong landas sa ang 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. Sa kasong ito, maaari mong gamitin ang 'na flac' upang matukoy kung aling flac utos ang iyong ginagamit, at pagkatapos ay pumasa sa buong landas sa dlocate.
$ which flac $ Na 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”. Ngayon, alam natin na ang flac utos ay matatagpuan sa ang pakete na tinatawag na "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) (Oo, halimbawa na ito ay napaka-simple) maaari ka ring makakuha ng mas maraming creative (gamitin ang mga karakter na katabi ng 1 key, hindi sa isang quote)
$ dlocate `which flac` $ Dlocate `na` 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. Kung hindi mo pakiramdam tulad ng pag-install ng isa pang utility, maaari mong gamitin ang 'dpkg-S-utos <filename>' na nakapaloob sa, ngunit ang output ay hindi halos bilang mabilis o organisado. Just make sure you pass the full path of the file to either utility and you should get good results. Basta siguraduhin na ipasa ang buong landas ng file sa alinman sa utility at dapat kang makakuha ng magandang resulta.

Daily Email Updates Araw-araw na Updates Email
You can get our how-to articles in your inbox each day for free. Maaari kang makakuha ng aming kung-paano na mga artikulo sa iyong inbox sa bawat araw para sa libre. Just enter your name and email below: Ilagay lamang ang inyong pangalan at email sa ibaba:


