trash-cli
trash-cli copied to clipboard
Listing files in the trash can: gvfs-bin vs trash-cli
Hello. Something curious came up when I tried comparing gvfs-ls trash:// with trash-list.
Nautilus cannot display two files with the same name, so when we delete a file with the name of another file that already exists in trash, it adds a number to it. trash-cli, however, maintains the original name.
I find it useful to have the original name, but perhaps it could also display the name of the file as it is shown to the user when navigating using other tools? (maybe in brackets after the full path, like [base64_0_2])
I've deleted a binary, named base64_0 three times from the same directory. This is the result of looking for that file in trash (note I was the one that changed the path to get some privacy):
$ gvfs-ls trash:// | grep base64_0
base64_0_1
base64_0_2
base64_0
$ trash-list | grep base64_0
2017-07-14 18:53:01 /home/daniel/<some-path>/base64_0
2017-07-14 18:45:07 /home/daniel/<some-path>/base64_0
2017-07-14 18:57:03 /home/daniel/<some-path>/base64_0