In windows Virtual Machine environments, how can I quickly and effectively Delete large folders ?, Windows VM

Source: Internet
Author: User

In windows Virtual Machine environments, how can I quickly and effectively Delete large folders ?, Windows VM

During the stability test, some machines must be cleaned up because the C disk is getting smaller and smaller, and the % tmp % directory and recycle bin directory must be cleaned up.

How can I quickly and effectively Delete 0.15 million files in the % tmp % directory of my VM? Some of these files are rejected for deletion.

Method 1: Delete the Temp folder directly. It will scan the folder and tell you that the folder cannot be deleted. If you say something else is in use, I will not;

Method 2: Enter the Temp folder and press Ctrl + A to delete all the selected files. However, the address bar of the resource manager will remain in the loading process and cannot be deleted;

Method 3: delete one by one? No need;

Method 4: Build a security guard, a computer manager or something, and use a powder generator. This is too troublesome and may not be the foundation;

Method 5: Write a python script: shutil. rmtree (tmppath). However, some of the 0.15 million files cannot be deleted because they contain a variety of files;

Method 6: Use the command line to try rd/s/q tmppath ~~ As you can see, the files that are rejected to be deleted are also displayed in the dos window, but they can automatically jump over, so you can delete all the files that can be deleted.


Analysis: Why can we use rd?

Speculation: Q: Which of the following is closer to the underlying layer of the command line and windows api?

From the above results, the command line should be closer to the underlying layer. The operating system receives the input string, parses it, finds the corresponding command, and forwards the request command to the command to perform the specific operation.

Welcome to the public discussion on "sogou test". Thank you for your advice ~ ·~


Reprinted Please note: http://blog.csdn.net/sogouauto

Explore testing aoyi and exchange testing technologies. Welcome to "sogou test"


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.