I had the same problem today and checked also the rmtrash program given above. Unfortunately all solutions seen so far move files to the home directory's .Trash.
The Finder on the other hand moves it to different -Trash folders, based on the mount point of the filesystem of the file.
So the easiest solution I can come up with (created on 10.5.8. To be tested on newer versions of OS X) is this:
osascript -e 'tell application "Finder" to delete POSIX file "'FULL FILENAME HERE'"'
Here is the shell script I created for it:
#!/bin/bash
declare -a files
for f in "$@" ; do
if [ -r "$f" ] ; then
case "$f" in
/*) ;;
*) f="$( pwd )/$f" ;;
esac
files=("${files[@]}" "$f")
else
echo "Can't find '$f'" >&2
fi
done
if [ ${#files[@]} -gt 0 ] ; then
osascript -e '
on run argv
repeat with f in argv
set x to (POSIX file f) as string
tell application "Finder" to delete x
end
end
' "${files[@]}" > /dev/null
fi