Solved

Need to delete same folder accross different web accounts in VPS?

Posted on 2015-02-20
4
125 Views
Last Modified: 2015-02-21
My hosting provider has found a few suspicious files which I have now removed.
Just wondering if there is a command that I can use to remove all bValidator folders from my VPS?

Thanks,


HEX}php.uploader.max.574 : /home/actions1/public_html/bValidator/test2.php
{HEX}gzbase64.inject.unclassed.15 : /home/bluepage/public_html/flash/stat.php
{HEX}php.uploader.max.574 : /home/kingspace/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/metrofor/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/mippcoss/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/ourshop/public_html/bValidator/test2.php
{HEX}php.uploader.max.574 : /home/sevenths/public_html/bValidator/test2.php
0
Comment
Question by:sabecs
  • 2
4 Comments
 
LVL 9

Assisted Solution

by:Rob_Jeffrey
Rob_Jeffrey earned 200 total points
ID: 40622573
If you have shell access, you can use find.

find /home -name "bValidator" -exec rm -rf {} \;


Before you run the above, you can test to see what files would be deleted with:

find /home -name "bValidator"
0
 

Author Comment

by:sabecs
ID: 40622619
Thanks Rob, would that just remove the directory called bValidator and everything in it, or will it also remove other files that might named bValidator   ?
0
 
LVL 9

Expert Comment

by:Rob_Jeffrey
ID: 40622959
That would also remove files named bValidator too.
0
 
LVL 29

Accepted Solution

by:
serialband earned 300 total points
ID: 40623649
If they all follow the same order, these can be easier.
rm  /home/*/public_html/bValidator/test2.php
rmdir  /home/*/public_html/bValidator/
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question