Trash (computing)

From HandWiki
Short description: Temporary storage for deleted files
Example of an empty trash can or recycling bin icon, here designed by the Tango Desktop Project.
Example of a trash can or recycling bin "containing files" icon, here designed by the Tango Desktop Project.

In computing, the trash, also known by other names such as dustbin, wastebasket, and others, is a graphical user interface desktop metaphor for temporary storage for files set aside by the user for deletion, but not yet permanently erased. The concept and name is part of Mac operating systems, a similar implementation is called the Recycle Bin in Microsoft Windows, and other operating systems use other names.

In the file manager, the trash can be viewed by the user as a special file directory, allowing the user to browse the files and retain those still wanted before deleting the others permanently (either one by one, or via an "empty trash" command). It may still be possible using third party software to undelete those that were deleted by mistake. In Microsoft Windows and macOS, the Trash folder links to hidden folders on each mounted drive where the files are actually stored.

Within a trash folder, a record may be kept of each file and/or directory's original location, depending on the implementation. On certain operating systems, files must be moved out of the trash before they can be accessed again.

Whether or not files deleted by a program go to the recycle bin depends on its level of integration with a particular desktop environment and its function. Low-level utilities usually bypass this layer entirely and delete files immediately. A program that includes file manager functionality may or may not send files to the recycle bin, or it may allow the user to choose between these options.

History

Bill Atkinson began developing the Apple Lisa user interface in late 1978. In March 1982 he reached the stage of changing to an icon-based file manager, and produced a mock-up with a trash can icon (including buzzing flies) for deleting files.[1][2] The release version of Lisa was launched in 1983 with a "Wastebasket",[3] its icon "an alley-style garbage can [with] vertical lines to indicate a ribbed surface .... an open lid and a handle on the front of the can."[4][5] Apple advertised "If you can find the trash can, you can run a computer."[6]

Following this, the Magic Desk I ROM cartridge for Commodore 64 presented a primitive representation of office furniture, with a wastebasket or trash bin under the desk. This lacked functionality and was not taken further.[7]

In 1983 Susan Kare designed the core visual design language of Classic Mac OS System 1, launched in January 1984. This incorporated some elements of the Lisa interface, including a refined version of the icon, now labelled Trash,[8] with "a closed lid with a handle on top."[4] An ad supplement in Newsweek introduced the Mac interface, with its "pictures of objects you'll have no trouble recognizing ... Even a trash can."[9] A subsequent update to Lisa renamed its Wastebasket icon "Trash".[10] In "International English" localizations of Classic Mac OS, Trash was named "Wastebasket".[11]

In 1985, Amiga Workbench 1.0 was released. This took much inspiration from Mac OS, including trash bins. When formatting a floppy disk/hard drive partition, the user could select to add a bin to it. This would then appear as an icon titled "Trashcan" along with the other files. Users could drag unwanted files onto it and empty the bin later.[12]

In early versions of the Macintosh Finder, Trash contents were in volatile memory, and were lost when the computer restarted. From 1987, if anything was in Trash its icon bulged as a reminder to check the contents before shutting down. Following the 1991 introduction of System 7, the Trash folder retains its contents until the user chooses to empty the trash.[13][5]

The outcome of the lawsuit Apple Computer, Inc. v. Microsoft Corp. (filed in 1988, decision affirmed on appeal in 1994) was that graphical user interfaces similar to Apple's did not infringe rights, but some features including Apple's Trash icon were original and protected by copyright. Non-Apple software could use other metaphors for file deletion, such as Recycle Bin, Smart Eraser, or Shredder.[4][14]

In 1993 or 1994, Microsoft implemented its first temporary deletion system in MS-DOS 6, under the name Delete Sentry: When a file was deleted, it was moved to a hidden SENTRY folder at the root of the drive.[15][16]

