Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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,505
    Likes Received:
    1
    Trophy Points:
    318
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    193
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Website Rob

    Website Rob Well-Known Member

    Joined:
    Mar 23, 2002
    Messages:
    1,505
    Likes Received:
    1
    Trophy Points:
    318
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. dgbaker

    dgbaker Well-Known Member
    PartnerNOC

    Joined:
    Sep 20, 2002
    Messages:
    2,574
    Likes Received:
    3
    Trophy Points:
    193
    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?
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. Danks

    Danks Active Member

    Joined:
    Oct 10, 2001
    Messages:
    26
    Likes Received:
    1
    Trophy Points:
    303
    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,505
    Likes Received:
    1
    Trophy Points:
    318
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice