Why deleting a folder from command line takes longer time than manual deletion?
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
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 delete manually a folder of similar size, the deletion is performed instantly without waiting.
Any explanation as to why this difference happens?
command-line delete
add a comment |Â
up vote
1
down vote
favorite
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 delete manually a folder of similar size, the deletion is performed instantly without waiting.
Any explanation as to why this difference happens?
command-line delete
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
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 delete manually a folder of similar size, the deletion is performed instantly without waiting.
Any explanation as to why this difference happens?
command-line delete
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 delete manually a folder of similar size, the deletion is performed instantly without waiting.
Any explanation as to why this difference happens?
command-line delete
command-line delete
edited 4 hours ago
Yufenyuy Veyeh Dider
1,1691823
1,1691823
asked 4 hours ago
Billal Begueradj
4284827
4284827
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
4
down vote
When you delete from the GUI you are only moving the files to the trash bin. This updates the pointers to the files instantaneously saying that they now reside in the trash bin which is another folder.
When you delete from the command line like that it is removing the files 1 by 1 until they are all gone from within the folder then removing the folder itself. This bypasses the trash bin. This also takes longer.
If you do a Shift+Del in the GUI this will bypass the trash bin and take longer to delete.
Hope this helps!
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
4
down vote
When you delete from the GUI you are only moving the files to the trash bin. This updates the pointers to the files instantaneously saying that they now reside in the trash bin which is another folder.
When you delete from the command line like that it is removing the files 1 by 1 until they are all gone from within the folder then removing the folder itself. This bypasses the trash bin. This also takes longer.
If you do a Shift+Del in the GUI this will bypass the trash bin and take longer to delete.
Hope this helps!
add a comment |Â
up vote
4
down vote
When you delete from the GUI you are only moving the files to the trash bin. This updates the pointers to the files instantaneously saying that they now reside in the trash bin which is another folder.
When you delete from the command line like that it is removing the files 1 by 1 until they are all gone from within the folder then removing the folder itself. This bypasses the trash bin. This also takes longer.
If you do a Shift+Del in the GUI this will bypass the trash bin and take longer to delete.
Hope this helps!
add a comment |Â
up vote
4
down vote
up vote
4
down vote
When you delete from the GUI you are only moving the files to the trash bin. This updates the pointers to the files instantaneously saying that they now reside in the trash bin which is another folder.
When you delete from the command line like that it is removing the files 1 by 1 until they are all gone from within the folder then removing the folder itself. This bypasses the trash bin. This also takes longer.
If you do a Shift+Del in the GUI this will bypass the trash bin and take longer to delete.
Hope this helps!
When you delete from the GUI you are only moving the files to the trash bin. This updates the pointers to the files instantaneously saying that they now reside in the trash bin which is another folder.
When you delete from the command line like that it is removing the files 1 by 1 until they are all gone from within the folder then removing the folder itself. This bypasses the trash bin. This also takes longer.
If you do a Shift+Del in the GUI this will bypass the trash bin and take longer to delete.
Hope this helps!
edited 3 hours ago
answered 4 hours ago
Terrance
17.9k23986
17.9k23986
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1086442%2fwhy-deleting-a-folder-from-command-line-takes-longer-time-than-manual-deletion%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password