Koozali.org: home of the SME Server

Contribs.org Forums => General Discussion => Topic started by: Bud on March 01, 2008, 01:14:54 PM

Title: File Search
Post by: Bud on March 01, 2008, 01:14:54 PM
Hi Guys

Still a Noob at Linux  :lol: so please excuse the Questions.

1. How do I in console mode Search for a File on my SME Server?

2. How do I search for a File with specified Text in that file on my SME Server?

3. How do I search for Files with a Particular Extension and Show where those File(s) are Located and in what Directory.

Thanks  :P
Title: Re: File Search
Post by: cactus on March 01, 2008, 01:33:53 PM
Hi Guys

Still a Noob at Linux  :lol: so please excuse the Questions.

1. How do I in console mode Search for a File on my SME Server?
Code: [Select]
locate filename
which filename
find -type f | grep filename
2. How do I search for a File with specified Text in that file on my SME Server?
Code: [Select]
grep 'CaseSensitiveText' /path/to/filename
grep -i 'caseinsensitivetext' /path/to/filename
3. How do I search for Files with a Particular Extension and Show where those File(s) are Located and in what Directory.
Code: [Select]
find -type f | grep '.extension'
For more information on command line commands: http://astore.amazon.co.uk/unixtutorialf-21/detail/0596009658 (http://astore.amazon.co.uk/unixtutorialf-21/detail/0596009658)
Title: Re: File Search
Post by: raem on March 02, 2008, 01:20:07 AM
Bud

You can google for Linux commands

You can also use
man commandname
eg
man find

for additional info when you know a particular command

q to exit

Title: Re: File Search
Post by: Bud on March 02, 2008, 06:55:00 AM
Thanks for the Help Guys.

Long Live SME   :smile: