Unix Tools

From SkyWiki

(Difference between revisions)
Jump to: navigation, search
m
Current revision (20:46, 18 September 2008) (view source)
m
 
(3 intermediate revisions not shown.)
Line 1: Line 1:
syntax of some Unix command line tools
syntax of some Unix command line tools
-
[[category:remember]]
 
===find===
===find===
<code>
<code>
-
find <path> -name <pattern> -exec CMD {} \;
+
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>
Line 16: Line 15:
<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 \;

Personal tools