Why Music Players still play deleted songs through Linux? (Story of the Trash Can)
Yesterday, I thought I was fed up with the songs on my Bluetooth headset’s memory card so it was the time to change them. I keep my music library on my Windows Machine but yesterday I felt a bit lazy to switch-on my PC, so instead I decided to copy the songs from my pendrive using my already-on Linux computer. After performing the procedural steps; inserting the memory and waiting for it to be mounted and ready, I headed to the music directory on the SD Card and deleted everything and copied the new songs from the Flash Drive.
This morning, I have pulled out the SD Card and put in back in my Bluetooth Headset thinking: “Ah! I will have a brand new music catalog to listen to while travelling to work.” When I switched the device on however, I was astonished! The old songs was playing… Again! I stood in the middle of the road thinking about the situation, the reason why. Suddenly it came to me:
I remembered that Linux’s system is different from Windows hence, deleted files are managed differently. Deleted files in Windows are moved in the $Recycle.Bin directory found in the root drive in which the file originates. Let’s say I deleted a song from my Music library located on my computer’s primary hard drive. The deleted music file will be moved to “%systemdrive%\$Recycle.Bin\” where usually %systemdrive% stands for “C:\”. However, only files that are deleted from a hard disk are moved to $Recycle.Bin, files that are deleted from external storage devices except from external hard disk drives are deleted permanently. Below are examples of files being erased from Local Hardisk and from USB storage device:
In Linux however, deleted files are kept in a directory with the name starting with “.Trash”. Hidden files are defined by appending a dot (.) to the left of the file name. Press CTRL + H to unhide them.
So what happened really? Since the music files that I have supposedly deleted from my SD Card are still found in the .Trash folder, my Bluetooth Headset played them. That would not have happened if I had emptied the Trash Can before ejecting the memory card. So always empty your Trash before ejecting and plugin back your storage device (SD Card, Pendrive etc) into your car media player, headset, phone etc. Besides, it is only after emptying the Trash that you will get back the consumed space used.