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 can i see the list of last modified files

Discussion in 'Security' started by dup, Dec 16, 2012.

  1. #1
    Hello,

    do you know any way how can i see the list of last modified files on my server?
    May be by cPanel, or some program does that or by SSH?
    That would be great to know to find which files was modified/added in case my site got hacked.
    Thanks in advance!
     
    dup, Dec 16, 2012 IP
  2. samirj09

    samirj09 Well-Known Member

    Messages:
    335
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    #2
    SSH would be best.

    find . -mtime -1 < This will find all files modified less then 1 day ago. Change the 1 to anything you need. http://unixhelp.ed.ac.uk/CGI/man-cgi?find

    If there was a common string placed in the files, you could also search all files for that string like, grep -rl <string> * . This will print out a list of files that contains that string.
     
    samirj09, Dec 18, 2012 IP
  3. dup

    dup Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    thanks a lot for your reply, that really helps!!
    One more question, what would be the command to display latest modified files in particular subfolder of my site and all it's subfolders? For ex. in site.com/media/
    ?
     
    dup, Dec 20, 2012 IP
  4. samirj09

    samirj09 Well-Known Member

    Messages:
    335
    Likes Received:
    8
    Best Answers:
    0
    Trophy Points:
    125
    #4
    In that case, you could change the (dot). in the above example to the filepath. For example

    find site.com/media -mtime -1

    The find command has tons of other useful flags that you can see in the man pages for it http://unixhelp.ed.ac.uk/CGI/man-cgi?find

    Let me know if that doesnt work for you.
     
    samirj09, Dec 20, 2012 IP
  5. Achiever

    Achiever Well-Known Member

    Messages:
    2,206
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    130
    #5
    by using command prompt.
     
    Achiever, Dec 30, 2012 IP