one command to delete all files with name "filename" in current dir and all its sub-dirs
2014-06-17 21:20
645 查看
find path_name -namefile_name | xargs rm -rf
such as, remove all the .git folders in current directory and all its sub-directories:
find ./ -name .git | xargs rm -rf
remove all *.o files in current directory and all its sub-directories:
find ./ -name *.o | xargs rm -rf
such as, remove all the .git folders in current directory and all its sub-directories:
find ./ -name .git | xargs rm -rf
remove all *.o files in current directory and all its sub-directories:
find ./ -name *.o | xargs rm -rf
相关文章推荐
- How to delete subfolders and files in a folder
- "Loading a plug-in failed The plug-in or one of its prerequisite plug-ins may be missing or damaged and may need to be reinstalled"
- Visual Studio 2010 发布Web项目提示The target "PipelinePreDeployCopyAllFilesToOneFolder" does not exist in the project.解决方法
- VS2010 转换website项目后 发布报错 - The target "PipelinePreDeployCopyAllFilesToOneFolder" does not exist in the project.
- Linux delete define files in correct dir and sub-dir
- The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- The project was not built due to "Could not delete ...".Fix the problem, then try refreshing this project and building it since it may be inconsistent.
- Sharepoint Error : The URL "filename" is invalid. It may refer to a nonexistent file or folder, or refer to a valid file or folder that is not in the current Web
- How can I remove all "name" files in all of my subdirectories on Linux
- A file with the correct name was found in this directory, but it is not the correct one.
- How to search All-In-OneCode Framework with google or Bing
- Error message when you try to modify or to delete an alternate access mapping in Windows SharePoint Services 3.0: "An update conflict has occurred, and you must re-try this action"
- how to get url and hostname and url text in one page
- Difference between Truncate and Delete command in SQL - Interview Questions with Example
- "Error: ANDROID_HOME is not set and "android" command not in your PATH. You must fulfill at least one of these conditions.".
- 【FAQ Fix】 JPA Double insert with @OneToMany and CASCADE.ALL
- 【转】How to append current date and timestamp to filename in shell script
- It is better to waste one's youth than to do nothing with it at all.
- How To Create Multiple Folders And Sub-Folders In One Go
- it has a DefiningQuery and no InsertFunction element exists in the ModificationFunctionMapping element to support the current op