0

I have a Western Digital external hard drive with one partition and a NTFS filesystem. In Lubuntu, under its top directory:

$ sudo du -d 0 -h * | sort -h
0   temp
7.5K    $RECYCLE.BIN
25K System Volume Information
690M    dir1
1.5G    dir2
3.2G    dir3
15G     dir4
71G     dir5
98G     dir6
522G    dir7

roughly the drive has 0.7+1.5+3.2+15+71+98+522 = 711.4 G in use.

But

$ sudo df -h
Filesystem           Size  Used Avail Use% Mounted on
/dev/sdb1            932G  880G   53G  95% /media/t/My Passport

and gparted shows the hard drive has 931.48GiB in Size, 879.47GiB Used, and 52.01GiB Unused.

So why do the three ways give different results? Why does the first way give very different result from the the other two in particular?

Thanks.


I just found a hidden directory .Trash-1000 under the top directory.

$ du -h -d 0 .Trash-1000 
166G    .Trash-1000

$ ls .Trash-1000/
expunged  files  info

What is the purpose of .Trash-1000?

How shall I clean it up? Can I simply rm -r .Trash-1000?

  • So you already see it's different... – 炸鱼薯条德里克 Feb 26 at 6:09
  • That's NTFS, so that's probably the "Recycle Bin" from Windows... Not sure whether it's safe to remove it or that might affect how the FS behaves on Windows... (Maybe Superuser SE might be more useful to answer that.) – filbranden Feb 26 at 6:16
3

.Trash-1000 is the GVFS wastebin for the user with id 1000 (presumably t) on the removable drive (the wastebin for non-removable drives is ~/.local/share/trash). It contains files which were “deleted” using a GVFS-based file manager.

You can delete it using rm -rf without adverse consequences other than permanently deleting its contents. You can also empty it by asking GVFS to empty the wastebin:

gvfs-trash --empty

or

gio trash --empty

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.