PDA

View Full Version : how to search hard disk file format



seachen
09-17-2007, 03:25 PM
for eg. i want to search my hard disk whether have store file format like mp3, avi, bt. may i know how to search from ssh?

what is the command ?

thank you

nobaloney
09-17-2007, 07:08 PM
I'm not sure what this has to do with DirectAdmin; I've moved it to Off-Topic Discussion.

# locate .mp3
# locate .avi
# locate .bt
Jeff

seachen
09-19-2007, 04:18 PM
I'm not sure what this has to do with DirectAdmin; I've moved it to Off-Topic Discussion.

# locate .mp3
# locate .avi
# locate .bt
Jeff

when i try to using command as you teach, it show msg as below


[root@server ~]# locate .mp3
warning: locate: could not open database: /var/lib/slocate/slocate.db: No such f ile or directory
warning: You need to run the 'updatedb' command (as root) to create the database .
Please have a look at /etc/updatedb.conf to enable the daily cron job.

chatwizrd
09-19-2007, 05:40 PM
Do the command

updatedb

then

locate .mp3

nobaloney
09-19-2007, 06:24 PM
Note my error (fixed above); ..avi is incorrect. Correct should be:

# locate .avi
Jeff

seachen
09-20-2007, 01:37 PM
Do the command

updatedb

then

locate .mp3

type "updatedb" at root access?
i have do it. but it show as image below. nothing hapeen.

http://img98.imageshack.us/img98/1913/udbzo5.png

nobaloney
09-21-2007, 12:02 PM
It should eventually return another prompt. No other information returned means it ran properly without error.

Jeff