I noticed whenever I want to delete a folder containing a lot of data using a command line (sudo rm -r folder_name), the Terminal hangs on for the operation to terminate. But at the same time, when I manually delete a folder of similar size, the deletion is performed instantly without waiting.
Any explanation as to why this difference happens