I need to remove specific types of sub directories from the sub directory in UNIX environment. I mean, in the main directory I have There are 1000 sub directories in every worksheet folder with the files that need to be done in the sub directory.
with find
? If your subdirectory is empty, then this will work:
find -name "a" -type d | Xargs rmdir
If you do not have subdirectories empty, this will work:
find -name "a" -type d | Xargs rm -Rf
I have created:
d reference: ~ / tmp / TT $ tree
former>d reference: ~ / tmp / tt $ get -name "a" -type d | Xargs rmdir
What remains:
d @ Reference: ~ / tmp / TT $ tree └── B1 directory, 0 files
Comments
Post a Comment