Koozali.org: home of the SME Server

File Search

Offline Bud

  • *
  • 487
  • +0/-0
File Search
« 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

Offline cactus

  • *
  • 4,880
  • +3/-0
    • http://www.snetram.nl
Re: File Search
« Reply #1 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
Be careful whose advice you buy, but be patient with those who supply it. Advice is a form of nostalgia, dispensing it is a way of fishing the past from the disposal, wiping it off, painting over the ugly parts and recycling it for more than its worth ~ Baz Luhrmann - Everybody's Free (To Wear Sunscreen)

Offline raem

  • *
  • 3,972
  • +4/-0
Re: File Search
« Reply #2 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

...

Offline Bud

  • *
  • 487
  • +0/-0
Re: File Search
« Reply #3 on: March 02, 2008, 06:55:00 AM »
Thanks for the Help Guys.

Long Live SME   :smile: