1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE plugin SYSTEM "jnode.dtd">
4 <plugin id="org.jnode.command.file"
5 name="JNode file commands"
7 provider-name="@PROVIDER@"
11 <import plugin="org.jnode.command.argument"/>
12 <import plugin="org.jnode.command.util"/>
13 <import plugin="org.jnode.driver"/>
14 <import plugin="org.jnode.fs"/>
15 <import plugin="org.jnode.fs.service"/>
16 <import plugin="org.jnode.shell.syntax"/>
17 <import plugin="org.jnode.util"/>
21 <library name="jnode-cli.jar">
22 <export name="org.jnode.command.file.*"/>
26 <extension point="org.jnode.shell.aliases">
27 <alias name="cat" class="org.jnode.command.file.CatCommand"/>
28 <alias name="cd" class="org.jnode.command.file.CdCommand" internal="yes"/>
29 <alias name="cmp" class="org.jnode.command.file.CmpCommand"/>
30 <alias name="cp" class="org.jnode.command.file.CpCommand"/>
31 <alias name="cut" class="org.jnode.command.file.CutCommand"/>
32 <alias name="del" class="org.jnode.command.file.DeleteCommand"/>
33 <alias name="df" class="org.jnode.command.file.DFCommand"/>
34 <alias name="dir" class="org.jnode.command.file.DirCommand"/>
35 <alias name="du" class="org.jnode.command.file.DuCommand"/>
36 <alias name="find" class="org.jnode.command.file.FindCommand"/>
37 <alias name="grep" class="org.jnode.command.file.GrepCommand"/>
38 <alias name="head" class="org.jnode.command.file.HeadCommand"/>
39 <alias name="hexdump" class="org.jnode.command.file.HexdumpCommand"/>
40 <alias name="ls" class="org.jnode.command.file.DirCommand"/>
41 <alias name="md5sum" class="org.jnode.command.file.Md5SumCommand"/>
42 <alias name="mkdir" class="org.jnode.command.file.MkdirCommand"/>
43 <alias name="paste" class="org.jnode.command.file.PasteCommand"/>
44 <alias name="pwd" class="org.jnode.command.file.PwdCommand"/>
45 <alias name="rm" class="org.jnode.command.file.DeleteCommand"/>
46 <alias name="sort" class="org.jnode.command.file.SortCommand"/>
47 <alias name="tail" class="org.jnode.command.file.TailCommand"/>
48 <alias name="tee" class="org.jnode.command.file.TeeCommand"/>
49 <alias name="touch" class="org.jnode.command.file.TouchCommand"/>
50 <alias name="wc" class="org.jnode.command.file.WcCommand"/>
53 <extension point="org.jnode.shell.syntaxes">
55 <empty description="copy standard input to standard output"/>
56 <sequence description="concatenate files to standard output">
58 <option argLabel="num-nonblank" shortName="b" longName="number-nonblank"/>
59 <option argLabel="num" shortName="n" longName="number"/>
60 <option argLabel="squeeze" shortName="s" longName="sqeeze-blank"/>
61 <option argLabel="show-ends" shortName="E" longName="show-ends"/>
64 <argument argLabel="file"/>
67 <sequence description="fetch and concatenate urls to standard output">
68 <option argLabel="urls" shortName="u" longName="urls"/>
70 <argument argLabel="url"/>
75 <empty description="change the current directory to the 'user.home' directory"/>
76 <argument argLabel="directory" description="change the current directory to 'directory'"/>
79 <sequence description="compare two files">
80 <argument argLabel="file1"/>
81 <argument argLabel="file2"/>
85 <sequence description="copy files or directories">
87 <option argLabel="force" shortName="f" longName="force"/>
88 <option argLabel="update" shortName="u" longName="update"/>
89 <option argLabel="interactive" shortName="i" longName="interactive"/>
90 <option argLabel="recursive" shortName="r" longName="recursive"/>
91 <option argLabel="verbose" shortName="v" longName="verbose"/>
94 <argument argLabel="source"/>
96 <argument argLabel="target"/>
100 <sequence description="select parts of lines">
102 <option argLabel="byte-range" shortName="b" longName="bytes" />
103 <option argLabel="char-range" shortName="c" longName="characters"/>
104 <option argLabel="field-range" shortName="f" longName="fields"/>
105 <option argLabel="in-delim" shortName="d" longName="delimiter"/>
106 <option argLabel="suppress" shortName="s" longName="only-delimited"/>
107 <option argLabel="complement" longName="complement"/>
108 <option argLabel="out-delim" longName="output-delimiter"/>
111 <argument argLabel="files"/>
116 <sequence description="delete files and directories">
118 <option argLabel="recursive" shortName="r" longName="recursive"/>
119 <option argLabel="force" shortName="f" longName="force" />
120 <option argLabel="interactive" shortName="i" longName="interactive" />
121 <option argLabel="verbose" shortName="v" longName="verbose" />
122 <option argLabel="onefs" longName="one-file-system"/>
124 <repeat minCount="1">
125 <argument argLabel="paths"/>
130 <sequence description="display disk usage for file systems">
132 <option argLabel="human-read-bin" shortName="h" longName="human-readable"/>
133 <option argLabel="human-read-dec" shortName="H" longName="si"/>
134 <option argLabel="show-all" shortName="a" longName="all"/>
135 <option argLabel="block-size" shortName="B" longName="block-size"/>
136 <option argLabel="block-size-1k" shortName="k"/>
138 <option argLabel="posix" shortName="P" longName="portability"/>
139 <option argLabel="inodes" shortName="i" longName="inodes"/>
140 <option argLabel="local" shortName="l" longName="local"/>
141 <option argLabel="sync" longName="sync"/>
142 <option argLabel="no-sync" longName="no-sync"/>
143 <option argLabel="fs-type" shortName="t" longName="type"/>
144 <option argLabel="print-type" shortName="T" longName="print-type"/>
145 <option argLabel="ex-type" shortName="x" longName="exclude-type"/>
150 <argument argLabel="path"/>
151 <argument argLabel="device"/>
157 <empty description="list the current directory"/>
158 <argument argLabel="path" description="list a file or directory"/>
161 <sequence description="Disk Usage - report the amount of disk space used by the specified directory and for each subdirectory.">
162 <repeat minCount="0">
163 <argument argLabel="directory" description="directory to start printing sizes recursively"/>
166 <option argLabel="all" shortName="a" longName="all"/>
167 <option argLabel="block-size-1" shortName="b" longName="bytes"/>
168 <option argLabel="total" shortName="c" longName="total"/>
169 <option argLabel="derefArgs" shortName="D" longName="dereference-args"/>
170 <option argLabel="human-readable-1024" shortName="h" longName="human-readable"/>
171 <option argLabel="human-readable-1000" shortName="H" longName="si"/>
172 <option argLabel="block-size-1024" shortName="k" longName="kilobytes"/>
173 <option argLabel="count-links" shortName="l" longName="count-links"/>
174 <option argLabel="dereference" shortName="L" longName="dereference"/>
175 <option argLabel="max-depth" shortName="" longName="max-depth"/> <!-- max-depth has no shortname -->
176 <option argLabel="block-size-1024x1024" shortName="m" longName="megabytes"/>
177 <option argLabel="summarize" shortName="s" longName="summarize"/>
178 <option argLabel="separate-dirs" shortName="S" longName="separate-dirs"/>
179 <option argLabel="one-file-system" shortName="x" longName="one-file-system"/> <!-- can't test this currently -->
180 <option argLabel="exclude" shortName="" longName="exclude"/> <!-- exclude has no shortname -->
181 <option argLabel="exclude-from" shortName="X" longName="exclude-from"/>
182 <option argLabel="block-size-custom" shortName="B" longName="block-size"/> <!-- not in man page, but works on unix like systems -->
183 <option argLabel="filesystem-block-size" shortName="" longName="fs-block-size"/> <!-- testing -->
187 <syntax alias="find">
188 <sequence description="find files or directories">
189 <repeat minCount="0">
190 <argument argLabel="directory"/>
193 <option argLabel="type" shortName="t" longName="type"/>
194 <option argLabel="maxdepth" shortName="D" longName="maxdepth"/>
195 <option argLabel="mindepth" shortName="d" longName="mindepth"/>
196 <option argLabel="name" shortName="n" longName="name"/>
197 <option argLabel="iname" shortName="N" longName="iname"/>
201 <syntax alias="grep">
202 <!-- grep [Options] <pattern> [<file>...] or
203 grep [Options] (-e <pattern> | -f <file>)... [<file>...] -->
204 <sequence description="Search for lines that match a string or regex">
206 <!-- Matcher type -->
207 <option argLabel="matcher-fixed" shortName="F" longName="fixed-strings"/>
208 <option argLabel="matcher-ext" shortName="E" longName="extended-regexp"/>
209 <option argLabel="matcher-basic" shortName="G" longName="basic-regexp"/>
210 <option argLabel="matcher-perl" shortName="P" longName="perl-regexp"/>
211 <!-- Matching options -->
212 <option argLabel="ignore-case" shortName="i" longName="ignore-case"/>
213 <option argLabel="invert" shortName="v" longName="invert-match"/>
214 <option argLabel="word-match" shortName="w" longName="word-regexp"/>
215 <option argLabel="line-match" shortName="x" longName="line-regexp"/>
216 <!-- Output options -->
217 <option argLabel="show-count" shortName="c" longName="count"/>
218 <option argLabel="show-files-nomatch" shortName="L" longName="files-without-match"/>
219 <option argLabel="show-files-match" shortName="l" longName="files-with-match"/>
220 <option argLabel="show-only-match" shortName="o" longName="only-matching"/>
221 <option argLabel="max-matches" shortName="m" longName="max-count"/>
222 <option argLabel="quiet" shortName="q" longName="quiet"/>
223 <option argLabel="quiet" longName="silent"/>
224 <option argLabel="suppress" shortName="s" longName="no-messages"/>
225 <!-- Output prefix control -->
226 <option argLabel="prefix-byte" shortName="b" longName="byte-offset"/>
227 <option argLabel="prefix-file" shortName="H" longName="with-filename"/>
228 <option argLabel="prefix-nofile" shortName="h" longName="no-filename"/>
229 <option argLabel="prefix-label" longName="label"/>
230 <option argLabel="prefix-line" shortName="n" longName="line-number"/>
231 <option argLabel="prefix-tab" shortName="T" longName="initial-tab"/>
232 <option argLabel="prefix-null" shortName="Z" longName="null"/>
233 <!-- Context lines -->
234 <option argLabel="show-context-after" shortName="A" longName="after-context"/>
235 <option argLabel="show-context-before" shortName="B" longName="before-context"/>
236 <option argLabel="show-context-both" shortName="C" longName="context"/>
237 <!-- File/Directory selection -->
238 <option argLabel="mode-binary" longName="binary-files"/>
239 <option argLabel="mode-binary-text" shortName="a" longName="text"/>
240 <option argLabel="mode-binary-skip" shortName="I"/>
241 <option argLabel="mode-device" shortName="D" longName="devices"/>
242 <option argLabel="mode-dir" shortName="d" longName="directories"/>
243 <option argLabel="mode-dir-recurse" shortName="r" longName="recursive"/>
244 <option argLabel="mode-dir-recurse" shortName="R"/>
245 <option argLabel="pattern-exclude" longName="exclude"/>
246 <option argLabel="pattern-exclude-file" longName="exclude-from"/>
247 <option argLabel="pattern-exclude-dir" longName="exclude-dir"/>
248 <option argLabel="pattern-include" longName="include"/>
249 <!-- Other options -->
250 <option argLabel="null-term" shortName="z" longName="null-data"/>
251 <option argLabel="debug" longName="debug"/>
254 <repeat minCount="1">
256 <option argLabel="patterns" shortName="e"/>
257 <option argLabel="pattern-files" shortName="f"/>
260 <argument argLabel="patterns"/>
263 <argument argLabel="files"/>
267 <syntax alias="head">
270 <option argLabel="quiet" shortName="q" longName="quiet"/>
271 <option argLabel="quiet" longName="silent"/>
272 <option argLabel="verbose" shortName="v" longName="verbose"/>
273 <option argLabel="bytes" shortName="c" longName="bytes"/>
274 <option argLabel="lines" shortName="n" longName="lines"/>
277 <argument argLabel="files" />
281 <syntax alias="hexdump">
282 <empty description="print a hex dump of standard input"/>
283 <argument argLabel="file" description="print a hex dump of a file"/>
284 <option argLabel="url" shortName="u" longName="url" description="print a hex dump of a URL"/>
287 <empty description="with -l, print sizes in human readable format (e.g., 1K 234M 2G)"/>
288 <option argLabel="humanReadable" shortName="h" longName="human-readable"/>
290 <argument argLabel="path" description="list files or directories"/>
293 <syntax alias="md5sum">
294 <empty description="Calculates the MD5 digest for standard input"/>
295 <option argLabel="checkfile" shortName="c" longName="check"/>
296 <sequence description="Calculates the MD5 digests for files">
297 <optional eager="true">
298 <option argLabel="recursive" shortName="r" longName="recursive"/>
300 <repeat minCount="1">
301 <argument argLabel="paths"/>
305 <syntax alias="mkdir">
306 <argument argLabel="directory" description="create a new directory"/>
308 <syntax alias="paste">
312 <option argLabel="serial" shortName="s" longName="serial"/>
313 <option argLabel="delims" shortName="d" longName="delimiters"/>
316 <argument argLabel="files"/>
321 <empty description="show the pathname for the current directory"/>
324 <sequence description="delete files and directories">
326 <option argLabel="recursive" shortName="r" longName="recursive"/>
327 <option argLabel="force" shortName="f" longName="force" />
328 <option argLabel="interactive" shortName="i" longName="interactive" />
329 <option argLabel="verbose" shortName="v" longName="verbose" />
331 <repeat minCount="1">
332 <argument argLabel="paths"/>
336 <syntax alias="sort">
339 <option argLabel="field" shortName="k"/>
340 <option argLabel="output" shortName="o"/>
341 <option argLabel="field-sep" shortName="t"/>
342 <option argLabel="check" shortName="c"/>
343 <option argLabel="merge" shortName="m"/>
344 <option argLabel="unique" shortName="u"/>
345 <option argLabel="reverse" shortName="r"/>
346 <option argLabel="cmp-print" shortName="i"/>
347 <option argLabel="cmp-alpha" shortName="d"/>
348 <option argLabel="cmp-icase" shortName="i"/>
349 <option argLabel="no-blanks" shortName="b"/>
350 <option argLabel="numeric" shortName="n"/>
351 <!-- debugging options -->
352 <option argLabel="sort" longName="sort"/>
355 <argument argLabel="files"/>
359 <syntax alias="tail">
361 <optionSet label="globals">
362 <option argLabel="follow" shortName="f" longName="follow"/>
363 <option argLabel="followr" shortName="F"/>
364 <option argLabel="retry" longName="retry"/>
365 <option argLabel="unchanged" longName="max-unchanged-stats"/>
366 <!--<option argLabel="pid" longName="pid"/> disabled -->
367 <option argLabel="sleep" shortName="s" longName="sleep-interval"/>
368 <option argLabel="quiet" shortName="q" longName="quiet"/>
369 <option argLabel="verbose" shortName="v" longName="verbose"/>
370 <option argLabel="bytes" shortName="c" longName="bytes"/>
371 <option argLabel="lines" shortName="n" longName="lines"/>
374 <argument argLabel="files"/>
380 <optionSet label="globals">
381 <option argLabel="append" shortName="a" longName="append"/>
384 <argument argLabel="files"/>
388 <syntax alias="touch">
389 <argument argLabel="file" description="touch the given file"/>
394 <option argLabel="bytes" shortName="c" longName="bytes"/>
395 <option argLabel="chars" shortName="m" longName="chars"/>
396 <option argLabel="lines" shortName="l" longName="lines"/>
397 <option argLabel="worlds" shortName="w" longName="words"/>
398 <option argLabel="maxCharLine" shortName="L" longName="max-line-length"/>
401 <argument argLabel="files"/>
407 <extension point="org.jnode.security.permissions">
408 <permission class="java.io.FilePermission" name="<<ALL FILES>>" actions="read,write,delete"/>
409 <permission class="java.lang.RuntimePermission" name="readFileDescriptor"/>
410 <permission class="java.lang.RuntimePermission" name="writeFileDescriptor"/>
411 <permission class="java.util.PropertyPermission" name="user.dir" actions="read,write"/>
412 <permission class="java.util.PropertyPermission" name="user.home" actions="read,write"/>
413 <permission class="java.lang.RuntimePermission" name="getenv.*" actions="read"/>
415 <permission class="java.lang.RuntimePermission" name="getenv.POSIXLY_CORRECT" actions="read"/>
416 <permission class="java.lang.RuntimePermission" name="getenv.DF_BLOCK_SIZE" actions="read"/>
417 <permission class="java.lang.RuntimePermission" name="genenv.DU_BLOCK_SIZE" actions="read"/>
418 <permission class="java.lang.RuntimePermission" name="getenv.LS_BLOCK_SIZE" actions="read"/>
419 <permission class="java.lang.RuntimePermission" name="getenv.BLOCK_SIZE" actions="read"/>
420 <permission class="java.lang.RuntimePermission" name="getenv.BLOCKSIZE" actions="read"/>