Resolution: trash
command
See this Reply on related Query, Learn how to transfer recordsdata to trash from command line?.
macOS 15 Sequoia provides a brand new command-line instrument: trash
To empty the present folder, merely run:
trash *
All recordsdata, and all folders, are moved to the consumer’s Trash folder.
The man
web page says:
TRASH(8) System Supervisor's Guide TRASH(8)
NAME
trash – Strikes recordsdata and directories to the consumer trash folder
SYNOPSIS
trash [-h] [--help] [-s] [-stopOnError] [-v] [--verbose] FILE [FILE...]
DESCRIPTION
The trash strikes recordsdata and directories into the consumer trash folder. The choices are as follows:
-h | --help
show utilization data for the instrument and exit
-v | --verbose
show extra verbose standing
-s | --stopOnError
exit with an error if any transfer to a trash folder fails
EXAMPLES
In a listing with a file named "Foo.txt" and a listing "Bar",
trash Foo.txt Bar
strikes the file and listing into the consumer's trash folder, if it exists and permissions enable the gadgets to be moved into the consumer's trash folder.
HISTORY
First appeared in macOS 14.0
macOS
Could 25, 2022
Reportedly that final line about being in macOS 14 Sonoma is inaccurate. Individuals say solely 15 Sequoia and later has trash
command.