LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-23-2011, 08:31 AM   #31
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002

That doesn't matter. You are creating more of a chance of being compromised......

But any luck finding the files?
 
Old 03-23-2011, 10:08 AM   #32
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,528

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
Is there a command I can run to remove files with these filenames ANYWHERE on the server (so basically, a command to go through all folders on the server and remove instances of that name).
try
Code:
find / -name "peindom*.php" -delete
Kind regards

Last edited by repo; 03-23-2011 at 11:21 AM.
 
1 members found this post helpful.
Old 03-23-2011, 10:12 AM   #33
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,185

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Quote:
Originally Posted by repo View Post
try
Code:
find / -name ""peindom*.php" -delete
Kind regards
Which will work. But I suggest removing the -delete parameter and running the command first. To make sure you are getting *exactly* what you want. Then put the -delete back when you know you have selected the right files.
 
1 members found this post helpful.
Old 03-23-2011, 11:19 AM   #34
Robbeh
LQ Newbie
 
Registered: Mar 2011
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks guys, I got this:

find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `peindom*.php\n\nfind / -name peindom*.php'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `peindom*.php\n\nfind / -name peindom*.php''.
 
Old 03-23-2011, 11:28 AM   #35
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Quote:
Originally Posted by Robbeh View Post
Thanks guys, I got this:

find: warning: Unix filenames usually don't contain slashes (though pathnames do). That means that '-name `peindom*.php\n\nfind / -name peindom*.php'' will probably evaluate to false all the time on this system. You might find the '-wholename' test more useful, or perhaps '-samefile'. Alternatively, if you are using GNU grep, you could use 'find ... -print0 | grep -FzZ `peindom*.php\n\nfind / -name peindom*.php''.
Can you tell us the exact command what you ran?
 
Old 03-23-2011, 11:31 AM   #36
Robbeh
LQ Newbie
 
Registered: Mar 2011
Posts: 16

Original Poster
Rep: Reputation: 0
Sure can:

find / -name ""peindom*.php"

As suggested I left off the delete!
 
Old 03-23-2011, 11:39 AM   #37
corp769
LQ Guru
 
Registered: Apr 2005
Posts: 5,817

Rep: Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002Reputation: 1002
Did you look to see how many quotation marks you had in there? You need to delete one of them..................
 
Old 03-23-2011, 12:03 PM   #38
Robbeh
LQ Newbie
 
Registered: Mar 2011
Posts: 16

Original Poster
Rep: Reputation: 0
Thanks, I removed the stray " but after pressing enter nothing happened:


rob-lists-macbook:~ Rob$ ssh root@5gbfree.com
root@5gbfree.com's password:
Linux hd-t3815cl 2.6.26-2-amd64 #1 SMP Thu Nov 25 04:30:55 UTC 2010 x86_64

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.
Last login: Wed Mar 23 12:55:38 2011 from 91.106.188.96
5gbfree:~# find / -name "peindom*.php"
 
Old 03-23-2011, 12:08 PM   #39
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,185

Rep: Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586Reputation: 1586
Quote:
Originally Posted by Robbeh View Post
5gbfree:~# find / -name "peindom*.php"
Mac eh?
Code:
find / -name "peindom\*.php" -print
to make sure this is working:
Code:
find / -name "hosts" -print
 
Old 03-24-2011, 07:37 AM   #40
Robbeh
LQ Newbie
 
Registered: Mar 2011
Posts: 16

Original Poster
Rep: Reputation: 0
Hey,

Thankyou for that - yep, it's a Mac I use but I didn't think that would matter. Sorry if it does!

find / -name "hosts" -print
Gave a result, but unfortunately:

find / -name "peindom\*.php" -print

brings back nothing I let it run for 20 mins incase it was just busy!

Cheers,
Rob
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need help creating a script to delete part of a filename Scorpuk Linux - Newbie 2 07-28-2008 10:19 AM
Trying to delete a filename with special characters Harry Seldon Linux - General 11 03-20-2007 01:31 PM
How to delete wierd filename from my server? DaveNET Linux - General 3 06-27-2006 01:39 PM
change uploaded files from filename.avi to filename.avi.html like www.rapidshare.de latheesan Linux - Newbie 3 06-16-2005 04:33 AM
Files delete from SAMBA server klmn1 Linux - General 2 04-17-2004 02:34 AM


All times are GMT -5. The time now is 01:16 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration