A
A
Alexander Fedoruk2016-04-01 12:41:54
linux
Alexander Fedoruk, 2016-04-01 12:41:54

How to delete empty folders in a specific order in bash?

Delete the raz/dwa/trzy folders starting with trzy and stop if the folder is not empty.
raz, dwa i trzy - folder names (written in Polish)

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vladimir Kuts, 2016-04-01
@AlexSaFF

rmdir trzy && rmdir raz && rmdir dwa
PS Of course, if we are talking about nested folders, the same can be done with nested ones:
rmdir raz/dva/trzy/ && rmdir raz/dva/ && rmdir raz/

V
Victor Taran, 2016-04-01
@shambler81

the find has everything you need
and the depth of min and max
, and by the way, the output is only empty!

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question