Unix Tools
From SkyWiki
(Difference between revisions)
(New page: syntax of some Unix command line tools category:remember ===find=== <code> find <path> -name <pattern> -exec CMD {} \; </code> Example: <code> find . -name *.tmp -exec rm {} \; </co...) |
Current revision (20:46, 18 September 2008) (view source) m |
||
(4 intermediate revisions not shown.) | |||
Line 1: | Line 1: | ||
syntax of some Unix command line tools | syntax of some Unix command line tools | ||
- | |||
===find=== | ===find=== | ||
<code> | <code> | ||
- | find | + | find ''PATH'' -name ''PATTERN'' -exec CMD {} \; |
</code> | </code> | ||
Line 10: | Line 9: | ||
<code> | <code> | ||
- | find . -name *.tmp -exec rm {} \; | + | find . -name \*.tmp -exec rm {} \; |
</code> | </code> | ||
- | |||
===xargs=== | ===xargs=== | ||
<code> | <code> | ||
- | find . -name *.core|xargs rm \; | + | find . -name *.core | xargs rm \; |
</code> | </code> | ||
+ | |||
+ | [[category:remember]] | ||
+ | [[category:Linux]] |
Current revision
syntax of some Unix command line tools
find
find PATH -name PATTERN -exec CMD {} \;
Example:
find . -name \*.tmp -exec rm {} \;
xargs
find . -name *.core | xargs rm \;