Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 11
I am trying to delete a directory located on a windows hard drive. I booted into Knoppix via a CD and tried using the GUI but I receive the error ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5

    access windows hard drive force del of dir


    I am trying to delete a directory located on a windows hard drive. I booted into Knoppix via a CD and tried using the GUI but I receive the error unable to delete directory. I know that I can properly do this via the root account in a console window. Here is my problem, how do I access the Hard Disk (hda1) via the console window, which would enable me to see the files on the hard drive and how do I force a removal of that directory??

  2. #2
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    hi cedtech23 !

    Welcome to the LinuxForums.

    what is FileSystem of Windows Drive? Linux doesn't support NTFS write access out of box.







    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  3. #3
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    the FileSystem is NTFS; I am using Knoppix 5.0 and I am able to access the hard drive via the GUI. It appears on the Desktop as Hard Disk (hda1). Then when I double click on it Konqueror appears with the files on that hard disk.

    Ok I know realized that it was mounted and under /media/hda1. But when I go to use rmdir to delete the directory I get Read-only file system. How Can I force a removal on that directory?

    Second for future reference how can I mount a ntfs or fat hard drive?

  4. $spacer_open
    $spacer_close
  5. #4
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    the FileSystem is NTFS; I am using Knoppix 5.0 and I am able to access the hard drive via the GUI. It appears on the Desktop as Hard Disk (hda1). Then when I double click on it Konqueror appears with the files on that hard disk.
    as i mentioned earlier, Linux doesn't have NTFS write access out of box. you can only read NTFS files.

    Second for future reference how can I mount a ntfs or fat hard drive?
    create a folder and mount partitions through mount command.
    Code:
    mkdir /media/<folder>
    mount -t <filesystem> /dev/<partition>  /media/<folder>
    <filesystem> -- ntfs for NTFS, vfat for FAT32.

    you can use GParted LiveCD to delete/write in NTFS partitions. it has ntfs-3g package which enables NTFS write access.




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  6. #5
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    Thanks devils_casper with input of ntfs-3g package. I was able to figure out that Knoppix has ntfs-3g package installed.

    Thus if I right-click on the disk and select change to read/write mode I am able to delete files and folders on the NTFS Disk. But I am still unable to delete the Entire directory completely I get

    Could not remove folder /media/hda1/Documents and Settings/username/
    Start Menu/Programs/Accessories/Accessibility.

    I know that Linux has a was to force the deletion of a directory if even if it contains files. Any ideas?

  7. #6
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    Code:
    rm -R <folder_name>
    you can use -f option to force deletion.


    Which version of Knoppix are you using?




    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  8. #7
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    I am using Version 5.0

  9. #8
    Super Moderator devils casper's Avatar
    Join Date
    Jun 2006
    Location
    Chandigarh, India
    Posts
    24,729
    okk ! i didn't know that Knoppix 5.0 has ntfs-3g package. so, is your problem solved?







    Casper
    It is amazing what you can accomplish if you do not care who gets the credit.
    New Users: Read This First

  10. #9
    Just Joined!
    Join Date
    Feb 2007
    Posts
    5
    I tried rm -Rf demo

    But I get cannot remove directory Directory not empty

  11. #10
    Just Joined!
    Join Date
    Feb 2006
    Posts
    68
    If you cant get the command line method to work, try this. Once you have changed the permissions to writeable,(make sure you change all permissions to"can read and write", and check "is executable" ) double click on your hard drive icon to mount it, you can also right click it, and in the menu that pops up select mount. Be sure to do this and unmount any drives that are mounted before you shut down Knoppix. Ive read that you can damage files if you shutdown while a drive is mounted, although ive done it by accident before and it didnt damage anything. Once you mount the drive , left click and drag what you want to the knoppix desktop. In the menu that pops up, select"Move here". Then you can drag it to the trash and delete it from there. A word of caution, make sure you got the right file that you want to delete!!!! Windows wont let you delete some system files for a good reason, knoppix doesnt care. LOL You can recover it from the knoppix trash can, but once you shut down knoppix, its gone, when you reboot windows , it wont be there.

Page 1 of 2 1 2 LastLast

Posting Permissions

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