1
rm -rf ~/.jenkins/jobs/getfromgit/workspace/gitcheckoutdir

删除目录下的所有内容

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

如何删除目录下的所有内容:

~/.jenkins/jobs/getfromgit/workspace/

除了目录的所有内容:

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

1 回答 1

2

最好的方法是先移动gitcheckoutdir(1),删除workspace的内容(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/
于 2013-07-30T09:53:15.723 回答