Find the answer to your Linux question:
Results 1 to 6 of 6
Hello all, First qeustion is how to delete folders that have pre-existing files and folders inside. I have changed the permissions to the folder using "chmod 777" and tried deleting ...
  1. #1
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3

    Several noobish qeustions

    Hello all,

    First qeustion is how to delete folders that have pre-existing files and folders inside. I have changed the permissions to the folder using "chmod 777" and tried deleting inside root with no luck. Here is the permissions of what the folder looks like from the Terminal:

    drwxrwxrwx 10 root root

    My question is how do I delete this folder? "rmdir" gave me this error when I tried to delete it:

    the folder is not empty

    And second, how do I uninstall a program from the terminal? What should I do when "rpm -e" gives me an error saying the program isn't installed when I know it is installed?

  2. #2
    Linux Newbie athlon_crazy's Avatar
    Join Date
    Sep 2007
    Location
    Malaysia
    Posts
    132
    ~$:rm -rf or
    ~$:rm -df

    uninstall it manually.

  3. #3
    Linux Engineer Kieren's Avatar
    Join Date
    Aug 2007
    Location
    England
    Posts
    845
    The following will remove a directory and all it's contents.

    Code:
    rm -r <DIR>
    To uninstall a program you first need to know it's name. Get a list of all installed RPMs with:

    Code:
    rpm -qa
    You can grep this to get a smaller list. For example if you are looking for a Firefox RPM:

    Code:
    rpm -qa | grep "firefox"
    Linux User #453176

  4. #4
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3
    I tried deleting the file and it still was there. I don't know if it makes a difference, but the folder that I am trying to delete was compiled from a *.bin file. Is there another command that I could use that will totally delete it?

  5. #5
    Linux Guru gogalthorp's Avatar
    Join Date
    Oct 2006
    Location
    West (by God) Virginia
    Posts
    3,105
    Your user ID must be the owner of the file/directory or have read/write permissions.

    Try removing while you are root.

  6. #6
    Just Joined!
    Join Date
    Jan 2008
    Posts
    3
    Thanks a lot for the help guys, I figured it out!!!

Posting Permissions

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