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!

What is the shell command to list all xxx.* file recursively?

Discussion in 'General Discussion' started by SuperBaby, Feb 5, 2008.

  1. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    337
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    I want to list all files (in all subfolders) with xxx.* file name. How do I do that? I found a few files planted by hackers and want to make sure I have deleted all of them.

    I tried this but not working:

    ls -lR xxx.*
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    66
    You could use find if you are having no luck with -R.

    cd /home/username/public_html
    find filename.ext
     
  3. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    337
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    Yeah, but I have too many folders and subfolders. I need to have something more automated to search all subfolders automatically.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. troxalias

    troxalias Well-Known Member

    Joined:
    Nov 21, 2001
    Messages:
    96
    Likes Received:
    0
    Trophy Points:
    306
    Location:
    Athens - Greece
    Suppose that you want to find all files under /home with the extension .cgi you should execute

    Code:
    find /home -name \*\.cgi 
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. SuperBaby

    SuperBaby Well-Known Member

    Joined:
    Nov 27, 2003
    Messages:
    337
    Likes Received:
    0
    Trophy Points:
    166
    Location:
    Thailand
    cPanel Access Level:
    Website Owner
    Twitter:
    That is exactly what I want. A thousand thanks.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  6. darren.nolan

    darren.nolan Well-Known Member

    Joined:
    Oct 4, 2007
    Messages:
    259
    Likes Received:
    0
    Trophy Points:
    66
    find alone does that... :|
     
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