Solution: trash command
See this Answer on similar Question, How to move files to trash from command line?.
macOS 15 Sequoia offers a new command-line tool: trash
To empty the current folder, merely run:
trash *
All files, and all folders, are moved to the user’s Trash folder.
The man page says:
TRASH(8) System Manager's Manual TRASH(8) NAME trash – Moves files and directories to the user trash folder SYNOPSIS trash [-h] [--help] [-s] [-stopOnError] [-v] [--verbose] FILE [FILE...] DESCRIPTION The trash moves files and directories into the user trash folder. The options are as follows: -h | --help display usage information for the tool and exit -v | --verbose display more verbose status -s | --stopOnError exit with an error if any move to a trash folder fails EXAMPLES In a directory with a file named "Foo.txt" and a directory "Bar", trash Foo.txt Bar moves the file and directory into the user's trash folder, if it exists and permissions allow the items to be moved into the user's trash folder. HISTORY First appeared in macOS 14.0 macOS May 25, 2022
Reportedly that last line about being in macOS 14 Sonoma is incorrect. People say only 15 Sequoia and later has trash command.
ls -labefore and after running mv.*should match all files and folders, except the ones that begin with..echo *do you see those folders in the output?