Empty directory not getting deleted in external harddisk

Bruce Pieterse octoquadza at gmail.com
Tue Oct 25 20:58:08 UTC 2011


On Tue 25 Oct 2011 22:31:02 SAST, Linux Tyro wrote:
> On Wed, Oct 26, 2011 at 1:53 AM, Bruce Pieterse <octoquadza at gmail.com 
> <mailto:octoquadza at gmail.com>> wrote:
>
>     / It is important to unmount the device before attempting any of
>     the operations below, except in the case of the windows option /
>     Unfortunately, this will not work in this case as the filesystem
>     type is NTFS (Windows) and not EXT2/3/4 (Linux). 
>
>
> My system is not EXT 2/3/4?? But I have linux installed? What does it 
> mean, please a little elaborate (or link me to the page of description 
> of basic meaning).
>
>     You can either run ntfsfix -n /dev/sdb1 to check and see if it
>     detects errors (if you want to attempt to try and fix the errors
>     simply drop the -n switch. *According to the man pages there are
>     known problems with ntfsfix, so please make a backup of your data
>     before hand*) or you can use the disk utility in ubuntu to check
>     for errors (I think it might use the same command above, but i'm
>     not sure) otherwise your best bet would be to plug it in a Windows
>     machine and do error-checking from the properties dialog of the drive.
>
>     Is there any particular reason why you using an NTFS partition
>     instead of an EXT3/4 partition? Perhaps you could split the drive
>     into two and make the partition FAT32 instead for compatibility
>     between the various operating systems. Just a suggestion :)
>
>
> I respect ur suggestion. However, I don't know why it is NTFS 
> partition and not EXT3/4. I am a windows migrant (still have Windows 
> but I don't use it). You are talking of my linux system which is NTFS? 
> Would it be better to go for EXT 3/4, if yes how? I just chose the 
> default options (during installation of Ubuntu LTS 10.04) and it 
> didn't ask me for any NTFS/ext 3/4 ....
>
> Thx.
>
> -- 
> Two atoms are walking along. Suddenly, one stops. The other says, "What's
> wrong?" "I've lost an electron." "Are you sure?" "I'm positive!"
>
> ===================================================
> Ubuntu LTS is good <http://sites.google.com/site/whyilikeubuntu/>!
> ===================================================
>
>
>

Well, based on the output of fdisk -l earlier I can see that you have a 
250GB HDD that has a windows installation and a Linux installation 
(dual-boot), however the 320GB partition has a Windows NTFS partition:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfedcfedc

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1       15258   122553318+   7  HPFS/NTFS <-- 
Windows Filesystem
/dev/sda2           15258       30402   121644033    5  Extended <-- 
Extended Partition Table
/dev/sda5           15258       29781   116658176   83  Linux <-- Linux 
swap partition under extended partition table
/dev/sda6           29781       30402     4984832   82  Linux swap / 
Solaris <-- root filesystem (/) for linux under extended partition table

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xa4b57300

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1       38913   312568641    7  HPFS/NTFS <-- 
Windows Filesystem

I was going to suggest that maybe you can copy the contents of the 
device over to your home directory if there is sufficient space, and 
reformat it as NTFS again and copy the data back to the drive.

If you never go into windows then it should be ok to reformat the drive 
to ext3/4. However what I recommended earlier might be beneficial if 
you do occasionally use windows and need to access files from your 
linux installation to work on. You can allocate a small percentage, 
perhaps 20-50GB's depending on your needs and you have to use a windows 
supported filesystem(FAT16/FAT32/NTFS) when creating partitions.

The best program to use is disk-utility or if you want a more advanced 
application you can try gparted (sudo apt-get install gparted from the 
terminal).

I just remembered that I also had this problem when I first started out 
with Linux. The best way is to definitely reformat to a linux supported 
filesystem to avoid data corruption and journalling errors.

-- 
Best of luck,

Bruce




More information about the ubuntu-users mailing list