Forrest logo
tool overview
On this page you find all important commands for the CLI tool trash-put. If the command you are looking for is missing please ask our AI.

trash-put

Trash-put is a command line tool used to move files or directories to the Trash or Recycle Bin in a Linux or macOS system instead of permanently deleting them. It provides a safer alternative to the traditional 'rm' command by allowing users to recover deleted files if needed.

To use trash-put, users need to install the trash-cli package on their Linux system or the trash package on macOS. Once installed, they can simply run the 'trash-put' command followed by the name of the file or directory they want to move to the Trash.

Trash-put supports various options, such as '-f' to force deletion without confirmation, '-v' for verbose output, and '-l' to list the contents of the Trash. It also allows users to specify a custom Trash directory if desired.

When a file is moved to the Trash using trash-put, it retains its original file permissions, ownership, and other attributes. This ensures that the restored files maintain their integrity when recovered.

The tool creates a unique file name for each trashed file to avoid conflicts. It also keeps track of the original location of each file, making it easier to restore files to their original directory if needed.

Trash-put provides a simple and intuitive interface, making it suitable for both novice and advanced users. It offers a secure way to delete files, especially when dealing with important data or files that may have been accidentally deleted.

Users can easily restore files from the Trash using the 'trash-restore' command, and the tool also supports purging files from the Trash using 'trash-empty' or individually with 'trash-rm'.

Overall, trash-put enhances file management in the command line environment by providing a convenient way to move files to the Trash, reducing the risk of data loss or accidental file deletion.

List of commands for trash-put:

  • trash-cli:tldr:32074 trash-cli: Trash specific files and directories into the current trashcan.
    $ trash-put ${filename_or_directory1 filename_or_directory2 ---}
    try on your machine
    explain this command
tool overview