Microsoft introduced its current trash system in 1995, the Recycle Bin, with Windows 95, as an area to store and review files and folders prior to deletion.[17] At default settings, the Recycle Bin auto-deletion permanently deletes files to free up disk space when it gets low, or deletes files in the Bin over 30 days.[13][18] In this version, the original location record of the file is stored, but the folder itself did not allow subdirectories. When a folder is deleted, its containing files are moved into the bin and mixed with other deleted files. The directory structure can only be restored if the batch of files is "undeleted". The current (revised) Recycle Bin allows for subdirectory trees to exist within folders that have been moved there. The icon shows a bin with a recycling symbol on its front.

With the new interface of Mac OS X introduced in 2001, the Trash icon moved from the desktop to a permanent place at the end of the Dock. The International English "Wastebasket" had been dropped at the end of 2009, making the name "Trash" standard.[19] In keeping with the system appearance, the Trash was a shiny wire basket, until with OS X Yosemite in 2014 it became a translucent white container.[20] With macOS Mojave, the Trash was renamed "Bin" in the Australian English localisation, and with macOS Catalina, "Bin" also appeared in the UK localisation.[21]

Implementations

Trash functionality is usually integrated into a desktop environment and its file manager. Examples include:

Some implementations may contain "shredding" functionality to counter data remanence.

Linux desktop environments

The KDE, GNOME[22] and Xfce implementations comply with the freedesktop.org Trash specification,[23] ensuring that any applications written with this specification in mind will be interoperable with any trash can implementation.

Although the various Linux desktop environments such as GNOME, KDE, and Xfce provide a trash mechanism, there is traditionally no simple way to trash something from the command line interface. Some third-party applications, such as trash-cli, provide commands on the command-line to use the trash, compatible with the FreeDesktop.org Trash Specification.

macOS

Using macOS, a file or folder is deleted in Finder by dragging its icon onto the Trash icon at the right hand end of the Dock, moving the item into the Trash folder, where it can be viewed but not used until it is moved out again. To restore highlighted items from the Trash to their original position, a contextual menu brings up a Put Back option. The keyboard shortcut to move highlighted items to Trash, or Put Back items, is . To finally delete files, clicking on "Empty" brings up a warning that this cannot be undone, and an option to delete.[24]

Putting items in the Trash folder moves them to a hidden temporary folder: for the boot disk, a user account has this at /Users/username/.Trash/; each mounted volume such as an external drive has a hidden folder in the root folder named /.Trashes/.[25] When viewing the device's available space the space occupied by the deleted files is shown as occupied. The Trash folder shows deleted files from external drives, including removable media.[26] This does not apply to networked drives, where trying to move an item to Trash brings up a warning that it will be deleted immediately and this cannot be undone.[27]

Since OS X El Capitan, the Trash can be bypassed by pressing when a file is selected.[28] Since macOS Sierra, the user can enable an option to have the Trash automatically empty after 30 days.[29]

In UK and Australian English localisations, the Trash is known as "Bin".[21]

Apps and iOS

In several macOS apps and in the iOS mobile operating system, the Trash is within apps rather than in the system as a central feature. The standard icon for the Trash is a small version of the original Classic Mac OS trash can. Files are moved to a "Recently Deleted" folder within the app where they remain available for recovery for a stated number of days, then are automatically permanently deleted. Apps where this applies include Photos and Mail.[30][31] Files may still be recoverable if a computer backup was run before they were moved to "Recently Deleted".

Microsoft Windows

The Recycle Bin in Windows 11.

Microsoft's Recycle Bin is implemented as a special folder with columns like Date deleted and Original location. Typically only files deleted via File Explorer (but not necessarily other Windows graphical interfaces such as file selection dialogs) will be put into the Recycle Bin; files deleted via the Command Prompt are permanently deleted, as (by default) are files deleted via operating system APIs and applications other than Windows Explorer.[32] Some operating system APIs do, however, allow applications to recycle files rather than delete them.[33] In previous Windows operating systems and in MS-DOS, undeletion was the only way to recover accidentally or intentionally deleted files.

As standard, the Recycle Bin only stores files deleted from hard drives, not from removable media, such as memory cards, thumb drives, or floppy disks, nor does it store files deleted from network drives.[34] There are methods to make it work on network paths, however.[35]

