Results 1 to 4 of 4
Hello everyone,
This is my first post here.
I need a little help, I have a website running php5, and need to add a few categories into a couple of ...
- 01-14-2009 #1Just Joined!
- Join Date
- Jun 2008
- Posts
- 3
[SOLVED] Search Command
Hello everyone,
This is my first post here.
I need a little help, I have a website running php5, and need to add a few categories into a couple of drop down boxes. The only problem is that I can not find where the options for the drop boxes are kept. I need a command that will allow me to search all files in a particular folder for a variable. I have tried commands such as
grep -R -B3 -A4 "variable" /nas2/*
find -name '*.*' -print0 | xargs -0 grep '$variable'
nas2 is the directory
I am new to this department and not sure what to try next.
Thanks in advance.
- 01-14-2009 #2
grep is the command to use here. Are you new to Linux entirely? /nas2/ would be a directory called "nas2" pretty high up in the tree: it's unlikely that the directory is actually located here.
If that is the correct directory, what error are you getting? The command to search for a variable recursively in a directory is grep -R "variable" dir/, so it looks like that's working.DISTRO=Arch
Registered Linux User #388732
- 01-15-2009 #3Just Joined!
- Join Date
- Jun 2008
- Posts
- 3
I am new to working with php and html, nas2 is the main directory that I need to find it in for then I can FTP it to main server once I have made the nessecary changes.
I am not getting an error, I just can't seem to find what I am looking for. I tried grep -R "variable" dir/, but it did not give me an answer.
- 01-15-2009 #4Just Joined!
- Join Date
- Jun 2008
- Posts
- 3
Never mind,
I found what I was looking for in my database files.
Thanks for your help Cabhan.


