Debian Codegraph @

templates/man5/magic.5.pot

raw
1 # SOME DESCRIPTIVE TITLE
2 # Copyright (C) YEAR Free Software Foundation, Inc.
3 # This file is distributed under the same license as the PACKAGE package.
4 # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5 #
6 #, fuzzy
7 msgid ""
8 msgstr ""
9 "Project-Id-Version: PACKAGE VERSION\n"
10 "POT-Creation-Date: 2026-06-05 06:30+0200\n"
11 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
13 "Language-Team: LANGUAGE <[email protected]>\n"
14 "Language: \n"
15 "MIME-Version: 1.0\n"
16 "Content-Type: text/plain; charset=UTF-8\n"
17 "Content-Transfer-Encoding: 8bit\n"
18
19 #. type: Dd
20 #: archlinux debian-unstable
21 #, no-wrap
22 msgid "November 24, 2025"
23 msgstr ""
24
25 #. type: Dt
26 #: archlinux debian-trixie debian-unstable
27 #, no-wrap
28 msgid "MAGIC 5"
29 msgstr ""
30
31 #. install as magic.4 on USG, magic.5 on V7, Berkeley and Linux systems.
32 #. type: Sh
33 #: archlinux debian-trixie debian-unstable
34 #, no-wrap
35 msgid "NAME"
36 msgstr ""
37
38 #. type: Plain text
39 #: archlinux debian-trixie debian-unstable
40 msgid "E<.Nm magic>"
41 msgstr ""
42
43 #. type: Nd
44 #: archlinux debian-trixie debian-unstable
45 #, no-wrap
46 msgid "file command's magic pattern file"
47 msgstr ""
48
49 #. type: Sh
50 #: archlinux debian-trixie debian-unstable
51 #, no-wrap
52 msgid "DESCRIPTION"
53 msgstr ""
54
55 #. type: Plain text
56 #: archlinux
57 msgid ""
58 "This manual page documents the format of magic files as used by the E<.Xr "
59 "file 1> command, version 5.47. The E<.Xr file 1> command identifies the "
60 "type of a file using, among other tests, a test for whether the file "
61 "contains certain E<.Dq \"magic patterns\">. The database of these E<.Dq "
62 "\"magic patterns\"> is usually located in a binary file in E<.Pa /usr/share/"
63 "file/misc/magic.mgc> or a directory of source text magic pattern fragment "
64 "files in E<.Pa /usr/share/file/misc/magic>. The database specifies what "
65 "patterns are to be tested for, what message or MIME type to print if a "
66 "particular pattern is found, and additional information to extract from the "
67 "file."
68 msgstr ""
69
70 #. type: Plain text
71 #: archlinux debian-trixie debian-unstable
72 msgid ""
73 "The format of the source fragment files that are used to build this database "
74 "is as follows: Each line of a fragment file specifies a test to be "
75 "performed. A test compares the data starting at a particular offset in the "
76 "file with a byte value, a string or a numeric value. If the test succeeds, "
77 "a message is printed. The line consists of the following fields:"
78 msgstr ""
79
80 #. type: It
81 #: archlinux debian-trixie debian-unstable
82 #, no-wrap
83 msgid "Dv offset"
84 msgstr ""
85
86 #. type: Plain text
87 #: archlinux debian-trixie debian-unstable
88 msgid ""
89 "A number specifying the offset (in bytes) into the file of the data which is "
90 "to be tested. This offset can be a negative number if it is:"
91 msgstr ""
92
93 #. type: Plain text
94 #: archlinux debian-trixie debian-unstable
95 msgid ""
96 "The first direct offset of the magic entry (at continuation level 0), in "
97 "which case it is interpreted an offset from end end of the file going "
98 "backwards. This works only when a file descriptor to the file is available "
99 "and it is a regular file."
100 msgstr ""
101
102 #. type: Plain text
103 #: archlinux debian-trixie debian-unstable
104 msgid ""
105 "A continuation offset relative to the end of the last up-level field E<.Dv "
106 "( \\*[Am]>)."
107 msgstr ""
108
109 #. type: Plain text
110 #: archlinux debian-trixie debian-unstable
111 msgid ""
112 "If the offset starts with the symbol E<.Dq +>, then all offsets are "
113 "interpreted as from the beginning of the file (the default)."
114 msgstr ""
115
116 #. type: It
117 #: archlinux debian-trixie debian-unstable
118 #, no-wrap
119 msgid "Dv type"
120 msgstr ""
121
122 #. type: Plain text
123 #: archlinux debian-trixie debian-unstable
124 msgid "The type of the data to be tested. The possible values are:"
125 msgstr ""
126
127 #. type: It
128 #: archlinux debian-trixie debian-unstable
129 #, no-wrap
130 msgid "Dv byte"
131 msgstr ""
132
133 #. type: Plain text
134 #: archlinux debian-trixie debian-unstable
135 msgid "A one-byte value."
136 msgstr ""
137
138 #. type: It
139 #: archlinux debian-trixie debian-unstable
140 #, no-wrap
141 msgid "Dv short"
142 msgstr ""
143
144 #. type: Plain text
145 #: archlinux debian-trixie debian-unstable
146 msgid "A two-byte value in this machine's native byte order."
147 msgstr ""
148
149 #. type: It
150 #: archlinux debian-trixie debian-unstable
151 #, no-wrap
152 msgid "Dv long"
153 msgstr ""
154
155 #. type: Plain text
156 #: archlinux debian-trixie debian-unstable
157 msgid "A four-byte value in this machine's native byte order."
158 msgstr ""
159
160 #. type: It
161 #: archlinux debian-trixie debian-unstable
162 #, no-wrap
163 msgid "Dv quad"
164 msgstr ""
165
166 #. type: Plain text
167 #: archlinux debian-trixie debian-unstable
168 msgid "An eight-byte value in this machine's native byte order."
169 msgstr ""
170
171 #. type: It
172 #: archlinux debian-trixie debian-unstable
173 #, no-wrap
174 msgid "Dv float"
175 msgstr ""
176
177 #. type: Plain text
178 #: archlinux debian-trixie debian-unstable
179 msgid ""
180 "A 32-bit single precision IEEE floating point number in this machine's "
181 "native byte order."
182 msgstr ""
183
184 #. type: It
185 #: archlinux debian-trixie debian-unstable
186 #, no-wrap
187 msgid "Dv double"
188 msgstr ""
189
190 #. type: Plain text
191 #: archlinux debian-trixie debian-unstable
192 msgid ""
193 "A 64-bit double precision IEEE floating point number in this machine's "
194 "native byte order."
195 msgstr ""
196
197 #. type: It
198 #: archlinux debian-trixie debian-unstable
199 #, no-wrap
200 msgid "Dv string"
201 msgstr ""
202
203 #. type: Plain text
204 #: archlinux debian-unstable
205 msgid ""
206 "A string of bytes. The string type specification can be optionally followed "
207 "by a /E<lt>widthE<gt> option and optionally followed by a set of flags "
208 "[bCcftTtWw]*. Slash characters can be used to separate options for "
209 "readability. The width limits the number of characters to be copied. Zero "
210 "means all characters. The following flags are supported:"
211 msgstr ""
212
213 #. type: It
214 #: archlinux debian-trixie debian-unstable
215 #, no-wrap
216 msgid "b"
217 msgstr ""
218
219 #. type: Plain text
220 #: archlinux debian-trixie debian-unstable
221 msgid "Force binary file test."
222 msgstr ""
223
224 #. type: It
225 #: archlinux debian-trixie debian-unstable
226 #, no-wrap
227 msgid "C"
228 msgstr ""
229
230 #. type: Plain text
231 #: archlinux debian-unstable
232 msgid ""
233 "Use upper case insensitive matching: upper case characters in the magic "
234 "match both lower and upper case characters in the target, whereas lower case "
235 "characters in the magic only match upper case characters in the target. "
236 "(not valid for regex)"
237 msgstr ""
238
239 #. type: It
240 #: archlinux debian-trixie debian-unstable
241 #, no-wrap
242 msgid "c"
243 msgstr ""
244
245 #. type: Plain text
246 #: archlinux debian-unstable
247 msgid ""
248 "Use lower case insensitive matching: lower case characters in the magic "
249 "match both lower and upper case characters in the target, whereas upper case "
250 "characters in the magic only match upper case characters in the target. "
251 "(not valid for regex) To do a complete case insensitive match, specify both "
252 "E<.Dq c> and E<.Dq C>."
253 msgstr ""
254
255 #. type: It
256 #: archlinux debian-trixie debian-unstable
257 #, no-wrap
258 msgid "f"
259 msgstr ""
260
261 #. type: Plain text
262 #: archlinux debian-trixie debian-unstable
263 msgid ""
264 "Require that the matched string is a full word, not a partial word match."
265 msgstr ""
266
267 #. type: It
268 #: archlinux debian-unstable
269 #, no-wrap
270 msgid "s"
271 msgstr ""
272
273 #. type: Plain text
274 #: archlinux debian-unstable
275 msgid ""
276 "Don't include the match length in the offset computation. (only valid for "
277 "search and regex)"
278 msgstr ""
279
280 #. type: It
281 #: archlinux debian-trixie debian-unstable
282 #, no-wrap
283 msgid "T"
284 msgstr ""
285
286 #. type: Plain text
287 #: archlinux debian-unstable
288 msgid ""
289 "Trim the string, i.e. leading and trailing whitespace is deleted before the "
290 "string is printed."
291 msgstr ""
292
293 #. type: It
294 #: archlinux debian-trixie debian-unstable
295 #, no-wrap
296 msgid "t"
297 msgstr ""
298
299 #. type: Plain text
300 #: archlinux debian-trixie debian-unstable
301 msgid "Force text file test."
302 msgstr ""
303
304 #. type: It
305 #: archlinux debian-trixie debian-unstable
306 #, no-wrap
307 msgid "W"
308 msgstr ""
309
310 #. type: Plain text
311 #: archlinux debian-unstable
312 msgid ""
313 "Compact whitespace in the target, which must contain at least one whitespace "
314 "character. (not valid for regex) If the magic has E<.Dv n> consecutive "
315 "blanks, the target needs at least E<.Dv n> consecutive blanks to match."
316 msgstr ""
317
318 #. type: It
319 #: archlinux debian-trixie debian-unstable
320 #, no-wrap
321 msgid "w"
322 msgstr ""
323
324 #. type: Plain text
325 #: archlinux debian-unstable
326 msgid ""
327 "Treat every blank in the magic as an optional blank. (not valid for regex)"
328 msgstr ""
329
330 #. type: It
331 #: archlinux debian-trixie debian-unstable
332 #, no-wrap
333 msgid "Dv pstring"
334 msgstr ""
335
336 #. type: Plain text
337 #: archlinux debian-trixie debian-unstable
338 msgid ""
339 "A Pascal-style string where the first byte/short/int is interpreted as the "
340 "unsigned length. The length defaults to byte and can be specified as a "
341 "modifier. The following modifiers are supported:"
342 msgstr ""
343
344 #. type: It
345 #: archlinux debian-trixie debian-unstable
346 #, no-wrap
347 msgid "B"
348 msgstr ""
349
350 #. type: Plain text
351 #: archlinux debian-trixie debian-unstable
352 msgid "A byte length (default)."
353 msgstr ""
354
355 #. type: It
356 #: archlinux debian-trixie debian-unstable
357 #, no-wrap
358 msgid "H"
359 msgstr ""
360
361 #. type: Plain text
362 #: archlinux debian-trixie debian-unstable
363 msgid "A 2 byte big endian length."
364 msgstr ""
365
366 #. type: It
367 #: archlinux debian-trixie debian-unstable
368 #, no-wrap
369 msgid "h"
370 msgstr ""
371
372 #. type: Plain text
373 #: archlinux debian-trixie debian-unstable
374 msgid "A 2 byte little endian length."
375 msgstr ""
376
377 #. type: It
378 #: archlinux debian-trixie debian-unstable
379 #, no-wrap
380 msgid "L"
381 msgstr ""
382
383 #. type: Plain text
384 #: archlinux debian-trixie debian-unstable
385 msgid "A 4 byte big endian length."
386 msgstr ""
387
388 #. type: It
389 #: archlinux debian-trixie debian-unstable
390 #, no-wrap
391 msgid "l"
392 msgstr ""
393
394 #. type: Plain text
395 #: archlinux debian-trixie debian-unstable
396 msgid "A 4 byte little endian length."
397 msgstr ""
398
399 #. type: It
400 #: archlinux debian-trixie debian-unstable
401 #, no-wrap
402 msgid "J"
403 msgstr ""
404
405 #. type: Plain text
406 #: archlinux debian-trixie debian-unstable
407 msgid "The length includes itself in its count."
408 msgstr ""
409
410 #. type: Plain text
411 #: archlinux debian-trixie debian-unstable
412 msgid ""
413 "The string is not NUL terminated. E<.Dq J> is used rather than the more "
414 "valuable E<.Dq I> because this type of length is a feature of the JPEG "
415 "format."
416 msgstr ""
417
418 #. type: It
419 #: archlinux debian-trixie debian-unstable
420 #, no-wrap
421 msgid "Dv date"
422 msgstr ""
423
424 #. type: Plain text
425 #: archlinux debian-trixie debian-unstable
426 msgid "A four-byte value interpreted as a UNIX date."
427 msgstr ""
428
429 #. type: It
430 #: archlinux debian-trixie debian-unstable
431 #, no-wrap
432 msgid "Dv qdate"
433 msgstr ""
434
435 #. type: Plain text
436 #: archlinux debian-trixie debian-unstable
437 msgid "An eight-byte value interpreted as a UNIX date."
438 msgstr ""
439
440 #. type: It
441 #: archlinux debian-trixie debian-unstable
442 #, no-wrap
443 msgid "Dv ldate"
444 msgstr ""
445
446 #. type: Plain text
447 #: archlinux debian-trixie debian-unstable
448 msgid ""
449 "A four-byte value interpreted as a UNIX-style date, but interpreted as local "
450 "time rather than UTC."
451 msgstr ""
452
453 #. type: It
454 #: archlinux debian-trixie debian-unstable
455 #, no-wrap
456 msgid "Dv qldate"
457 msgstr ""
458
459 #. type: Plain text
460 #: archlinux debian-trixie debian-unstable
461 msgid ""
462 "An eight-byte value interpreted as a UNIX-style date, but interpreted as "
463 "local time rather than UTC."
464 msgstr ""
465
466 #. type: It
467 #: archlinux debian-trixie debian-unstable
468 #, no-wrap
469 msgid "Dv qwdate"
470 msgstr ""
471
472 #. type: Plain text
473 #: archlinux debian-trixie debian-unstable
474 msgid "An eight-byte value interpreted as a Windows-style date."
475 msgstr ""
476
477 #. type: It
478 #: archlinux debian-trixie debian-unstable
479 #, no-wrap
480 msgid "Dv msdosdate"
481 msgstr ""
482
483 #. type: Plain text
484 #: archlinux debian-trixie debian-unstable
485 msgid "A two-byte value interpreted as FAT/DOS-style date."
486 msgstr ""
487
488 #. type: It
489 #: archlinux debian-trixie debian-unstable
490 #, no-wrap
491 msgid "Dv msdostime"
492 msgstr ""
493
494 #. type: Plain text
495 #: archlinux debian-trixie debian-unstable
496 msgid "A two-byte value interpreted as FAT/DOS-style time."
497 msgstr ""
498
499 #. type: It
500 #: archlinux debian-trixie debian-unstable
501 #, no-wrap
502 msgid "Dv beid3"
503 msgstr ""
504
505 #. type: Plain text
506 #: archlinux debian-trixie debian-unstable
507 msgid "A 32-bit ID3 length in big-endian byte order."
508 msgstr ""
509
510 #. type: It
511 #: archlinux debian-trixie debian-unstable
512 #, no-wrap
513 msgid "Dv beshort"
514 msgstr ""
515
516 #. type: Plain text
517 #: archlinux debian-trixie debian-unstable
518 msgid "A two-byte value in big-endian byte order."
519 msgstr ""
520
521 #. type: It
522 #: archlinux debian-trixie debian-unstable
523 #, no-wrap
524 msgid "Dv belong"
525 msgstr ""
526
527 #. type: Plain text
528 #: archlinux debian-trixie debian-unstable
529 msgid "A four-byte value in big-endian byte order."
530 msgstr ""
531
532 #. type: It
533 #: archlinux debian-trixie debian-unstable
534 #, no-wrap
535 msgid "Dv bequad"
536 msgstr ""
537
538 #. type: Plain text
539 #: archlinux debian-trixie debian-unstable
540 msgid "An eight-byte value in big-endian byte order."
541 msgstr ""
542
543 #. type: It
544 #: archlinux debian-trixie debian-unstable
545 #, no-wrap
546 msgid "Dv befloat"
547 msgstr ""
548
549 #. type: Plain text
550 #: archlinux debian-trixie debian-unstable
551 msgid ""
552 "A 32-bit single precision IEEE floating point number in big-endian byte "
553 "order."
554 msgstr ""
555
556 #. type: It
557 #: archlinux debian-trixie debian-unstable
558 #, no-wrap
559 msgid "Dv bedouble"
560 msgstr ""
561
562 #. type: Plain text
563 #: archlinux debian-trixie debian-unstable
564 msgid ""
565 "A 64-bit double precision IEEE floating point number in big-endian byte "
566 "order."
567 msgstr ""
568
569 #. type: It
570 #: archlinux debian-trixie debian-unstable
571 #, no-wrap
572 msgid "Dv bedate"
573 msgstr ""
574
575 #. type: Plain text
576 #: archlinux debian-trixie debian-unstable
577 msgid "A four-byte value in big-endian byte order, interpreted as a Unix date."
578 msgstr ""
579
580 #. type: It
581 #: archlinux debian-trixie debian-unstable
582 #, no-wrap
583 msgid "Dv beqdate"
584 msgstr ""
585
586 #. type: Plain text
587 #: archlinux debian-trixie debian-unstable
588 msgid ""
589 "An eight-byte value in big-endian byte order, interpreted as a Unix date."
590 msgstr ""
591
592 #. type: It
593 #: archlinux debian-trixie debian-unstable
594 #, no-wrap
595 msgid "Dv beldate"
596 msgstr ""
597
598 #. type: Plain text
599 #: archlinux debian-trixie debian-unstable
600 msgid ""
601 "A four-byte value in big-endian byte order, interpreted as a UNIX-style "
602 "date, but interpreted as local time rather than UTC."
603 msgstr ""
604
605 #. type: It
606 #: archlinux debian-trixie debian-unstable
607 #, no-wrap
608 msgid "Dv beqldate"
609 msgstr ""
610
611 #. type: Plain text
612 #: archlinux debian-trixie debian-unstable
613 msgid ""
614 "An eight-byte value in big-endian byte order, interpreted as a UNIX-style "
615 "date, but interpreted as local time rather than UTC."
616 msgstr ""
617
618 #. type: It
619 #: archlinux debian-trixie debian-unstable
620 #, no-wrap
621 msgid "Dv beqwdate"
622 msgstr ""
623
624 #. type: Plain text
625 #: archlinux debian-trixie debian-unstable
626 msgid ""
627 "An eight-byte value in big-endian byte order, interpreted as a Windows-style "
628 "date."
629 msgstr ""
630
631 #. type: It
632 #: archlinux debian-trixie debian-unstable
633 #, no-wrap
634 msgid "Dv bemsdosdate"
635 msgstr ""
636
637 #. type: Plain text
638 #: archlinux debian-trixie debian-unstable
639 msgid ""
640 "A two-byte value in big-endian byte order, interpreted as FAT/DOS-style date."
641 msgstr ""
642
643 #. type: It
644 #: archlinux debian-trixie debian-unstable
645 #, no-wrap
646 msgid "Dv bemsdostime"
647 msgstr ""
648
649 #. type: Plain text
650 #: archlinux debian-trixie debian-unstable
651 msgid ""
652 "A two-byte value in big-endian byte order, interpreted as FAT/DOS-style time."
653 msgstr ""
654
655 #. type: It
656 #: archlinux debian-trixie debian-unstable
657 #, no-wrap
658 msgid "Dv bestring16"
659 msgstr ""
660
661 #. type: Plain text
662 #: archlinux debian-trixie debian-unstable
663 msgid "A two-byte unicode (UCS16) string in big-endian byte order."
664 msgstr ""
665
666 #. type: It
667 #: archlinux debian-trixie debian-unstable
668 #, no-wrap
669 msgid "Dv leid3"
670 msgstr ""
671
672 #. type: Plain text
673 #: archlinux debian-trixie debian-unstable
674 msgid "A 32-bit ID3 length in little-endian byte order."
675 msgstr ""
676
677 #. type: It
678 #: archlinux debian-trixie debian-unstable
679 #, no-wrap
680 msgid "Dv leshort"
681 msgstr ""
682
683 #. type: Plain text
684 #: archlinux debian-trixie debian-unstable
685 msgid "A two-byte value in little-endian byte order."
686 msgstr ""
687
688 #. type: It
689 #: archlinux debian-trixie debian-unstable
690 #, no-wrap
691 msgid "Dv lelong"
692 msgstr ""
693
694 #. type: Plain text
695 #: archlinux debian-trixie debian-unstable
696 msgid "A four-byte value in little-endian byte order."
697 msgstr ""
698
699 #. type: It
700 #: archlinux debian-trixie debian-unstable
701 #, no-wrap
702 msgid "Dv lequad"
703 msgstr ""
704
705 #. type: Plain text
706 #: archlinux debian-trixie debian-unstable
707 msgid "An eight-byte value in little-endian byte order."
708 msgstr ""
709
710 #. type: It
711 #: archlinux debian-trixie debian-unstable
712 #, no-wrap
713 msgid "Dv lefloat"
714 msgstr ""
715
716 #. type: Plain text
717 #: archlinux debian-trixie debian-unstable
718 msgid ""
719 "A 32-bit single precision IEEE floating point number in little-endian byte "
720 "order."
721 msgstr ""
722
723 #. type: It
724 #: archlinux debian-trixie debian-unstable
725 #, no-wrap
726 msgid "Dv ledouble"
727 msgstr ""
728
729 #. type: Plain text
730 #: archlinux debian-trixie debian-unstable
731 msgid ""
732 "A 64-bit double precision IEEE floating point number in little-endian byte "
733 "order."
734 msgstr ""
735
736 #. type: It
737 #: archlinux debian-trixie debian-unstable
738 #, no-wrap
739 msgid "Dv ledate"
740 msgstr ""
741
742 #. type: Plain text
743 #: archlinux debian-trixie debian-unstable
744 msgid ""
745 "A four-byte value in little-endian byte order, interpreted as a UNIX date."
746 msgstr ""
747
748 #. type: It
749 #: archlinux debian-trixie debian-unstable
750 #, no-wrap
751 msgid "Dv leqdate"
752 msgstr ""
753
754 #. type: Plain text
755 #: archlinux debian-trixie debian-unstable
756 msgid ""
757 "An eight-byte value in little-endian byte order, interpreted as a UNIX date."
758 msgstr ""
759
760 #. type: It
761 #: archlinux debian-trixie debian-unstable
762 #, no-wrap
763 msgid "Dv leldate"
764 msgstr ""
765
766 #. type: Plain text
767 #: archlinux debian-trixie debian-unstable
768 msgid ""
769 "A four-byte value in little-endian byte order, interpreted as a UNIX-style "
770 "date, but interpreted as local time rather than UTC."
771 msgstr ""
772
773 #. type: It
774 #: archlinux debian-trixie debian-unstable
775 #, no-wrap
776 msgid "Dv leqldate"
777 msgstr ""
778
779 #. type: Plain text
780 #: archlinux debian-trixie debian-unstable
781 msgid ""
782 "An eight-byte value in little-endian byte order, interpreted as a UNIX-style "
783 "date, but interpreted as local time rather than UTC."
784 msgstr ""
785
786 #. type: It
787 #: archlinux debian-trixie debian-unstable
788 #, no-wrap
789 msgid "Dv leqwdate"
790 msgstr ""
791
792 #. type: Plain text
793 #: archlinux debian-trixie debian-unstable
794 msgid ""
795 "An eight-byte value in little-endian byte order, interpreted as a Windows-"
796 "style date."
797 msgstr ""
798
799 #. type: It
800 #: archlinux debian-trixie debian-unstable
801 #, no-wrap
802 msgid "Dv lemsdosdate"
803 msgstr ""
804
805 #. type: Plain text
806 #: archlinux debian-unstable
807 msgid ""
808 "A two-byte value in little-endian byte order, interpreted as FAT/DOS-style "
809 "date."
810 msgstr ""
811
812 #. type: It
813 #: archlinux debian-trixie debian-unstable
814 #, no-wrap
815 msgid "Dv lemsdostime"
816 msgstr ""
817
818 #. type: Plain text
819 #: archlinux debian-unstable
820 msgid ""
821 "A two-byte value in little-endian byte order, interpreted as FAT/DOS-style "
822 "time."
823 msgstr ""
824
825 #. type: It
826 #: archlinux debian-trixie debian-unstable
827 #, no-wrap
828 msgid "Dv lestring16"
829 msgstr ""
830
831 #. type: Plain text
832 #: archlinux debian-trixie debian-unstable
833 msgid "A two-byte unicode (UCS16) string in little-endian byte order."
834 msgstr ""
835
836 #. type: It
837 #: archlinux debian-trixie debian-unstable
838 #, no-wrap
839 msgid "Dv melong"
840 msgstr ""
841
842 #. type: Plain text
843 #: archlinux debian-trixie debian-unstable
844 msgid "A four-byte value in middle-endian (PDP-11) byte order."
845 msgstr ""
846
847 #. type: It
848 #: archlinux debian-trixie debian-unstable
849 #, no-wrap
850 msgid "Dv medate"
851 msgstr ""
852
853 #. type: Plain text
854 #: archlinux debian-trixie debian-unstable
855 msgid ""
856 "A four-byte value in middle-endian (PDP-11) byte order, interpreted as a "
857 "UNIX date."
858 msgstr ""
859
860 #. type: It
861 #: archlinux debian-trixie debian-unstable
862 #, no-wrap
863 msgid "Dv meldate"
864 msgstr ""
865
866 #. type: Plain text
867 #: archlinux debian-trixie debian-unstable
868 msgid ""
869 "A four-byte value in middle-endian (PDP-11) byte order, interpreted as a "
870 "UNIX-style date, but interpreted as local time rather than UTC."
871 msgstr ""
872
873 #. type: It
874 #: archlinux debian-trixie debian-unstable
875 #, no-wrap
876 msgid "Dv indirect"
877 msgstr ""
878
879 #. type: Plain text
880 #: archlinux debian-trixie debian-unstable
881 msgid ""
882 "Starting at the given offset, consult the magic database again. The offset "
883 "of the E<.Dv indirect> magic is by default absolute in the file, but one can "
884 "specify E<.Dv /r> to indicate that the offset is relative from the beginning "
885 "of the entry."
886 msgstr ""
887
888 #. type: It
889 #: archlinux debian-trixie debian-unstable
890 #, no-wrap
891 msgid "Dv name"
892 msgstr ""
893
894 #. type: Plain text
895 #: archlinux debian-unstable
896 msgid ""
897 "Define a E<.Dq named> magic instance that can be called from another E<.Dv "
898 "use> magic entry, like a subroutine call. Named instance direct magic "
899 "offsets are relative to the offset of the previous matched entry, but "
900 "indirect offsets are relative to the beginning of the file as usual. Named "
901 "magic entries return true if there was a match in the evaluation of the "
902 "entry, or if there was a previous existing match."
903 msgstr ""
904
905 #. type: It
906 #: archlinux debian-trixie debian-unstable
907 #, no-wrap
908 msgid "Dv use"
909 msgstr ""
910
911 #. type: Plain text
912 #: archlinux debian-trixie debian-unstable
913 msgid ""
914 "Recursively call the named magic starting from the current offset. If the "
915 "name of the referenced begins with a E<.Dv ^> then the endianness of the "
916 "magic is switched; if the magic mentioned E<.Dv leshort> for example, it is "
917 "treated as E<.Dv beshort> and vice versa. This is useful to avoid "
918 "duplicating the rules for different endianness."
919 msgstr ""
920
921 #. type: It
922 #: archlinux debian-trixie debian-unstable
923 #, no-wrap
924 msgid "Dv regex"
925 msgstr ""
926
927 #. type: Plain text
928 #: archlinux debian-trixie debian-unstable
929 msgid ""
930 "A regular expression match in extended POSIX regular expression syntax (like "
931 "egrep). Regular expressions can take exponential time to process, and their "
932 "performance is hard to predict, so their use is discouraged. When used in "
933 "production environments, their performance should be carefully checked. The "
934 "size of the string to search should also be limited by specifying E<.Dv /"
935 "E<lt>lengthE<gt>>, to avoid performance issues scanning long files. The "
936 "type specification can also be optionally followed by E<.Dv /[c][s][l]>. "
937 "The E<.Dq c> flag makes the match case insensitive, while the E<.Dq s> flag "
938 "update the offset to the start offset of the match, rather than the end. "
939 "The E<.Dq l> modifier, changes the limit of length to mean number of lines "
940 "instead of a byte count. Lines are delimited by the platforms native line "
941 "delimiter. When a line count is specified, an implicit byte count also "
942 "computed assuming each line is 80 characters long. If neither a byte or "
943 "line count is specified, the search is limited automatically to 8KiB. E<.Dv "
944 "^> and E<.Dv $> match the beginning and end of individual lines, "
945 "respectively, not beginning and end of file."
946 msgstr ""
947
948 #. type: It
949 #: archlinux debian-trixie debian-unstable
950 #, no-wrap
951 msgid "Dv search"
952 msgstr ""
953
954 #. type: Plain text
955 #: archlinux debian-trixie debian-unstable
956 msgid ""
957 "A literal string search starting at the given offset. The same modifier "
958 "flags can be used as for string patterns. The search expression must "
959 "contain the range in the form E<.Dv /number,> that is the number of "
960 "positions at which the match will be attempted, starting from the start "
961 "offset. This is suitable for searching larger binary expressions with "
962 "variable offsets, using E<.Dv \\e> escapes for special characters. The "
963 "order of modifier and number is not relevant."
964 msgstr ""
965
966 #. type: It
967 #: archlinux debian-trixie debian-unstable
968 #, no-wrap
969 msgid "Dv default"
970 msgstr ""
971
972 #. type: Plain text
973 #: archlinux debian-trixie debian-unstable
974 msgid ""
975 "This is intended to be used with the test E<.Em x> (which is always true) "
976 "and it has no type. It matches when no other test at that continuation "
977 "level has matched before. Clearing that matched tests for a continuation "
978 "level, can be done using the E<.Dv clear> test."
979 msgstr ""
980
981 #. type: It
982 #: archlinux debian-trixie debian-unstable
983 #, no-wrap
984 msgid "Dv clear"
985 msgstr ""
986
987 #. type: Plain text
988 #: archlinux debian-trixie debian-unstable
989 msgid ""
990 "This test is always true and clears the match flag for that continuation "
991 "level. It is intended to be used with the E<.Dv default> test."
992 msgstr ""
993
994 #. type: It
995 #: archlinux debian-trixie debian-unstable
996 #, no-wrap
997 msgid "Dv der"
998 msgstr ""
999
1000 #. type: Plain text
1001 #: archlinux debian-trixie debian-unstable
1002 msgid ""
1003 "Parse the file as a DER Certificate file. The test field is used as a der "
1004 "type that needs to be matched. The DER types are: E<.Dv eoc>, E<.Dv bool>, "
1005 "E<.Dv int>, E<.Dv bit_str>, E<.Dv octet_str>, E<.Dv null>, E<.Dv obj_id>, "
1006 "E<.Dv obj_desc>, E<.Dv ext>, E<.Dv real>, E<.Dv enum>, E<.Dv embed>, E<.Dv "
1007 "utf8_str>, E<.Dv rel_oid>, E<.Dv time>, E<.Dv res2>, E<.Dv seq>, E<.Dv set>, "
1008 "E<.Dv num_str>, E<.Dv prt_str>, E<.Dv t61_str>, E<.Dv vid_str>, E<.Dv "
1009 "ia5_str>, E<.Dv utc_time>, E<.Dv gen_time>, E<.Dv gr_str>, E<.Dv vis_str>, "
1010 "E<.Dv gen_str>, E<.Dv univ_str>, E<.Dv char_str>, E<.Dv bmp_str>, E<.Dv "
1011 "date>, E<.Dv tod>, E<.Dv datetime>, E<.Dv duration>, E<.Dv oid-iri>, E<.Dv "
1012 "rel-oid-iri>. These types can be followed by an optional numeric size, "
1013 "which indicates the field width in bytes."
1014 msgstr ""
1015
1016 #. type: It
1017 #: archlinux debian-trixie
1018 #, no-wrap
1019 msgid "Dv guid"
1020 msgstr ""
1021
1022 #. type: Plain text
1023 #: archlinux debian-trixie debian-unstable
1024 msgid ""
1025 "A Globally Unique Identifier, parsed and printed as XXXXXXXX-XXXX-XXXX-XXXX-"
1026 "XXXXXXXXXXXX. It's format is a string."
1027 msgstr ""
1028
1029 #. type: Plain text
1030 #: archlinux debian-trixie debian-unstable
1031 msgid ""
1032 "This is a quad value indicating the current offset of the file. It can be "
1033 "used to determine the size of the file or the magic buffer. For example the "
1034 "magic entries:"
1035 msgstr ""
1036
1037 #. type: Plain text
1038 #: archlinux debian-trixie debian-unstable
1039 #, no-wrap
1040 msgid ""
1041 "-0\toffset\tx\tthis file is %lld bytes\n"
1042 "-0\toffset\tE<lt>=100\tmust be more than 100 \\e\n"
1043 " bytes and is only %lld\n"
1044 msgstr ""
1045
1046 #. type: It
1047 #: archlinux debian-trixie debian-unstable
1048 #, no-wrap
1049 msgid "Dv octal"
1050 msgstr ""
1051
1052 #. type: Plain text
1053 #: archlinux debian-trixie debian-unstable
1054 msgid "A string representing an octal number."
1055 msgstr ""
1056
1057 #. type: Plain text
1058 #: archlinux debian-trixie debian-unstable
1059 msgid ""
1060 "For compatibility with the Single E<.Ux> Standard, the type specifiers E<.Dv "
1061 "dC> and E<.Dv d1> are equivalent to E<.Dv byte>, the type specifiers E<.Dv "
1062 "uC> and E<.Dv u1> are equivalent to E<.Dv ubyte>, the type specifiers E<.Dv "
1063 "dS> and E<.Dv d2> are equivalent to E<.Dv short>, the type specifiers E<.Dv "
1064 "uS> and E<.Dv u2> are equivalent to E<.Dv ushort>, the type specifiers E<.Dv "
1065 "dI>, E<.Dv dL>, and E<.Dv d4> are equivalent to E<.Dv long>, the type "
1066 "specifiers E<.Dv uI>, E<.Dv uL>, and E<.Dv u4> are equivalent to E<.Dv "
1067 "ulong>, the type specifier E<.Dv d8> is equivalent to E<.Dv quad>, the type "
1068 "specifier E<.Dv u8> is equivalent to E<.Dv uquad>, and the type specifier "
1069 "E<.Dv s> is equivalent to E<.Dv string>. In addition, the type specifier "
1070 "E<.Dv dQ> is equivalent to E<.Dv quad> and the type specifier E<.Dv uQ> is "
1071 "equivalent to E<.Dv uquad>."
1072 msgstr ""
1073
1074 #. type: Plain text
1075 #: archlinux debian-trixie debian-unstable
1076 msgid ""
1077 "Each top-level magic pattern (see below for an explanation of levels) is "
1078 "classified as text or binary according to the types used. Types E<.Dq "
1079 "regex> and E<.Dq search> are classified as text tests, unless non-printable "
1080 "characters are used in the pattern. All other tests are classified as "
1081 "binary. A top-level pattern is considered to be a test text when all its "
1082 "patterns are text patterns; otherwise, it is considered to be a binary "
1083 "pattern. When matching a file, binary patterns are tried first; if no match "
1084 "is found, and the file looks like text, then its encoding is determined and "
1085 "the text patterns are tried."
1086 msgstr ""
1087
1088 #. type: Plain text
1089 #: archlinux debian-unstable
1090 msgid ""
1091 "The numeric types may optionally be followed by an operand and a numeric "
1092 "value, to specify that the value is to be modified according to the operand "
1093 "and the numeric value before any comparisons are done. The following "
1094 "operands are supported: E<.Dv \\*[Am], \\*[Ba], \\*[ua], +, -, \\&*, /, %.> "
1095 "Prepending a E<.Dv u> to the type indicates that ordered comparisons should "
1096 "be unsigned."
1097 msgstr ""
1098
1099 #. type: It
1100 #: archlinux debian-trixie debian-unstable
1101 #, no-wrap
1102 msgid "Dv test"
1103 msgstr ""
1104
1105 #. type: Plain text
1106 #: archlinux debian-trixie debian-unstable
1107 msgid ""
1108 "The value to be compared with the value from the file. If the type is "
1109 "numeric, this value is specified in C form; if it is a string, it is "
1110 "specified as a C string with the usual escapes permitted (e.g. \\en for new-"
1111 "line)."
1112 msgstr ""
1113
1114 #. type: Plain text
1115 #: archlinux debian-trixie debian-unstable
1116 msgid ""
1117 "Numeric values may be preceded by a character indicating the operation to be "
1118 "performed. It may be E<.Dv =>, to specify that the value from the file must "
1119 "equal the specified value, E<.Dv \\*[Lt]>, to specify that the value from "
1120 "the file must be less than the specified value, E<.Dv \\*[Gt]>, to specify "
1121 "that the value from the file must be greater than the specified value, E<.Dv "
1122 "\\*[Am]>, to specify that the value from the file must have set all of the "
1123 "bits that are set in the specified value, E<.Dv ^>, to specify that the "
1124 "value from the file must have clear any of the bits that are set in the "
1125 "specified value, or E<.Dv ~>, the value specified after is negated before "
1126 "tested. E<.Dv x>, to specify that any value will match. If the character "
1127 "is omitted, it is assumed to be E<.Dv =>. Operators E<.Dv \\*[Am]>, E<.Dv "
1128 "^>, and E<.Dv ~> don't work with floats and doubles. The operator E<.Dv !"
1129 "\\&> specifies that the line matches if the test does E<.Em not> succeed."
1130 msgstr ""
1131
1132 #. type: Plain text
1133 #: archlinux debian-trixie debian-unstable
1134 msgid ""
1135 "Numeric values are specified in C form; e.g. E<.Dv 13> is decimal, E<.Dv "
1136 "013> is octal, and E<.Dv 0x13> is hexadecimal."
1137 msgstr ""
1138
1139 #. type: Plain text
1140 #: archlinux debian-trixie debian-unstable
1141 msgid ""
1142 "Numeric operations are not performed on date types, instead the numeric "
1143 "value is interpreted as an offset."
1144 msgstr ""
1145
1146 #. type: Plain text
1147 #: archlinux debian-trixie debian-unstable
1148 msgid ""
1149 "For string values, the string from the file must match the specified "
1150 "string. The operators E<.Dv =>, E<.Dv \\*[Lt]> and E<.Dv \\*[Gt]> (but not "
1151 "E<.Dv \\*[Am]>) can be applied to strings. The length used for matching is "
1152 "that of the string argument in the magic file. This means that a line can "
1153 "match any non-empty string (usually used to then print the string), with "
1154 "E<.Em \\*[Gt]\\e0> (because all non-empty strings are greater than the empty "
1155 "string)."
1156 msgstr ""
1157
1158 #. type: Plain text
1159 #: archlinux debian-trixie debian-unstable
1160 msgid ""
1161 "Dates are treated as numerical values in the respective internal "
1162 "representation."
1163 msgstr ""
1164
1165 #. type: Plain text
1166 #: archlinux debian-trixie debian-unstable
1167 msgid "The special test E<.Em x> always evaluates to true."
1168 msgstr ""
1169
1170 #. type: It
1171 #: archlinux debian-trixie debian-unstable
1172 #, no-wrap
1173 msgid "Dv message"
1174 msgstr ""
1175
1176 #. type: Plain text
1177 #: archlinux debian-trixie debian-unstable
1178 msgid ""
1179 "The message to be printed if the comparison succeeds. If the string "
1180 "contains a E<.Xr printf 3> format specification, the value from the file "
1181 "(with any specified masking performed) is printed using the message as the "
1182 "format string. If the string begins with E<.Dq \\eb>, the message printed "
1183 "is the remainder of the string with no whitespace added before it: multiple "
1184 "matches are normally separated by a single space."
1185 msgstr ""
1186
1187 #. type: Plain text
1188 #: archlinux debian-trixie debian-unstable
1189 msgid "An APPLE 4+4 character APPLE creator and type can be specified as:"
1190 msgstr ""
1191
1192 #. type: Plain text
1193 #: archlinux debian-trixie debian-unstable
1194 #, no-wrap
1195 msgid "!:apple\tCREATYPE\n"
1196 msgstr ""
1197
1198 #. type: Plain text
1199 #: archlinux debian-trixie debian-unstable
1200 msgid ""
1201 "A slash-separated list of commonly found filename extensions can be "
1202 "specified as:"
1203 msgstr ""
1204
1205 #. type: Plain text
1206 #: archlinux debian-trixie debian-unstable
1207 #, no-wrap
1208 msgid "!:ext\text[/ext...]\n"
1209 msgstr ""
1210
1211 #. type: Plain text
1212 #: archlinux debian-trixie debian-unstable
1213 msgid ""
1214 "i.e. the literal string E<.Dq !:ext> followed by a slash-separated list of "
1215 "commonly found extensions; for example for JPEG images:"
1216 msgstr ""
1217
1218 #. type: Plain text
1219 #: archlinux debian-trixie debian-unstable
1220 #, no-wrap
1221 msgid "!:ext jpeg/jpg/jpe/jfif\n"
1222 msgstr ""
1223
1224 #. type: Plain text
1225 #: archlinux debian-trixie debian-unstable
1226 msgid ""
1227 "A MIME type is given on a separate line, which must be the next non-blank or "
1228 "comment line after the magic line that identifies the file type, and has the "
1229 "following format:"
1230 msgstr ""
1231
1232 #. type: Plain text
1233 #: archlinux debian-trixie debian-unstable
1234 #, no-wrap
1235 msgid "!:mime\tMIMETYPE\n"
1236 msgstr ""
1237
1238 #. type: Plain text
1239 #: archlinux debian-trixie debian-unstable
1240 msgid "i.e. the literal string E<.Dq !:mime> followed by the MIME type."
1241 msgstr ""
1242
1243 #. type: Plain text
1244 #: archlinux debian-trixie debian-unstable
1245 msgid ""
1246 "An optional strength can be supplied on a separate line which refers to the "
1247 "current magic description using the following format:"
1248 msgstr ""
1249
1250 #. type: Plain text
1251 #: archlinux debian-trixie debian-unstable
1252 #, no-wrap
1253 msgid "!:strength OP VALUE\n"
1254 msgstr ""
1255
1256 #. type: Plain text
1257 #: archlinux debian-trixie debian-unstable
1258 msgid ""
1259 "The operand E<.Dv OP> can be: E<.Dv +>, E<.Dv ->, E<.Dv *>, or E<.Dv /> and "
1260 "E<.Dv VALUE> is a constant between 0 and 255. This constant is applied "
1261 "using the specified operand to the currently computed default magic strength."
1262 msgstr ""
1263
1264 #. type: Plain text
1265 #: archlinux debian-trixie debian-unstable
1266 msgid ""
1267 "Some file formats contain additional information which is to be printed "
1268 "along with the file type or need additional tests to determine the true file "
1269 "type. These additional tests are introduced by one or more E<.Em \\*[Gt]> "
1270 "characters preceding the offset. The number of E<.Em \\*[Gt]> on the line "
1271 "indicates the level of the test; a line with no E<.Em \\*[Gt]> at the "
1272 "beginning is considered to be at level 0. Tests are arranged in a tree-like "
1273 "hierarchy: if the test on a line at level E<.Em n> succeeds, all following "
1274 "tests at level E<.Em n+1> are performed, and the messages printed if the "
1275 "tests succeed, until a line with level E<.Em n> (or less) appears. For more "
1276 "complex files, one can use empty messages to get just the \"if/then\" "
1277 "effect, in the following way:"
1278 msgstr ""
1279
1280 #. type: Plain text
1281 #: archlinux debian-trixie debian-unstable
1282 #, no-wrap
1283 msgid ""
1284 "0 string MZ\n"
1285 "\\*[Gt]0x18 uleshort \\*[Lt]0x40 MS-DOS executable\n"
1286 "\\*[Gt]0x18 uleshort \\*[Gt]0x3f extended PC executable (e.g., MS Windows)\n"
1287 msgstr ""
1288
1289 #. type: Plain text
1290 #: archlinux debian-trixie debian-unstable
1291 msgid ""
1292 "Offsets do not need to be constant, but can also be read from the file being "
1293 "examined. If the first character following the last E<.Em \\*[Gt]> is a "
1294 "E<.Em \\&(> then the string after the parenthesis is interpreted as an "
1295 "indirect offset. That means that the number after the parenthesis is used "
1296 "as an offset in the file. The value at that offset is read, and is used "
1297 "again as an offset in the file. Indirect offsets are of the form: E<.Em ( x "
1298 "[[.,][bBcCeEfFgGhHiIlmosSqQ]][+\\-][ y ])>. The value of E<.Em x> is used "
1299 "as an offset in the file. A byte, id3 length, short or long is read at that "
1300 "offset depending on the E<.Em [bBcCeEfFgGhHiIlLmsSqQ]> type specifier. The "
1301 "value is treated as signed if E<.Dq \\&,> is specified or unsigned if E<.Dq "
1302 "\\&.> is specified. The capitalized types interpret the number as a big "
1303 "endian value, whereas the small letter versions interpret the number as a "
1304 "little endian value; the E<.Em m> type interprets the number as a middle "
1305 "endian (PDP-11) value. To that number the value of E<.Em y> is added and "
1306 "the result is used as an offset in the file. The default type if one is not "
1307 "specified is long. The following types are recognized:"
1308 msgstr ""
1309
1310 #. type: It
1311 #: archlinux debian-trixie debian-unstable
1312 #, no-wrap
1313 msgid "Sy \"Type\tSy\" \"Mnemonic\tSy\" \"Endian\tSy\" Size"
1314 msgstr ""
1315
1316 #. type: It
1317 #: archlinux debian-trixie debian-unstable
1318 #, no-wrap
1319 msgid "bcBC\tByte/Char\tN/A\t1"
1320 msgstr ""
1321
1322 #. type: It
1323 #: archlinux debian-trixie debian-unstable
1324 #, no-wrap
1325 msgid "efg\tDouble\tLittle\t8"
1326 msgstr ""
1327
1328 #. type: It
1329 #: archlinux debian-trixie debian-unstable
1330 #, no-wrap
1331 msgid "EFG\tDouble\tBig\t8"
1332 msgstr ""
1333
1334 #. type: It
1335 #: archlinux debian-trixie debian-unstable
1336 #, no-wrap
1337 msgid "hs\tHalf/Short\tLittle\t2"
1338 msgstr ""
1339
1340 #. type: It
1341 #: archlinux debian-trixie debian-unstable
1342 #, no-wrap
1343 msgid "HS\tHalf/Short\tBig\t2"
1344 msgstr ""
1345
1346 #. type: It
1347 #: archlinux debian-trixie debian-unstable
1348 #, no-wrap
1349 msgid "i\tID3\tLittle\t4"
1350 msgstr ""
1351
1352 #. type: It
1353 #: archlinux debian-trixie debian-unstable
1354 #, no-wrap
1355 msgid "I\tID3\tBig\t4"
1356 msgstr ""
1357
1358 #. type: It
1359 #: archlinux debian-trixie debian-unstable
1360 #, no-wrap
1361 msgid "l\tLong\tLittle\t4"
1362 msgstr ""
1363
1364 #. type: It
1365 #: archlinux debian-trixie debian-unstable
1366 #, no-wrap
1367 msgid "L\tLong\tBig\t4"
1368 msgstr ""
1369
1370 #. type: It
1371 #: archlinux debian-trixie debian-unstable
1372 #, no-wrap
1373 msgid "m\tMiddle\tMiddle\t4"
1374 msgstr ""
1375
1376 #. type: It
1377 #: archlinux debian-trixie debian-unstable
1378 #, no-wrap
1379 msgid "o\tOctal\tTextual\tVariable"
1380 msgstr ""
1381
1382 #. type: It
1383 #: archlinux debian-trixie debian-unstable
1384 #, no-wrap
1385 msgid "q\tQuad\tLittle\t8"
1386 msgstr ""
1387
1388 #. type: It
1389 #: archlinux debian-trixie debian-unstable
1390 #, no-wrap
1391 msgid "Q\tQuad\tBig\t8"
1392 msgstr ""
1393
1394 #. type: Plain text
1395 #: archlinux debian-trixie debian-unstable
1396 msgid "That way variable length structures can be examined:"
1397 msgstr ""
1398
1399 #. type: Plain text
1400 #: archlinux debian-trixie debian-unstable
1401 #, no-wrap
1402 msgid ""
1403 "# MS Windows executables are also valid MS-DOS executables\n"
1404 "0 string MZ\n"
1405 "\\*[Gt]0x18 uleshort \\*[Lt]0x40 MZ executable (MS-DOS)\n"
1406 "# skip the whole block below if it is not an extended executable\n"
1407 "\\*[Gt]0x18 uleshort \\*[Gt]0x3f\n"
1408 "\\*[Gt]\\*[Gt](0x3c.l) string PE\\e0\\e0 PE executable (MS-Windows)\n"
1409 "\\*[Gt]\\*[Gt](0x3c.l) string LX\\e0\\e0 LX executable (OS/2)\n"
1410 msgstr ""
1411
1412 #. type: Plain text
1413 #: archlinux debian-trixie debian-unstable
1414 msgid ""
1415 "This strategy of examining has a drawback: you must make sure that you "
1416 "eventually print something, or users may get empty output (such as when "
1417 "there is neither PE\\e0\\e0 nor LE\\e0\\e0 in the above example)."
1418 msgstr ""
1419
1420 #. type: Plain text
1421 #: archlinux debian-trixie debian-unstable
1422 msgid ""
1423 "If this indirect offset cannot be used directly, simple calculations are "
1424 "possible: appending E<.Em [+-*/%\\*[Am]|^]number> inside parentheses allows "
1425 "one to modify the value read from the file before it is used as an offset:"
1426 msgstr ""
1427
1428 #. type: Plain text
1429 #: archlinux debian-trixie debian-unstable
1430 #, no-wrap
1431 msgid ""
1432 "# MS Windows executables are also valid MS-DOS executables\n"
1433 "0 string MZ\n"
1434 "# sometimes, the value at 0x18 is less that 0x40 but there's still an\n"
1435 "# extended executable, simply appended to the file\n"
1436 "\\*[Gt]0x18 uleshort \\*[Lt]0x40\n"
1437 "\\*[Gt]\\*[Gt](4.s*512) leshort 0x014c COFF executable (MS-DOS, DJGPP)\n"
1438 "\\*[Gt]\\*[Gt](4.s*512) leshort !0x014c MZ executable (MS-DOS)\n"
1439 msgstr ""
1440
1441 #. type: Plain text
1442 #: archlinux debian-trixie debian-unstable
1443 msgid ""
1444 "Sometimes you do not know the exact offset as this depends on the length or "
1445 "position (when indirection was used before) of preceding fields. You can "
1446 "specify an offset relative to the end of the last up-level field using E<.Sq "
1447 "\\*[Am]> as a prefix to the offset:"
1448 msgstr ""
1449
1450 #. type: Plain text
1451 #: archlinux debian-trixie debian-unstable
1452 #, no-wrap
1453 msgid ""
1454 "0 string MZ\n"
1455 "\\*[Gt]0x18 uleshort \\*[Gt]0x3f\n"
1456 "\\*[Gt]\\*[Gt](0x3c.l) string PE\\e0\\e0 PE executable (MS-Windows)\n"
1457 "# immediately following the PE signature is the CPU type\n"
1458 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Am]0 leshort 0x14c for Intel 80386\n"
1459 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Am]0 leshort 0x8664 for x86-64\n"
1460 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Am]0 leshort 0x184 for DEC Alpha\n"
1461 msgstr ""
1462
1463 #. type: Plain text
1464 #: archlinux debian-trixie debian-unstable
1465 msgid "Indirect and relative offsets can be combined:"
1466 msgstr ""
1467
1468 #. type: Plain text
1469 #: archlinux debian-trixie debian-unstable
1470 #, no-wrap
1471 msgid ""
1472 "0 string MZ\n"
1473 "\\*[Gt]0x18 uleshort \\*[Lt]0x40\n"
1474 "\\*[Gt]\\*[Gt](4.s*512) leshort !0x014c MZ executable (MS-DOS)\n"
1475 "# if it's not COFF, go back 512 bytes and add the offset taken\n"
1476 "# from byte 2/3, which is yet another way of finding the start\n"
1477 "# of the extended executable\n"
1478 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Am](2.s-514) string LE LE executable (MS Windows VxD driver)\n"
1479 msgstr ""
1480
1481 #. type: Plain text
1482 #: archlinux debian-trixie debian-unstable
1483 msgid "Or the other way around:"
1484 msgstr ""
1485
1486 #. type: Plain text
1487 #: archlinux debian-trixie debian-unstable
1488 #, no-wrap
1489 msgid ""
1490 "0 string MZ\n"
1491 "\\*[Gt]0x18 uleshort \\*[Gt]0x3f\n"
1492 "\\*[Gt]\\*[Gt](0x3c.l) string LE\\e0\\e0 LE executable (MS-Windows)\n"
1493 "# at offset 0x80 (-4, since relative offsets start at the end\n"
1494 "# of the up-level match) inside the LE header, we find the absolute\n"
1495 "# offset to the code area, where we look for a specific signature\n"
1496 "\\*[Gt]\\*[Gt]\\*[Gt](\\*[Am]0x7c.l+0x26) string UPX \\eb, UPX compressed\n"
1497 msgstr ""
1498
1499 #. type: Plain text
1500 #: archlinux debian-trixie debian-unstable
1501 msgid "Or even both!"
1502 msgstr ""
1503
1504 #. type: Plain text
1505 #: archlinux debian-trixie debian-unstable
1506 #, no-wrap
1507 msgid ""
1508 "0 string MZ\n"
1509 "\\*[Gt]0x18 uleshort \\*[Gt]0x3f\n"
1510 "\\*[Gt]\\*[Gt](0x3c.l) string LE\\e0\\e0 LE executable (MS-Windows)\n"
1511 "# at offset 0x58 inside the LE header, we find the relative offset\n"
1512 "# to a data area where we look for a specific signature\n"
1513 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Am](\\*[Am]0x54.l-3) string UNACE \\eb, ACE self-extracting archive\n"
1514 msgstr ""
1515
1516 #. type: Plain text
1517 #: archlinux debian-trixie debian-unstable
1518 msgid ""
1519 "If you have to deal with offset/length pairs in your file, even the second "
1520 "value in a parenthesized expression can be taken from the file itself, using "
1521 "another set of parentheses. Note that this additional indirect offset is "
1522 "always relative to the start of the main indirect offset."
1523 msgstr ""
1524
1525 #. type: Plain text
1526 #: archlinux debian-trixie debian-unstable
1527 #, no-wrap
1528 msgid ""
1529 "0 string MZ\n"
1530 "\\*[Gt]0x18 uleshort \\*[Gt]0x3f\n"
1531 "\\*[Gt]\\*[Gt](0x3c.l) string PE\\e0\\e0 PE executable (MS-Windows)\n"
1532 "# search for the PE section called \".idata\"...\n"
1533 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Am]0xf4 search/0x140 .idata\n"
1534 "# ...and go to the end of it, calculated from start+length;\n"
1535 "# these are located 14 and 10 bytes after the section name\n"
1536 "\\*[Gt]\\*[Gt]\\*[Gt]\\*[Gt](\\*[Am]0xe.l+(-4)) string PK\\e3\\e4 \\eb, ZIP self-extracting archive\n"
1537 msgstr ""
1538
1539 #. type: Plain text
1540 #: archlinux debian-trixie debian-unstable
1541 msgid ""
1542 "If you have a list of known values at a particular continuation level, and "
1543 "you want to provide a switch-like default case:"
1544 msgstr ""
1545
1546 #. type: Plain text
1547 #: archlinux debian-trixie debian-unstable
1548 #, no-wrap
1549 msgid ""
1550 "# clear that continuation level match\n"
1551 "\\*[Gt]18\tclear\tx\n"
1552 "\\*[Gt]18\tlelong\t1\tone\n"
1553 "\\*[Gt]18\tlelong\t2\ttwo\n"
1554 "\\*[Gt]18\tdefault\tx\n"
1555 "# print default match\n"
1556 "\\*[Gt]\\*[Gt]18\tlelong\tx\tunmatched 0x%x\n"
1557 msgstr ""
1558
1559 #. type: Sh
1560 #: archlinux debian-trixie debian-unstable
1561 #, no-wrap
1562 msgid "SEE ALSO"
1563 msgstr ""
1564
1565 #. type: Plain text
1566 #: archlinux debian-trixie debian-unstable
1567 msgid "E<.Xr file 1> \\- the command that reads this file."
1568 msgstr ""
1569
1570 #. type: Sh
1571 #: archlinux debian-trixie debian-unstable
1572 #, no-wrap
1573 msgid "BUGS"
1574 msgstr ""
1575
1576 #. type: Plain text
1577 #: archlinux debian-trixie debian-unstable
1578 msgid ""
1579 "The formats E<.Dv long>, E<.Dv belong>, E<.Dv lelong>, E<.Dv melong>, E<.Dv "
1580 "short>, E<.Dv beshort>, and E<.Dv leshort> do not depend on the length of "
1581 "the C data types E<.Dv short> and E<.Dv long> on the platform, even though "
1582 "the Single E<.Ux> Specification implies that they do. However, as OS X "
1583 "Mountain Lion has passed the Single E<.Ux> Specification validation suite, "
1584 "and supplies a version of E<.Xr file 1> in which they do not depend on the "
1585 "sizes of the C data types and that is built for a 64-bit environment in "
1586 "which E<.Dv long> is 8 bytes rather than 4 bytes, presumably the validation "
1587 "suite does not test whether, for example E<.Dv long> refers to an item with "
1588 "the same size as the C data type E<.Dv long>. There should probably be "
1589 "E<.Dv type> names E<.Dv int8>, E<.Dv uint8>, E<.Dv int16>, E<.Dv uint16>, "
1590 "E<.Dv int32>, E<.Dv uint32>, E<.Dv int64>, and E<.Dv uint64>, and specified-"
1591 "byte-order variants of them, to make it clearer that those types have "
1592 "specified widths."
1593 msgstr ""
1594
1595 #. type: Dd
1596 #: debian-trixie
1597 #, no-wrap
1598 msgid "November 27, 2024"
1599 msgstr ""
1600
1601 #. type: Plain text
1602 #: debian-trixie
1603 msgid ""
1604 "This manual page documents the format of magic files as used by the E<.Xr "
1605 "file 1> command, version 5.46. The E<.Xr file 1> command identifies the "
1606 "type of a file using, among other tests, a test for whether the file "
1607 "contains certain E<.Dq \"magic patterns\">. The database of these E<.Dq "
1608 "\"magic patterns\"> is usually located in a binary file in E<.Pa /usr/share/"
1609 "misc/magic.mgc> or a directory of source text magic pattern fragment files "
1610 "in E<.Pa /usr/share/misc/magic>. The database specifies what patterns are "
1611 "to be tested for, what message or MIME type to print if a particular pattern "
1612 "is found, and additional information to extract from the file."
1613 msgstr ""
1614
1615 #. type: Plain text
1616 #: debian-trixie
1617 msgid ""
1618 "A string of bytes. The string type specification can be optionally followed "
1619 "by a /E<lt>widthE<gt> option and optionally followed by a set of flags /"
1620 "[bCcftTtWw]*. The width limits the number of characters to be copied. Zero "
1621 "means all characters. The following flags are supported:"
1622 msgstr ""
1623
1624 #. type: Plain text
1625 #: debian-trixie
1626 msgid ""
1627 "Use upper case insensitive matching: upper case characters in the magic "
1628 "match both lower and upper case characters in the target, whereas lower case "
1629 "characters in the magic only match upper case characters in the target."
1630 msgstr ""
1631
1632 #. type: Plain text
1633 #: debian-trixie
1634 msgid ""
1635 "Use lower case insensitive matching: lower case characters in the magic "
1636 "match both lower and upper case characters in the target, whereas upper case "
1637 "characters in the magic only match upper case characters in the target. To "
1638 "do a complete case insensitive match, specify both E<.Dq c> and E<.Dq C>."
1639 msgstr ""
1640
1641 #. type: Plain text
1642 #: debian-trixie
1643 msgid "Trim the string, i.e. leading and trailing whitespace"
1644 msgstr ""
1645
1646 #. type: Plain text
1647 #: debian-trixie
1648 msgid ""
1649 "Compact whitespace in the target, which must contain at least one whitespace "
1650 "character. If the magic has E<.Dv n> consecutive blanks, the target needs "
1651 "at least E<.Dv n> consecutive blanks to match."
1652 msgstr ""
1653
1654 #. type: Plain text
1655 #: debian-trixie
1656 msgid ""
1657 "Treat every blank in the magic as an optional blank. is deleted before the "
1658 "string is printed."
1659 msgstr ""
1660
1661 #. type: Plain text
1662 #: debian-trixie
1663 msgid ""
1664 "Define a E<.Dq named> magic instance that can be called from another E<.Dv "
1665 "use> magic entry, like a subroutine call. Named instance direct magic "
1666 "offsets are relative to the offset of the previous matched entry, but "
1667 "indirect offsets are relative to the beginning of the file as usual. Named "
1668 "magic entries always match."
1669 msgstr ""
1670
1671 #. type: Plain text
1672 #: debian-trixie
1673 msgid ""
1674 "The numeric types may optionally be followed by E<.Dv \\*[Am]> and a numeric "
1675 "value, to specify that the value is to be AND'ed with the numeric value "
1676 "before any comparisons are done. Prepending a E<.Dv u> to the type "
1677 "indicates that ordered comparisons should be unsigned."
1678 msgstr ""
1679
1680 #. type: Plain text
1681 #: debian-unstable
1682 msgid ""
1683 "This manual page documents the format of magic files as used by the E<.Xr "
1684 "file 1> command, version 5.47. The E<.Xr file 1> command identifies the "
1685 "type of a file using, among other tests, a test for whether the file "
1686 "contains certain E<.Dq \"magic patterns\">. The database of these E<.Dq "
1687 "\"magic patterns\"> is usually located in a binary file in E<.Pa /usr/share/"
1688 "misc/magic.mgc> or a directory of source text magic pattern fragment files "
1689 "in E<.Pa /usr/share/misc/magic>. The database specifies what patterns are "
1690 "to be tested for, what message or MIME type to print if a particular pattern "
1691 "is found, and additional information to extract from the file."
1692 msgstr ""
1693
1694 #. type: It
1695 #: debian-unstable
1696 #, no-wrap
1697 msgid "Dv guid ,"
1698 msgstr ""
1699
1700 #. type: It
1701 #: debian-unstable
1702 #, no-wrap
1703 msgid "Dv leguid ,"
1704 msgstr ""
1705
1706 #. type: It
1707 #: debian-unstable
1708 #, no-wrap
1709 msgid "Dv beguid"
1710 msgstr ""