The Recycle Bin has a setting to configure the amount of deleted files it can store. Free disk space allocated for this is not actually used until files are deleted from folders and stored in the Recycle Bin. In versions of Windows prior to Windows Vista, the default configuration of the Recycle Bin is a global setting for all drives to hold 10% of the total capacity of each host hard drive volume to store deleted files. For example, on a volume with a capacity of 20 gigabytes, the Recycle Bin will hold up to 2 gigabytes of deleted files. This can be changed anywhere from 0 to 100% of the drive space, but will not be allowed to exceed 3.99GB of space, even if the user-indicated % of the drive space is larger than 3.99GB. If the Recycle Bin fills up to maximum capacity, the oldest files will be deleted in order to accommodate the newly deleted files.[17] If a file is too large for the Recycle Bin, the user will be prompted to immediately and permanently delete the file instead.

The actual location of the Recycle Bin depends on the type of operating system and file system. On older FAT file systems (typically Windows 98 and prior), it is located in Drive:\RECYCLED. In the NTFS filesystem (Windows 2000, XP, NT) it is Drive:\RECYCLER. On Windows Vista and above it is Drive:\$Recycle.Bin folder.[36]

The Recycle Bin can be accessed as an shortcut from the desktop, by searching "Recycle Bin" in Windows Explorer, or by typing "shell:RecycleBinFolder" in the Run dialog box (). It is the only icon shown by default on the Windows XP desktop. When accessed from the desktop, the Recycle Bin options and information are different from those of the physical Recycle Bin folders seen on each partition in Windows Explorer. From Windows XP onwards, with NTFS, different users cannot see the contents of each other's Recycle Bins.

Prior to Windows Vista, a file in the Recycle Bin is stored in its physical location and renamed as D<original drive letter of file><#>.<original extension>.[17] A hidden file called info2 (info in Windows 95 without the Windows Desktop Update) stores the file's original path and original name in binary format.[17] Since Windows Vista, the "meta" information of each file is saved as $I<number>.<original extension> and the original file is renamed to $R<number>.<original extension>.

When the user views the Recycle Bin, the files are displayed with their original names. When the file is "Restored" from the Recycle Bin, it is returned to its original directory and name.[17]

In Windows Explorer, files are moved to the Recycle Bin in a number of ways:

  • By right-clicking on a file and selecting delete from the menu
  • Selecting the file and pressing the delete key
  • Selecting delete from the Task pane in Windows XP
  • Selecting the file and choosing delete from the File menu (in Windows XP Explorer)
  • By dragging and dropping a file into the Recycle Bin icon
  • From the Send To menu
  • From a context menu command or some other function in a software application (usually configurable)

It is possible to bypass the Recycle Bin and directly delete a file by holding the SHIFT key while performing an action that would normally send a file to the trash.[37]

Other uses

The 1984 original Mac and several of its successors (up to the 1987 Macintosh SE) lacked a (then prohibitively expensive) hard drive. Instead, the system ran from a floppy disk which could be ejected (), graying out its icon ('ghosting') and leaving its contents in memory, ready to transfer to another disk. In Classic Mac OS, dragging the disk icon to Trash (shortcut ) directly ejected a disk (or CD) without leaving a grayed icon.[13]

Mac OS X removed the transfer option; dragging a disk or storage volume onto Trash converted the icon to the universal Eject symbol before unmounting and ejecting the disk or volume. This does not place the disk/volume in the Trash folder, nor does it erase the disk/volume.

The GNOME Human Interface Guidelines cite using a waste basket to eject a removable disk as an example of a metaphor taken beyond its reasonable use.[38]

See also

