The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Deleted file shows in a 'locate'

Discussion in 'General Discussion' started by Website Rob, Feb 11, 2003.

  1. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    A most curious thing has happened and I'm hoping someone can tell me the reason why. Using Linux 7.3, I deleted a file in root shell and yet, when a I do a locate it still shows. But if I go to the directory shown in the locate, the file is not there?

    Why would it do that?


    Also, in doing a Find such as:

    # find / -type f -name '*.*' -exec grep -s searchword {} \; -print

    I want to find every file with the 'searchword' in it except for HTML files. Can someone explain how to do that?
     
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Locate creates a snapshot database of the system to force an update of the locate snapshop do the the following

    from an ssh prompt
    cd /
    locate -U . &

    That should update the snapshot.
     
  3. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Nope, same thing -- still shows deleted file(s).

    I just tried opening a new SSH session and it still doesn't work?

    A restart of Apache didn't do anything but a restart of Bind cleared up the problem? Seems to be a somewhat, drastic measure just to get deleted files to show.
     
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,578
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Toronto, Ontario Canada
    cPanel Access Level:
    DataCenter Provider
    Restarting Bind? Now that's weird. Was it a zone file or something that was deleted?
     
  5. Danks

    Danks Active Member

    Joined:
    Oct 10, 2001
    Messages:
    25
    Likes Received:
    0
    Trophy Points:
    1
    locate does not instantly update, you will have to run updatedb to reupdate the locate database.
     
  6. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,506
    Likes Received:
    0
    Trophy Points:
    36
    Location:
    Alberta, Canada
    cPanel Access Level:
    Root Administrator
    Some of them were, yes.

    I'm in a situation where a Client upgraded their account and went from a Shared IP to a Dedictated. They had 3 Parked Domains and only one made it through the upgrade. I'm now trying to figure out how to get the other two Parked Domains to get with the program.

    Get the typical error when trying to add as new, that DNS has already been allocated -- which of course, is the Shared IPs previously used. Unless manual changes are made, the previously Parked Domains cannot be added.
     
Loading...

Share This Page