man find | less -p '-delete' find . -mindepth 1 -maxdepth 1 -type f -name '*.txt' -ls find . -mindepth 1 -maxdepth 1 -type f -name '*.txt' -delete
Never been to CodeSnippets before?
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world (or not, you can keep them private!)
Delete specified files in the current directory (See related posts)
You need to create an account or log in to post comments to this site.
Related Posts
» Create & delete user account... in shell osx mac bash unix delete create user account dscl
» Progress indicator snippet f... in find shell osx mac bash unix indicator progress
» Store file information in SQ... in find shell osx mac bash sql unix database file array sqlite3 sqlite write insert transaction
» List & delete Safari cookies in shell osx mac bash cookie unix safari delete list plistbuddy plist
» List & delete Safari history in shell osx mac bash unix safari delete list plistbuddy plist history
» ffind - fuzzyfind from the c... in find shell osx mac bash unix file directory
Snippets (source code soon to be available) developed by Peter Cooper and powered by Ruby On Rails