to delete empty directory!!

Go down

to delete empty directory!!

Post by Abhiramy on Tue Mar 02, 2010 5:59 pm

what is the command to delete an empty directory???wen i searched in the net,got the ans as the following code

find . -type d -empty | xargs rmdir -

but dis dint work for me!!!can anyone check dis out and explain if it worked???

Abhiramy

Posts : 9
Points : 21
Join date : 2010-02-26

View user profile

Back to top Go down

Re: to delete empty directory!!

Post by mightyganesh on Tue Mar 02, 2010 6:04 pm

i just tried rmdir command and it worked! i did not understand why that command did not workout for u?
rmdir <dir name>
avatar
mightyganesh

Posts : 53
Points : 92
Join date : 2010-02-26
Age : 29

View user profile http://ganeshguna.blogspot.com

Back to top Go down

Re: to delete empty directory!!

Post by Abhiramy on Tue Mar 02, 2010 6:30 pm

now i tried,,it worked!!!!hav any idea wat dat alternative code mean,,i mean its expln???

Abhiramy

Posts : 9
Points : 21
Join date : 2010-02-26

View user profile

Back to top Go down

Re: to delete empty directory!!

Post by rohit_1000r on Tue Mar 09, 2010 10:39 am

Abhiramy
the alternative command which has been specified by you does the task of searching all the empty directory in the current context and then removes it using rmdir xargs.as in
Code:
find . -type d -empty | xargs rmdir -

rohit_1000r

Posts : 4
Points : 4
Join date : 2010-03-09

View user profile

Back to top Go down

Re: to delete empty directory!!

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum