LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-31-2005, 03:58 PM   #1
gamor
Member
 
Registered: Jul 2004
Posts: 77

Rep: Reputation: 15
using find /grep


Hi everyone,
I am having troubles using find and grep. What would be the expression to search for a key term in all files in subdirecties of a main directory?
Also I am trying to run a program and I keep getting a message that a sepcific file cannot be opened even though i added the path to .bash_profile. Am I supposed to do something extra so the file cann be opened
Thanks for your help.
 
Old 03-31-2005, 04:12 PM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
grep -R something .
 
Old 03-31-2005, 04:30 PM   #3
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
Quote:
Also I am trying to run a program and I keep getting a message that a sepcific file cannot be opened even though i added the path to .bash_profile. Am I supposed to do something extra so the file cann be opened
more details plzz!
 
Old 03-31-2005, 06:56 PM   #4
Linux~Powered
Member
 
Registered: Jan 2004
Location: /lost+found
Distribution: Slack`er-current
Posts: 845

Rep: Reputation: 33
Quote:
Also I am trying to run a program and I keep getting a message that a sepcific file cannot be opened even though i added the path to .bash_profile.
Did you 'source .bash_profile' (without the strong quotes) after you edited it or logged out and logged back in?
 
Old 04-01-2005, 02:49 PM   #5
gamor
Member
 
Registered: Jul 2004
Posts: 77

Original Poster
Rep: Reputation: 15
I didn't source the .bash_profile. Should I just write it the way you specified source .bash_profile
I logged out and loogged in, that didn't work.
Thanks for your help
 
Old 04-01-2005, 03:01 PM   #6
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
Plzz post the exact error message here so that It would be easy for all of us to sort your problem out.
What file cannot be opened? Its probably a shared library file, you can't set path to shared library from .bash_profile If I can rememebr.
So, if you post the exact error messages along with the command you ran, it would be very easy.
 
Old 04-04-2005, 03:34 PM   #7
gamor
Member
 
Registered: Jul 2004
Posts: 77

Original Poster
Rep: Reputation: 15
I added the path to .bash_profile. What I have in this file is

# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

PATH=$PATH:$HOME "all the aths I include"

export PATH
unset USERNAME


When I run the program I get:
ERROR: **couldn't open stopword file "release3.2-linux/data/default.stp".

default.stp is just a regular file.

What can the problem be?

thanks
 
Old 04-04-2005, 05:25 PM   #8
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
Looks like the program isn't finding release3.2-linux/data/default.stp file. Does this file exist?
Also looks like the program is looking for the file from its current directory.
 
Old 04-05-2005, 08:57 AM   #9
gamor
Member
 
Registered: Jul 2004
Posts: 77

Original Poster
Rep: Reputation: 15
Yeah the ile exists, I can open it. It looks at it from where I run the program.
 
Old 04-06-2005, 09:34 AM   #10
gamor
Member
 
Registered: Jul 2004
Posts: 77

Original Poster
Rep: Reputation: 15
Anyone can help me here. When I said I can open it, I meant that it exists. I still get the message that the file cannot be opened. Even when I try to run the run program in the directory where the file is. Anyone knows what the problem can be?
Thnaks a lot
 
Old 04-06-2005, 02:00 PM   #11
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
The permission of the file may be the problem. For the time being give all permission to the file and see. Another thing, if you can edit the progams configuration file to use absolute path of that .stp file instead of that reative one, plzz do that.
And if that .stp file is a script file. it needs executable permission as well.
Change to the folder contating the file and then run.
chmod 777 default.stp

After that try to run the program and post back.
 
Old 04-06-2005, 03:49 PM   #12
gamor
Member
 
Registered: Jul 2004
Posts: 77

Original Poster
Rep: Reputation: 15
I did what you said but it still doesn't work. Any other possibillities.
 
Old 04-06-2005, 05:39 PM   #13
evil_empire
Member
 
Registered: Mar 2005
Distribution: Fedora Core 3
Posts: 176

Rep: Reputation: 31
Well, I don't exactly know whats going on in your side nor do I know which program it is. If its possible
give me the link to the program, so that I can test and see whats wrong.
Alsp, plzz explain in more details. What kind of prgram is it? Was the compilation successful?
 
Old 04-06-2005, 05:51 PM   #14
comprookie2000
Gentoo Developer
 
Registered: Feb 2004
Location: Fort Lauderdale FL.
Distribution: Gentoo
Posts: 3,291
Blog Entries: 5

Rep: Reputation: 56
default.stp is just a regular file. What kind of file is .stp?
 
Old 04-13-2005, 03:36 PM   #15
gamor
Member
 
Registered: Jul 2004
Posts: 77

Original Poster
Rep: Reputation: 15
I just wanted to say thanks for trying to help me. I figured out what the problem was. I just had the path written wong in one of the files. the system has so many modules andthat was kind of confusing.

I just have a quick question. I need to make sure that the lock deamon rpc.lockd is running. When I write lssrc -s rpc.lockd I get : bash : lssrc : command not found. Is there a different command when using the bash shell?
 
  


Reply


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
Using find and grep - how to exclude a result ? graziano1968 Linux - General 13 12-04-2010 11:02 PM
find with grep and replace it dominant Linux - Newbie 4 03-03-2004 02:11 PM
Using grep to find only first instance roballen Linux - General 2 01-29-2004 04:21 AM
help me find grep-2.5.1 shanenin Linux - Software 1 01-23-2004 10:01 PM
trying to use find and grep, but don't know well enough. duhduhdude Linux - Newbie 9 03-22-2003 09:44 PM


All times are GMT -5. The time now is 10:03 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration