remove(delete) all the files(folders) in one folder 无法删除.git 目录下的objects里面的文件

问题: ll -a 命令,显示出之前git clone下来的代码后,想删掉换个目录,发现源码删掉了,但是.git项目的文件  用   rm -r  .git 怎么也无法删除。

解决方法:  rm -f -r  (blog要删的文件)

remove(delete) all the files(folders) in one folder

     keywords:  linux, delete, remove, folder , file , force delete

When I want to delete all the files and folders in one foler, I get this:
$ rm -r blog
rm: remove write-protected regular file `blog/script/autospec'? yes
rm: remove write-protected regular file `blog/script/lighttpd'? yes
rm: remove write-protected regular file `blog/script/destroy'? yes
rm: remove write-protected regular file `blog/script/migrate'? yes
rm: remove write-protected regular file `blog/script/spec'? yes
rm: remove write-protected directory `blog/script/process'? yes
rm: remove write-protected regular file `blog/script/benchmarker'? yes
rm: remove write-protected regular file `blog/script/dbconsole'? yes
rm: remove write-protected regular file `blog/script/logreport'? yes
rm: remove write-protected regular file `blog/script/runner'? yes
....
...
...(much more)

However , there is much easy way to do this(forcefully):

$ rm -f -r  blog

source from:  http://gcxieblog.blog.163.com

你可能感兴趣的:(linux,Ubuntu)