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"