2013-07-30 69 views
1
rm -rf ~/.jenkins/jobs/getfromgit/workspace/gitcheckoutdir 

刪除一切在一個目錄中刪除,除了一些家居

~/.jenkins/jobs/getfromgit/workspace/gitcheckoutdir 

如何目錄下刪除了一切:

~/.jenkins/jobs/getfromgit/workspace/ 

除了一切的目錄:

~/.jenkins/jobs/getfromgit/workspace/gitcheckoutdir 

回答

2

最好的方法是fi首先移動gitcheckoutdir(1),刪除工作空間(2)的內容,然後移回gitcheckoutdir(3);它會給:

(1)

$ mv ~/.jenkins/jobs/getfromgit/workspace/gitcheckoutdir ~/.jenkins/ 

(2)

$ rm -rf ~/.jenkins/jobs/getfromgit/workspace/* 

(3)

$ mv ~/.jenkins/gitcheckoutdir ~/.jenkins/jobs/getfromgit/workspace/