1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

How to find file on server?

Discussion in 'HTML & Website Design' started by cgl102770, Jul 13, 2018.

  1. #1
    I'm a web designer, and one of my clients got an email from their host, Godaddy, saying a potentially malicious file was found and needs to be removed, then gave the name of the file. However, the host did not say which directory it was in. Since it may be malicious I'd rather not download the website and search it.
    SEMrush
    What is the best way to search for this? Is there a way to do it without logging in to the directory? Thank you for any suggestions.
     
    cgl102770, Jul 13, 2018 IP
    SEMrush
  2. Phil S

    Phil S Member

    Messages:
    61
    Likes Received:
    19
    Best Answers:
    4
    Trophy Points:
    35
    #2
    Just write a one-shot script that will search for the file by name, given the credentials. It shouldn't take too much time.
     
    Phil S, Jul 14, 2018 IP
    sarahk likes this.
  3. sarahk

    sarahk iTamer Staff

    Messages:
    24,359
    Likes Received:
    3,279
    Best Answers:
    94
    Trophy Points:
    615
    #3
    sarahk, Jul 14, 2018 IP
  4. cgl102770

    cgl102770 Member

    Messages:
    39
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    43
    #4
    I'll try it, thank you for the suggestions.
     
    cgl102770, Jul 24, 2018 IP
  5. Cameron Fillers

    Cameron Fillers Member

    Messages:
    33
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #5
    If you have ssh access, you and mlocate is installed, you can simply run...

    #locate filename.txt

    If not, and you do not want to install mlocate, you can perform a find command. We use / to search the entire server, and it may take a while, but will return all results.

    #find / -name filename.txt

    If there are too many results, for whatever reason, you can also store the results in a file and parse it after

    #find / -name filename.txt > find.output

    and then use any editor to view the results

    #nano find.output

    As a last resort, if you do not have SSH access, but have FTP access, you can use filezilla, and the magnifying glass tool to search, and that will look through all directories and locate files for you. This is very slow, but works.
     
    Cameron Fillers, Jul 27, 2018 IP
    sarahk likes this.