LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 07-21-2004, 05:59 PM   #1
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Rep: Reputation: 15
Finding files with terminal


first off, i use and prefer KDE for various reasons(even though i have only had fedora for 2 days...). My problem is, the find files utility in the start menu freezes whenever i try to search in any folder besides /root. I like to search for files, i'm sure you all do too, so i'm kinda stuck because i don't want to use gnome (it's find file program works fine btw).

i'm wondering if i can use gnome's find program, or could someone show me how to use the 'find' command in the terminal, i have no idea how to use it. all i want to do is search for a file, like "find [insert part of filename here]" and have it display the findings.

thanks for anything

ps: oh, and i might as well ask while i'm here, how do i make it so i boot into KDE by default, thanks

Last edited by joeman3429; 07-21-2004 at 06:03 PM.
 
Old 07-21-2004, 06:11 PM   #2
Lansing_Banda
LQ Newbie
 
Registered: Jul 2003
Location: Huntsville, AL
Distribution: Mandrake 9.1
Posts: 13

Rep: Reputation: 0
The terminal command works like this

find <starting point> <filename>

so to start at root and find a file called bunny.tgz

find / bunny.tgz

There yah go and good luck.

::edit::
And to change your default wm, make a file in your root directory called '.xinitrc' and in it put this:

Code:
#!/bin/bash
     exec startkde
And that should fix that as well

Last edited by Lansing_Banda; 07-21-2004 at 06:19 PM.
 
Old 07-21-2004, 07:13 PM   #3
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
ok, 2 problems:

1.when i type "find / bunny.tgz" it list everyhting on my computer, everything

2. i make the file and named it and put the code in it, so i rebooted. it keeps logging me into the failsafe terminal , its been doing that since i intalled fedora. And when i choose default login or whatever its called, it logs me into gnome. its done that since installation too.
did i do something wrong?
 
Old 07-21-2004, 09:55 PM   #4
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
you can also use locate instead of find
 
Old 07-22-2004, 03:31 AM   #5
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
it does the same thing with locate too
 
Old 07-22-2004, 07:22 AM   #6
seabass55
Member
 
Registered: Jan 2003
Location: 127.0.0.1
Distribution: Fedora&Gentoo
Posts: 207

Rep: Reputation: 30
locate <filename>
 
Old 07-22-2004, 02:32 PM   #7
OEP
Member
 
Registered: Apr 2004
Location: AL, USA
Distribution: FC4, Gentoo
Posts: 58

Rep: Reputation: 15
To find files in the terminal, I usually try:

find <start-point> | grep <filename>

or locate if you prefer:

locate | grep <filename>

I don't know why I use grep, it just has always worked better for me.

And to get KDE to be your default Desktop, you can try:

switchdesk "KDE"

Some users don't have switchdesk installed, though.
 
Old 07-22-2004, 03:45 PM   #8
joeman3429
Member
 
Registered: Jul 2004
Location: Oregon
Distribution: Fedora
Posts: 67

Original Poster
Rep: Reputation: 15
thanks for switchdesk, it worked, but i can't get the find thing to work

lets say i have a folder called "music", i keep music in there if it isn't obvious, and i want to search for my led zeppelin songs. i cd to that folder and then type
find ./ zepp

it lists everything in that folder then outputs at the end:
find: zepp: No such file or directory

i know for a fact i have filenames that have "zepp" in them
am i just missing something?
 
Old 07-22-2004, 03:59 PM   #9
prissed
LQ Newbie
 
Registered: Jul 2004
Location: McKinney, TX
Distribution: MDK 10/KDE 3.2
Posts: 21

Rep: Reputation: 15
try find <start point> -name <search string>
Code:
find / -name bunny*
 
Old 07-22-2004, 07:02 PM   #10
linux-goot
Member
 
Registered: Jun 2004
Posts: 60

Rep: Reputation: Disabled
Before using locate , you need to create a database of filenames for locate to use.

As su, type in updatedb. Once you get your prompt back, just type in locate <filename>.

From what I've experienced, locate will then search all directories and display path and filenames meeting your search parameters.

Last edited by linux-goot; 07-22-2004 at 07:04 PM.
 
Old 07-22-2004, 09:13 PM   #11
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
Yes, that's what 'locate' does but it may find a lot of files so use it in conjunction with 'less' or redirect it to a file for viewing.
Ex:
locate *.mp3 | less
or
locate *.jpg >results_filename

If you're looking for your personal files you can use 'find' much easier:
find ~ -name *mp3 | less

Hope that helps!

Last edited by Vincent_Vega; 07-22-2004 at 09:18 PM.
 
  


Reply



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
Finding files and directories ihatecomputers Linux - Software 1 03-24-2005 09:29 AM
finding files in C++ poeta_boy Programming 2 07-11-2004 01:25 AM
Finding files brentos Linux - General 3 03-22-2004 08:24 PM
Finding files Nicksan Linux - Software 3 06-30-2003 07:16 PM
finding programs in terminal? Boom Linux - Newbie 3 01-08-2003 02:09 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

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

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration