TRASHINFO File – What is .trashinfo file and how to open it?
TRASHINFO File Extension
Linux Trash Metadata File – file format by N/A
The TRASHINFO file extension is used by the Linux operating system to store metadata about files that have been moved to the Trash. This information includes the original file name, path, and size, as well as the time and date the file was moved to the Trash.
Definition and Purpose of a TRASHINFO File
A TRASHINFO file is a metadata file used by file managers in Linux operating systems. It stores information about files and directories that have been moved to the Trash folder. This file enables the file manager to keep track of the original location of deleted files, allowing users to restore them if desired.
Content and Structure of a TRASHINFO File
The TRASHINFO file is a plain text file that follows a specific format. It contains one or more lines of text, each line representing a deleted file or directory. Each line consists of three fields separated by colons:
- File Path: The original path of the deleted file or directory
- Deletion Timestamp: The time when the item was moved to the Trash
- Flags: Additional information about the item, such as whether it was permanently deleted or if it is a symlink
TRASHINFO File Association
TRASHINFO files are specifically associated with the GNOME desktop environment in Linux operating systems. They contain metadata about files that have been moved to the Trash folder. This metadata includes information such as the original file path, file size, and deletion timestamp. TRASHINFO files are used by the GNOME file manager to provide information about the files in the Trash folder and to enable their recovery.
Opening and Viewing TRASHINFO Files
TRASHINFO files are not meant to be opened or viewed directly by users. They are primarily used by the GNOME file manager to manage the Trash folder. However, if you want to inspect the metadata contained in a TRASHINFO file, you can do so by using a text editor such as Gedit or Vim. Simply open the TRASHINFO file in the text editor, and you will see the metadata in a structured format. Note that TRASHINFO files are not human-readable, so you may need to use a tool like trash-cli to interpret the metadata.
Background and Usage
The TRASHINFO file serves as a metadata container for objects stored in the Linux trash directory. It is automatically generated when files or folders are moved to the trash. The TRASHINFO file keeps track of information such as the original file path, deletion timestamp, and file attributes. This data allows users to restore items from the trash and maintain the original file structure, preserving file permissions, timestamps, and other metadata.
Structure and Content
The TRASHINFO file is a plain text file that follows a specific format. It starts with a header line that includes the version of the TRASHINFO format and the number of entries in the file. Each entry represents a file or folder that has been moved to the trash. Entries include the original file path, the deletion timestamp, file size, file type, and a list of file attributes. The file attributes section contains information such as file permissions, owner, group, and any extended attributes associated with the file.