Find the answer to your Linux question:
Results 1 to 8 of 8
I am trying to delete a folder, but unable to do so. tried my level best to delete. Here I am giving all the steps I have tried out - ...
  1. #1
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4

    Unable to delete folder

    I am trying to delete a folder, but unable to do so. tried my level best to delete.
    Here I am giving all the steps I have tried out -

    1. Output of ls -la


    ls: cannot access -loop0: Permission denied
    ls: cannot access -e0.7: Permission denied
    total 324
    d????????? ? ? ? ? ? -e0.7
    d????????? ? ? ? ? ? -loop0

    drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
    drwxrwxrwt 5607 root root 323584 Feb 8 17:48 ..


    2. Tried to change Permission with chmod -R 777, ( chmod -R 777 "-e0.7") but did not work.

    chmod -R 777 "-e0.7"
    chmod: invalid option -- 'e'
    Try `chmod --help' for more information.

    3. Tried to change Ownership with chown -

    chown -R root "-e0.7"
    chown: invalid option -- 'e'
    Try `chown --help' for more information.

    4. rm -rf "-e0.7"
    rm: invalid option -- 'e'
    Try `rm --help' for more information.

    5. rm -rf ../"-e0.7"
    This command does not show any error, but folder is not being deleted.

    6. Even I have tried to delete the folder with inode number, but failed to do so.


    As per my thinking, I need to change the permission of the folder first, but unable to change.

    Any help will be appreciated.
    Attached Images Attached Images

  2. #2
    Just Joined! rafatmb's Avatar
    Join Date
    Feb 2011
    Location
    Brazil
    Posts
    25
    Try to use:

    rm -rf "\-e0.7"

    The "-" character to be used as literal must be preceded by "\"

  3. #3
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4

    No success

    No success ----


    ldmserver2:/tmp/.abhishek.parwal-ltspfs # rm -rf "\-e0.7"
    ldmserver2:/tmp/.abhishek.parwal-ltspfs # ls -la
    ls: cannot access -loop0: Permission denied
    ls: cannot access -e0.7: Permission denied
    total 324
    d????????? ? ? ? ? ? -e0.7
    d????????? ? ? ? ? ? -loop0
    drwxrwxrwx 4 geeko root 4096 Feb 8 14:46 .
    drwxrwxrwt 5606 root root 323584 Feb 8 18:07 ..

  4. #4
    Just Joined! rafatmb's Avatar
    Join Date
    Feb 2011
    Location
    Brazil
    Posts
    25
    First: you're logged as root?

    If you don't, you must use sudo before the command, then type the root password.

    As you want to delete the entire folder, try to use

    sudo rm -rf /tmp/.abhishek.parwal-ltspfs

  5. #5
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4

    No success

    1. Logged in as ROOT.

    2. Output as per your suggestion -

    ldmserver2:/tmp # rm -rf .abhishek.parwal-ltspfs
    rm: cannot remove `.abhishek.parwal-ltspfs/-loop0': Permission denied
    rm: cannot remove `.abhishek.parwal-ltspfs/-e0.7': Permission denied

  6. #6
    Just Joined! rafatmb's Avatar
    Join Date
    Feb 2011
    Location
    Brazil
    Posts
    25
    On your first post, we can see that:

    d????????? ? ? ? ? ? -e0.7
    d????????? ? ? ? ? ? -loop0
    Means that the both undeletable are folders (begins with "d").

    Root can do everything, delete everything, even when it don't have perms to.

    This would be a filesystem problem. Try to run a fsck on it.

    Probably, you'll must to run "init 1" command (to turn to runlevel 1). Then remount the filesystem as read only. Then run fsck.

    There's a lot of docs explaining that.

    Other possibility is, when you turn to runlevel 1, try to delete the problem items.

  7. #7
    Just Joined!
    Join Date
    Feb 2011
    Posts
    4

    No success

    Tried with INIT 1 too.... still no success...

    anything more I can try ??

  8. #8
    Just Joined! rafatmb's Avatar
    Join Date
    Feb 2011
    Location
    Brazil
    Posts
    25
    Did you ran fsck successfully?

    were there errors displayed?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...