Latest LQ Deal: Linux Power User Bundle
Go Back > Forums > Linux Forums > Linux - Desktop
User Name
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.


  Search this Thread
Old 11-10-2006, 05:54 AM   #1
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Rep: Reputation: 25
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'.
Old 11-10-2006, 06:19 AM   #2
Senior Member
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

Rep: Reputation: 128Reputation: 128
Try, as root:
find / -iname filename
That should find a file called filename anywhere on your filesystem.
Old 11-10-2006, 06:24 AM   #3
LQ Guru
Registered: Nov 2003
Location: N. E. England
Distribution: Fedora, CentOS, Debian
Posts: 16,298

Rep: Reputation: 75
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.
$locate somefile.txt
Old 11-13-2006, 10:08 PM   #4
Registered: Nov 2006
Location: Kerala, India
Distribution: Arch Linux
Posts: 134

Original Poster
Rep: Reputation: 25
i tried find / -iname.
i am happy to tell you that it worked.

but locate doesnt work. is it only for *.txt files.
Old 11-13-2006, 11:45 PM   #5
Senior Member
Registered: Feb 2003
Distribution: Slackware
Posts: 4,113

Rep: Reputation: Disabled
'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.



Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I find the command line? callum85 Linux - Newbie 3 09-27-2006 06:02 PM
command line edit -- global find/replace on text file w/o going into vi car182 Linux - Newbie 4 05-25-2006 05:42 PM
Can't find command line barbra Linux - Newbie 3 12-28-2004 02:17 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
how to find a looooooooong command line acid_kewpie Linux - General 6 11-20-2002 01:37 PM > Forums > Linux Forums > Linux - Desktop

All times are GMT -5. The time now is 02:47 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration