The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Best way to delete seleted files

Discussion in 'General Discussion' started by pushkarawal, Jun 27, 2013.

  1. pushkarawal

    pushkarawal Registered

    Joined:
    May 5, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Hi,

    I want to remove some files from public_html but Cpanel taking too long to fetch. Is there better way to search and delete a particular file without fecthing whole directory.


    Thanks
     
  2. faisikhan

    faisikhan Well-Known Member

    Joined:
    Dec 12, 2011
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Islamabad, Pakistan
    cPanel Access Level:
    Root Administrator
    You can use FTP for that purpose but it'd be really easy if you have the access to the server, do you?
     
  3. pushkarawal

    pushkarawal Registered

    Joined:
    May 5, 2013
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Access to server ? Did you mean physically access - NO. I have access to whm and cpanel.
     
  4. HostingH

    HostingH Well-Known Member

    Joined:
    Jan 13, 2008
    Messages:
    73
    Likes Received:
    3
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Hi,

    If you have WHM root access then you can ssh to server as root and use following command to find a particular file and delete it.

    find . -type f -name "file name to find" -exec rm -f {} \;
     
  5. faisikhan

    faisikhan Well-Known Member

    Joined:
    Dec 12, 2011
    Messages:
    88
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    Islamabad, Pakistan
    cPanel Access Level:
    Root Administrator
    Well that is the best and the quickest command to delete the unwanted files immediately. I also use that one.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,852
    Likes Received:
    675
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    FTP and SSH are alternatives to File Manager if you need to remove a file from a directory.

    Thank you.
     
  7. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator
    Hello,

    Yes, I will suggest you to use SSH command to delete the selected files from your public_html directory

     
Loading...

Share This Page