Önce komutun sistem'e yüklenmesini görelim.CTRL + ALT + T tuş kombinasyonu ile açacağınız konsol komut satıra şöyle komut girin.
Kod: Tümünü seç
$ sudo -s apt install locate && updatedb ÖRNEK ÇIKTI:
Kod: Tümünü seç
linuxmaster@notebook-pc ~ $ su -
Parola: ******************************
notebook-pc ~ # apt install locate && updatedb
Paket listeleri okunuyor... Bitti
Bağımlılık ağacı oluşturuluyor
Durum bilgisi okunuyor... Bitti
Aşağıdaki YENİ paketler kurulacak:
locate
0 paket yükseltilecek, 1 yeni paket kurulacak, 0 paket kaldırılacak ve 0 paket yükseltilmeyecek.
49,2 kB arşiv dosyası indirilecek.
Bu işlem tamamlandıktan sonra 306 kB ek disk alanı kullanılacak.
Alınıyor: 1 http://archive.ubuntu.com/ubuntu/ trusty/universe locate i386 4.4.2-7 [49,2 kB]
3 sn.'de 49,2 kB alındı (15,4 kB/s)
Daha önce seçili olmayan locate paketi seçiliyor.
(Veritabanı okunuyor ... 396623 dosya veya dizin kurulu durumda.)
.../locate_4.4.2-7_i386.deb paketi açılmaya hazırlanıyor...
locate (4.4.2-7) paketi açılıyor...
man-db (2.6.7.1-1ubuntu1) için tetikçiler işleniyor...
locate (4.4.2-7) ayarlanıyor..1.
Kod: Tümünü seç
locate -help2.
Kod: Tümünü seç
man locateÖRNEK ÇIKTI:
Kod: Tümünü seç
notebook-pc ~ # locate -help
Usage: locate [OPTION]... [PATTERN]...
Search for entries in a mlocate database.
-A, --all only print entries that match all patterns
-b, --basename match only the base name of path names
-c, --count only print number of found entries
-d, --database DBPATH use DBPATH instead of default database (which is
/var/lib/mlocate/mlocate.db)
-e, --existing only print entries for currently existing files
-L, --follow follow trailing symbolic links when checking file
existence (default)
-h, --help print this help
-i, --ignore-case ignore case distinctions when matching patterns
-l, --limit, -n LIMIT limit output (or counting) to LIMIT entries
-m, --mmap ignored, for backward compatibility
-P, --nofollow, -H don't follow trailing symbolic links when checking file
existence
-0, --null separate entries with NUL on output
-S, --statistics don't search for entries, print statistics about each
used database
-q, --quiet report no error messages about reading databases
-r, --regexp REGEXP search for basic regexp REGEXP instead of patterns
--regex patterns are extended regexps
-s, --stdio ignored, for backward compatibility
-V, --version print version information
-w, --wholename match whole path name (default)
Hataları mitr@redhat.com raporla.HAYALİ SENARYO:
Diyelim ki Belgeler dizinin alt dizininde 1000 fazla dosya olduğunu düşünelim.Siz bir dosyayı bulmaya çalışıyorsunuz, işin kötü dosyanın uzantısı dışında dosyanın tam konumunu bulmanız mümkün değil....! , işte bu durumda "GNU-Komutu "locate"" imdadınıza yetişmekte.....
ÖRNEK ÇIKTI:
Kod: Tümünü seç
linuxmaster@notebook-pc /media/linuxmaster/DEBIAN 8.7.1/home/linuxmaster/M.AYDEMİR $ cd Belgeler
linuxmaster@notebook-pc /media/linuxmaster/DEBIAN 8.7.1/home/linuxmaster/M.AYDEMİR/Belgeler $ locate *.pdf
/KBasic/docs/far_outdated_pdf_documentations/builtins.pdf
/KBasic/docs/far_outdated_pdf_documentations/description.pdf
/KBasic/docs/far_outdated_pdf_documentations/framework.pdf
/KBasic/docs/far_outdated_pdf_documentations/keywords.pdf
/KBasic/docs/far_outdated_pdf_documentations/manual.pdf
/KBasic/docs/far_outdated_pdf_documentations/misc.pdf
/KBasic/docs/far_outdated_pdf_documentations/overview.pdf
/KBasic/docs/far_outdated_pdf_documentations/syntax.pdf
/KBasic/examples/projects/KeyCodes.kbasic_project/KBasic Meta Keys.pdf
/home/linuxmaster/.local/share/cinnamon/applets/SpicesUpdate@claudiux/fonts/Symbola/License.pdf
/home/linuxmaster/Belgeler/Belgelerim/Dosya Ve Dizinlerin Erişim Hakları.pdf
/home/linuxmaster/Belgeler/Belgelerim/Nano ile Text Dosyası Düzenleme.pdf
/home/linuxmaster/Belgeler/Belgelerim/Terminalden ISO Yazdırma.pdf
/home/linuxmaster/Belgeler/Belgelerim/Terminalden sh_bin_run Uzantılı Dosyalarının Çaıştırılması.pdf
/home/linuxmaster/İndirilenler/PDF/LFS-BOOK-9.1.pdf
/home/linuxmaster/İndirilenler/PDF/Pardus 2011.pdf
/home/linuxmaster/İndirilenler/PDF/Pardus.pdf
/home/linuxmaster/İndirilenler/PDF/Pardus2009.pdf
/home/linuxmaster/İndirilenler/PDF/İşletim Sistemleri.pdf
linuxmaster@notebook-pc /media/linuxmaster/DEBIAN 8.7.1/home/linuxmaster/M.AYDEMİR/Belgeler $
