LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-14-2007, 09:34 AM   #1
carlosinfl
Senior Member
 
Registered: May 2004
Location: Orlando, FL
Distribution: Arch
Posts: 2,905

Rep: Reputation: 77
Searching The Entire System


I believe an entry was made on my email server however I have no clue where. It is an IP address 160.142* entry made in a config file so I was wondering if I can search the entire system (I know this will take a while) for the 160.142* entry? I did an updatedb on the RHEL4 ES system however I need to find and change this entry made however I can't seem to recall its location and have spent over one hour already looking.

Anyone have cmd line suggestions?
 
Old 10-14-2007, 10:53 AM   #2
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
Code:
grep -r 160.142 /
 
Old 10-14-2007, 11:18 AM   #3
bigrigdriver
LQ Addict
 
Registered: Jul 2002
Location: East Centra Illinois, USA
Distribution: Debian stable
Posts: 5,908

Rep: Reputation: 356Reputation: 356Reputation: 356Reputation: 356
find / -type f | grep '160.142'

In this command, find starts from the root of the filesystem, searching through directories for regular files (-type f). When it finds one, in calls grep to look into the file for the regular expression 160.142.

And yes, find does take a while because if's a file-by-file search.
 
Old 10-14-2007, 07:17 PM   #4
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
This could painstakingly take a long time searching the entire system. I'd suggest searcing in /etc first, since that would probably be the most logical place a config file would be edited that included any type of IP Address.
 
Old 10-14-2007, 09:10 PM   #5
matthewg42
Senior Member
 
Registered: Oct 2003
Location: UK
Distribution: Kubuntu 12.10 (using awesome wm though)
Posts: 3,530

Rep: Reputation: 65
What do you mean by entry? A file name?
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Move an entire file system on a live Unix system LXer Syndicated Linux News 0 07-08-2006 05:33 PM
Problems searching entire files system. thekillerbean Linux - Software 12 02-03-2006 08:29 AM
How to Reconfigure the entire system...... manojpillai Fedora 5 12-18-2004 06:50 PM
Updating entire system? Eklipz Slackware 9 12-12-2004 04:11 PM
How can I backup my entire system? TheDirtyPenguin Linux - Software 5 03-16-2004 08:48 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:23 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