1

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?

2
  • So you already see it's different... Feb 26, 2019 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, 2019 at 6:16

1 Answer 1

6

.Trash-1000 is the FreeDesktop.org Trash specification-defined wastebin for the user with id 1000 (presumably t) on the removable drive (the wastebin for your “home” volume is ~/.local/share/Trash; other volumes get user-specific top-level trash directories). It contains files which were “deleted” using a Trash specification-compliant file manager (for example, any file manager using GVFS).

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
3
  • Does gio trash --empty delete files located in ~/.local/share/Trash/files? or should I cd into the folder first which contains .Trash-1000 folder?
    – alper
    Sep 27, 2022 at 12:19
  • Yes, it deletes files there. Sep 27, 2022 at 12:24
  • The trash directories are actually not GVFS-specific, but apply to any program implementing the FreeDesktop.org Trash specification. They differentiate between home and non-home partitions (rather than removable and non-removable ones). As for non-home partitions, the implementation may trash to a ”top directory“: If an $topdir/.Trash directory is absent, an $topdir/.Trash-$uid directory is to be used as the user's trash directory for this device/partition.
    – myrdd
    Jun 11, 2023 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .