Why is "rm" so much slower than deleting files via the File Manager?

I witnessed that deleting directories (with the size of a couple of gigabytes) which contain many files is very slow when using rm. It takes up to several minutes!
When deleting the same folder via the File Manager, the job is done within a second. (It takes another second to empty the trash afterwards.)

What is the reason for this?


Solution 1:

The rm command actually removes the files, File Manager only moves the files to the trash. It is only when you empty the trash that you see the actual time that rm took to delete the files. So put simply, moving files is quicker than deleting. File Manager moves files while rm removes them.