Results 1 to 8 of 8

Thread: Remove read only files.

  1. #1
    Join Date
    Oct 2008
    Location
    Ensenada, Baja California
    Beans
    135

    Remove read only files.

    Hi, I have installed Vuze and I tried t remove it but it was not listed so I went to the directory and I removed some files but others are read only and I can't remove with rm how can I change the attribute or remove them.
    Thanks.

  2. #2
    Join Date
    Apr 2007
    Location
    Houston, Texas
    Beans
    95
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Remove read only files.

    If the file, for example, is named file.txt, you change remove the read-only permission (add write permission) by executing:

    chmod u+w file.txt (this gives the user write permission to the file)

  3. #3
    Join Date
    Oct 2008
    Location
    Ensenada, Baja California
    Beans
    135

    Re: Remove read only files.

    Quote Originally Posted by cheetaux View Post
    If the file, for example, is named file.txt, you change remove the read-only permission (add write permission) by executing:

    chmod u+w file.txt (this gives the user write permission to the file)
    Thanks I tried that and it said not permitted operation.

  4. #4
    Join Date
    Oct 2008
    Beans
    18

    Re: Remove read only files.

    To do things requiring more "permission" try adding the sudo command in front.

    so...
    sudo chmod u+w file.txt
    or really you need to simply delete:
    sudo rm file.txt

  5. #5
    Join Date
    Apr 2007
    Location
    Houston, Texas
    Beans
    95
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Remove read only files.

    It could be that root owns the file, rather than you. If so, you can use "sudo" (do as super-user) to delete the file:

    Code:
    sudo rm -f filename
    Sudo will ask you to enter your password.

  6. #6
    Join Date
    Oct 2008
    Location
    Ensenada, Baja California
    Beans
    135

    Re: Remove read only files.

    Yes the sudo in front WORKS! but how can I remove directories with one command with files and subdirectories inside.

  7. #7
    Join Date
    Oct 2008
    Beans
    18

    Re: Remove read only files.

    sudo rm -R name_of_dir
    The R stands for recursive.

  8. #8
    Join Date
    Sep 2008
    Beans
    148

    Re: Remove read only files.

    Quote Originally Posted by theamber View Post
    Yes the sudo in front WORKS! but how can I remove directories with one command with files and subdirectories inside.
    Code:
    sudo rm -rf directory

Bookmarks

Posting Permissions

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