LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Desktop
User Name
Password
Linux - Desktop This forum is for the discussion of all Linux Software used in a desktop context.

Notices

Reply
 
Search this Thread
Old 11-10-2006, 06:54 AM   #1
matrix13
Member
 
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, 07:19 AM   #2
pwc101
Senior Member
 
Registered: Oct 2005
Location: UK
Distribution: Slackware
Posts: 1,847

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

Rep: Reputation: 73
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
 
Old 11-13-2006, 11:08 PM   #4
matrix13
Member
 
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-14-2006, 12:45 AM   #5
slakmagik
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.
 
  


Reply

Tags
find


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 07:02 PM
command line edit -- global find/replace on text file w/o going into vi car182 Linux - Newbie 4 05-25-2006 06:42 PM
Can't find command line barbra Linux - Newbie 3 12-28-2004 03:17 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 08:45 PM
how to find a looooooooong command line acid_kewpie Linux - General 6 11-20-2002 02:37 PM


All times are GMT -5. The time now is 09:17 PM.

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