LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Desktop (https://www.linuxquestions.org/questions/linux-desktop-74/)
-   -   How to find a file using the command line (https://www.linuxquestions.org/questions/linux-desktop-74/how-to-find-a-file-using-the-command-line-500299/)

matrix13 11-10-2006 05:54 AM

How to find a file using the command line
 
how can i find a file in terminal mode in knoppix 4.
i used the command 'find'. but is there any extensions for it.
what is 'kpsewhich'.

pwc101 11-10-2006 06:19 AM

Try, as root:
Code:

find / -iname filename
That should find a file called filename anywhere on your filesystem.

reddazz 11-10-2006 06:24 AM

matrix13, I have edited the title of your thread so that it reflects your problem. Please use thread titles that summarise your problem instead of titles such as "help me". Cheers.

By the way, you can also use the "locate" command e.g.
Code:

$locate somefile.txt

matrix13 11-13-2006 10:08 PM

i tried find / -iname.
i am happy to tell you that it worked.

but locate doesnt work. is it only for *.txt files.

slakmagik 11-13-2006 11:45 PM

'man locate updatedb' - you may need to create/update your database. (Locate is faster at the expense of requiring a database that may be out of date.)

Whenever something "doesn't work", always tell us how it doesn't work - what you expected and exactly what happened, such as the error message or other output from the command. If there was absolutely no output, tell us that too. But "doesn't work" just leaves us playing darts blindfolded.


All times are GMT -5. The time now is 05:14 PM.