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.

Won't Delete

Discussion in 'General Discussion' started by john1123, Oct 26, 2008.

  1. john1123

    john1123 Registered

    Joined:
    Oct 8, 2008
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I have two files that just won't delete! I need them deleted because I have a new file, but it won't override it!

    Thanks,
    Ruben
     
  2. rhenderson

    rhenderson Well-Known Member

    Joined:
    Apr 21, 2005
    Messages:
    785
    Likes Received:
    0
    Trophy Points:
    16
    Location:
    Oklahoma
    cPanel Access Level:
    Root Administrator
    Not much info to go on here, you using linux? Do you have shell access? Does the file have an unusual name, spaces or characters?

    It might have bad permissions, you can change them to something like 0640 and try to delete them, i.e. chmod 0644 filename.ext or the wrong owner chown user:user filename or if they have some funky names you can delete them by the inode number, see my example:

    Code:
    
    # ls -il
    total 8
    118265373  root root 4096 Oct 26 17:37 ./
     88671744  root root 4096 Oct 26 17:37 ../
    118265376 root root    0 Oct 26 17:37 deletemeplease
    
    # find . -inum 118265376 -exec rm -i {} \;
    rm: remove regular empty file `./deletemeplease'? y
    
    # ls -il
    
    total 8
    118265373  root root 4096 Oct 26 17:38 ./
     88671744  root root 4096 Oct 26 17:37 ../
    #
    
    
    In the above example using shell I ran ls -il to get the inode numbers on the far left, the file I wanted to delete was deletemeplease which inode number was 118265376 then removed it with the above command.

    i.e.

    find . -inum [inode number here] -exec rm -i {} \;

    That is the best I can do without more info.
     
Loading...

Share This Page