Thứ Bảy, 12 tháng 3, 2011

Locate Command


locate <path>


path: directory or file name.


Ex: locate /etc
if you've got access denied error:
sudo locate /etc
-> Enter the password



-> Display all diretory path have word "/etc":
/etc/ssl/certs/19899da5.0
/etc/ssl/certs/1dac3003.0
/etc/ssl/certs/1dcd6f4c.0
/etc/ssl/certs/219d9499.0
/etc/ssl/certs/23f4c490.0
/etc/ssl/certs/256fd83b.0
/etc/ssl/certs/2edf7016.0
/etc/ssl/certs/2fa87019.0
/etc/ssl/certs/2fb1850a.0
/etc/ssl/certs/31044350.0
/etc/ssl/certs/33815e15.0
/etc/ssl/certs/399e7759.0
......................................


locate /var/www/test.php
if you've got access denied error:
sudo locate /var/www/test.php
-> Enter the password
/var/www/test.php


This power command. "It's got a good speed!


0 nhận xét:

Đăng nhận xét