Last active
August 29, 2015 13:56
-
-
Save jdickey/9345979 to your computer and use it in GitHub Desktop.
Removing all files in a deep, thick tree of files and directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ find . | cpio -pmdu /tmp/foo | |
1738239 blocks | |
$ cd /tmp/foo | |
$ du -hsc . | |
916M . | |
916M total | |
$ find .[a-z]* * | wc -l | |
27791 | |
$ time find .[a-z]* * -delete | |
real 0m3.496s | |
user 0m0.035s | |
sys 0m0.603s | |
$ du -hsc . | |
0B . | |
0B total | |
$ find .[a-z]* * | wc -l | |
find: .[a-z]*: No such file or directory | |
find: *: No such file or directory | |
0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment