Sys Admin Tips
Share tips I like from different web pages and my own experiments
Tuesday, June 4, 2013
exclude files in rm
rm `ls | grep -v 'txt$'`
-or-
rm `find . -type f | grep -v 'txt$'`
For file types
rm -rf `ls | grep -v '.gz$'`
No comments:
Post a Comment
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment