| Author |
How to delete a directory in unix box using ant
|
Devi Sri
Ranch Hand
Joined: Dec 20, 2005
Posts: 114
|
|
Hi Ranchers, Please help me. How to delete a directory from a unix box by using ant? Could you please suggest me ? Thanks in advance. [ August 13, 2008: Message edited by: Devisri Nanubala ]
|
Devisri, SCJP 5.0, SCWCD 5.0
"Dream is Not what you see in sleep. Dream is that which never lets you sleep" - Abdul Kalam
|
 |
Jaikiran Pai
Marshal
Joined: Jul 20, 2005
Posts: 8145
|
|
|
Ant has the Delete task which can be used for doing this.
|
[My Blog] [JavaRanch Journal]
|
 |
Devi Sri
Ranch Hand
Joined: Dec 20, 2005
Posts: 114
|
|
Hi Jaikiran, But that delete task is not working for my process. As my unix box is on remote machine connected through ssh. And I need to delete a directory in that remote unix box, through my local machine ant build.
|
 |
Jan Cumps
Bartender
Joined: Dec 20, 2006
Posts: 2343
|
|
Originally posted by Devisri Nanubala: ... As my unix box is on remote machine connected through ssh. And I need to delete a directory in that remote unix box, through my local machine ant build.
You can execute commands on the remote box using the ant SSHEXEC optional task. The unix command to unconditionaly remove a directory, even if it is not empty, is (take care, danger!) rm -fr dirname [ August 13, 2008: Message edited by: Jan Cumps ]
|
OCUP UML fundamental
ITIL foundation
|
 |
Devi Sri
Ranch Hand
Joined: Dec 20, 2005
Posts: 114
|
|
Hi Jan, Thankyou. It's working.
|
 |
 |
|
|
subject: How to delete a directory in unix box using ant
|
|
|