Skip to main content
added 511 characters in body
Source Link
Mingye Wang
  • 1.2k
  • 10
  • 23

According to trash-put manpage, trash-put puts the files on the trash, which is defined by the FreeDesktop.org Trash Specification.

In chapter Trash directories, Trashing follows such fallback process:

  1. Home trash, located in $XDG_DATA_HOME/Trash. In your case, it may be /root/Trash for root. It's also possible that sudo passed $XDG_DATA_HOME through, so also try looking for it under your own trash. It is the main trash used.
  2. For directories not sharing the same mount root as $XDG_DATA_HOME, a trash in the top directories of the mounted directories may be used.
  3. $topdir/.Trash/$UID may be tried first.
  4. If the test fails (e.g. $topdir/.Trash doesn't exist), use $topdir/.Trash-$UID. In your case, try looking for it in /.Trash-0, since sudo makes your UID root.

Update:

Binging 'root trash' gives me more.

From a really old tutorial which mentions gksudo nautilus '/root/.Trash/', the .Trash (instead of Trash as in fd.o) directory under root's $XDG_DATA_HOME may be a good option to start with.

According to a really old question in Chinese in which .Trash-root is created for the asker's removable disk, some implementations use username instead of the numeric UID.

According to trash-put manpage, trash-put puts the files on the trash, which is defined by the FreeDesktop.org Trash Specification.

In chapter Trash directories, Trashing follows such fallback process:

  1. Home trash, located in $XDG_DATA_HOME/Trash. In your case, it may be /root/Trash for root. It's also possible that sudo passed $XDG_DATA_HOME through, so also try looking for it under your own trash. It is the main trash used.
  2. For directories not sharing the same mount root as $XDG_DATA_HOME, a trash in the top directories of the mounted directories may be used.
  3. $topdir/.Trash/$UID may be tried first.
  4. If the test fails (e.g. $topdir/.Trash doesn't exist), use $topdir/.Trash-$UID. In your case, try looking for it in /.Trash-0, since sudo makes your UID root.

According to trash-put manpage, trash-put puts the files on the trash, which is defined by the FreeDesktop.org Trash Specification.

In chapter Trash directories, Trashing follows such fallback process:

  1. Home trash, located in $XDG_DATA_HOME/Trash. In your case, it may be /root/Trash for root. It's also possible that sudo passed $XDG_DATA_HOME through, so also try looking for it under your own trash. It is the main trash used.
  2. For directories not sharing the same mount root as $XDG_DATA_HOME, a trash in the top directories of the mounted directories may be used.
  3. $topdir/.Trash/$UID may be tried first.
  4. If the test fails (e.g. $topdir/.Trash doesn't exist), use $topdir/.Trash-$UID. In your case, try looking for it in /.Trash-0, since sudo makes your UID root.

Update:

Binging 'root trash' gives me more.

From a really old tutorial which mentions gksudo nautilus '/root/.Trash/', the .Trash (instead of Trash as in fd.o) directory under root's $XDG_DATA_HOME may be a good option to start with.

According to a really old question in Chinese in which .Trash-root is created for the asker's removable disk, some implementations use username instead of the numeric UID.

Source Link
Mingye Wang
  • 1.2k
  • 10
  • 23

According to trash-put manpage, trash-put puts the files on the trash, which is defined by the FreeDesktop.org Trash Specification.

In chapter Trash directories, Trashing follows such fallback process:

  1. Home trash, located in $XDG_DATA_HOME/Trash. In your case, it may be /root/Trash for root. It's also possible that sudo passed $XDG_DATA_HOME through, so also try looking for it under your own trash. It is the main trash used.
  2. For directories not sharing the same mount root as $XDG_DATA_HOME, a trash in the top directories of the mounted directories may be used.
  3. $topdir/.Trash/$UID may be tried first.
  4. If the test fails (e.g. $topdir/.Trash doesn't exist), use $topdir/.Trash-$UID. In your case, try looking for it in /.Trash-0, since sudo makes your UID root.