References

  1. Hertzfeld, Andy (1999-02-22). "Macintosh Stories: Busy Being Born". Folklore.org. http://www.folklore.org/StoryView.py?project=Macintosh&story=Busy_Being_Born.txt. Retrieved 2011-08-26. 
  2. Hertzfeld, Andy. "Folklore.org: Rosing's Rascals". https://www.folklore.org/StoryView.py?project=Macintosh&story=Rosings_Rascals.txt. 
  3. "Tech Time Warp of the Week: The Apple Lisa, 1983". Wired. 25 October 2013. https://www.wired.com/2013/10/tech-time-warp-apple-lisa/. Retrieved 21 July 2021.  Apple Invents the Personal Computer. Again., 1983
  4. 4.0 4.1 4.2 "Apple Computer, Inc. v. Microsoft Corp., 821 F. Supp. 616 (N.D. Cal. 1993)". 25 June 2021. https://law.justia.com/cases/federal/district-courts/FSupp/821/616/1510619/. 
  5. 5.0 5.1 Giaimo, Cara (19 April 2016). "Why Only Apple Users Can Trash Their Files". https://slate.com/human-interest/2016/04/the-history-of-the-apple-trash-icon-in-graphic-design-and-lawsuits.html. 
  6. "Lisa Trash Can - the Finder files". http://cargocollective.com/finder/Lisa-Trash-Can. 
  7. "Magic Desk I for Commodore 64". http://toastytech.com/guis/magdesk.html. 
  8. "Interview with Susan Kare". 11 March 2010. http://library.stanford.edu/mac/primary/interviews/kare/index.html. 
    "Susan Kare on Working on the Macintosh". 21 July 2010. http://library.stanford.edu/mac/primary/interviews/kare/mac.html. 
  9. "the Finder files" (in la). http://cargocollective.com/finder/Introducing-Macintosh. 
  10. "Lisa Office System 3.1 Release Date, Specs, Features, Etc.- madeApple". 15 July 2019. https://madeapple.com/lisa-office-system-3-1/. 
    Lineback, Nathan (13 August 2002). "Lisa Office System 3". http://toastytech.com/guis/lisaos3.html. 
  11. "GUIdebook > Extras > Trivia". Folklore.org. 2006. http://www.guidebookgallery.org/extras/trivia%7cmacos. Retrieved 2012-04-30. 
  12. [1]1.1.5 Info, 1.2.1 Empty Trash [2]Photographic Evidence
  13. 13.0 13.1 13.2 Panic, Major General (1 August 2006). "trash can". https://everything2.com/title/trash+can. 
  14. Lewis, Peter H. (27 August 1991). "PERSONAL COMPUTERS; Norton Desktop for Windows". The New York Times. https://query.nytimes.com/gst/fullpage.html?res=9D0CE3DD1239F934A1575BC0A967958260&sec=&spon=&pagewanted=all. 
  15. "Delete Sentry Automatically Purges Files When Necessary". Microsoft Support. Microsoft Corporation. http://support.microsoft.com/kb/96826. Retrieved 3 June 2010. "When Microsoft Undelete is using the Delete Sentry level of protection, files that are deleted are stored in a hidden SENTRY directory in the root of the drive." 
  16. "Now You Delete It, Now You Don't". PC Operating Instructions, Vol.5 Issue 6. Smart Computing. June 1994. http://www.smartcomputing.com/editorial/article.asp?article=articles/1994/june94/pcn0603/pcn0603.asp. Retrieved 3 June 2010. "Delete Sentry. This is the most reliable file-recovery method. This method sets up a hidden directory named SENTRY. UNDELETE saves the contents of all deleted files in this directory. Because these files are kept in the hidden directory, it doesn't matter whether the originals have been written over or not. UNDELETE simply restores the files you want from the SENTRY directory." 
  17. 17.0 17.1 17.2 17.3 17.4 "How the Recycle Bin Stores Files". Microsoft. 2007-01-19. http://support.microsoft.com/kb/136517/EN-US/. Retrieved 2008-09-08. 
  18. "How to Enable & Disable Recycle Bin Auto-Deletion on Windows 10?". 14 July 2020. https://www.minitool.com/news/enable-disable-recycle-bin-auto-deletion-win10.html. 
  19. Smith, Tony (5 November 1999). "Apple drops British English MacOS". https://www.theregister.com/1999/11/05/apple_drops_british_english_macos/. 
  20. Snell, Jason (16 October 2014). "OS X Yosemite review: A new design built just for Retina Macs". https://www.macworld.com/article/223585/hands-on-with-os-x-yosemite-design-changes.html. 
  21. 21.0 21.1 "Apple ditches Trash can name in the UK with Catalina update in favor of a boring one". 9 October 2019. https://www.imore.com/apple-ditches-trash-can-name-uk-macos-catalina-update. 
  22. "Bug 41850 – Trash should follow fdo trash spec (adds restoring facilities)". Bugzilla.gnome.org. http://bugzilla.gnome.org/show_bug.cgi?id=41850. Retrieved 2011-08-26. 
  23. "Trash specification". Freedesktop.org. http://standards.freedesktop.org/trash-spec/trashspec-latest.html. Retrieved 2012-04-03. 
  24. Tanous, Jim (October 2, 2011). "macOS: Using "Put Back" with Your Trashed Files". https://www.macobserver.com/tips/quick-tip/macos-using-put-back-with-your-trashed-files/. 
  25. Kessler, Topher (21 September 2009). "Trash problems in OS X? Reset it!". https://www.cnet.com/tech/computing/trash-problems-in-os-x-reset-it/. 
  26. Pot, Justin (July 14, 2017). "How to Empty the macOS Trash on Your External Drives". https://www.howtogeek.com/316912/how-to-empty-the-macos-trash-on-your-external-drives/. 
  27. Tanous, Jim (October 2, 2011). "Please Note: Mac OS X Has No Network Trash Can". https://www.macobserver.com/tmo/answers/how_os_x_handles_file_deletion_on_network_drives_and_how_to_recover_them. 
  28. Klein, Matt (March 21, 2016). "How to Skip the Trash and Instantly Delete Files in OS X". https://www.howtogeek.com/245143/how-to-skip-the-trash-and-instantly-delete-files-in-os-x/. 
  29. "Here's Why You May Never Need to Empty Trash in macOS Sierra". TekRevue. https://www.tekrevue.com/tip/macos-sierra-empty-trash/. 
  30. "How to Empty Trash on iPhone (Step-by-Step Guides 2021)". 12 April 2021. https://www.anysoftwaretools.com/empty-iphone-trash/. 
  31. "System Icons - Icons and Images - iOS - Human Interface Guidelines". https://developer.apple.com/design/human-interface-guidelines/ios/icons-and-images/system-icons/. 
  32. "Files Deleted at MS-DOS Prompt Do Not Go to Recycle Bin". Support.microsoft.com. 2007-01-19. http://support.microsoft.com/kb/120681. Retrieved 2011-09-09. 
  33. "c# - How do you place a file in recycle bin instead of delete?". Stack Overflow. https://stackoverflow.com/questions/17612/how-do-you-place-a-file-in-recycle-bin-instead-of-delete. Retrieved 2011-08-26. 
  34. "Recycle Bin overview: Windows XP Professional Product Documentation". Microsoft.com. http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/recycle_bin.mspx?mfr=true. Retrieved 2011-09-09. 
  35. "Enable Recycle Bin on mapped network drives". https://social.technet.microsoft.com/forums/windows/en-US/a349801f-398f-4139-8e8b-b0a92f599e2b/enable-recycle-bin-on-mapped-network-drives. 
  36. "Why does the Recycle Bin have different file system names on FAT and NTFS?". The Old New Thing. MSDN Blogs. http://blogs.msdn.com/oldnewthing/archive/2006/01/31/520225.aspx. Retrieved 2011-08-26. 
  37. "HOW TO: Bypass the Recycle Bin When You Delete Files and Folders in Windows XP". Support.microsoft.com. 2004-03-26. http://support.microsoft.com/kb/320031. Retrieved 2011-09-09. 
  38. "Create a Match Between Your Application and the Real World". Library.gnome.org. https://developer.gnome.org/hig-book/unstable/principles-match.html.en. Retrieved 2015-10-10. 

External links

de:Papierkorb#Informationstechnik sv:Papperskorg#I datorsammanhang