Forrest logo
back to the trash-put tool

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

The command "trash-put ${filename_or_directory1 filename_or_directory2 ---}" is used to move the specified file(s) or directory(s) to the trash bin.

Here's how it works:

  1. "trash-put": This is the command itself, which is typically associated with a trash/Recycle Bin utility on Linux systems. It allows you to move files to the trash instead of permanently deleting them.

  2. "${filename_or_directory1 filename_or_directory2 ---}": This part represents the file(s) or directory(s) that you want to move to the trash bin. You can specify one or multiple filenames or directories separated by spaces (or ---) within the curly brackets.

Examples:

  • trash-put file.txt: This would move the file named "file.txt" to the trash bin.
  • trash-put folder1 folder2: This would move both "folder1" and "folder2" to the trash bin.
  • trash-put file1.txt file2.txt folder1: This would move "file1.txt," "file2.txt," and "folder1" to the trash bin.

By utilizing the "trash-put" command, you can avoid permanently deleting files or directories and have the option to restore them if needed.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the trash-put tool