Remove all but exclude particular file or directoryBy neokrates, written on July 22, 2010 |
bash snippet |
- neokrates
- Email: uwarov@yahoo.com
- Website: http://www.thinkplexx.com
- Join date: 05-31-09
- Posts: 20
Rate it
Ad
Poll
What tools do you use for site design?
- Something else (75%, 6 Votes)
- Code directly to my site, no design tool (25%, 2 Votes)
- Photoshop (0%, 0 Votes)
- Artisteer (0%, 0 Votes)
- Gimp (0%, 0 Votes)
- Dream Weather (0%, 0 Votes)
- Free online tools and generators (0%, 0 Votes)
- Tools from my provider (0%, 0 Votes)
- CoffeeCup tools (0%, 0 Votes)
Total Voters: 8
Loading ...
Most popular search terms:
It is possible, for example by combining find, rm and grep.
Example
Recursively clean current directory but not file or dir named “maven” and not “.m2″.
rm -r `find . |grep -v "maven"|grep -v ".m2"`
|
TAGS
|
|
RELATED
|
Pages
Posts
|
|
SOCIAL
|


















