summarylogtreecommitdiffstats
path: root/rar.1
blob: 658421567e67e2427901897a0d2d8c56fd15f431 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
2383
2384
2385
2386
2387
2388
2389
2390
2391
2392
2393
2394
2395
2396
2397
2398
2399
2400
2401
2402
2403
2404
2405
2406
2407
2408
2409
2410
2411
2412
2413
2414
2415
2416
2417
2418
2419
2420
2421
2422
2423
2424
2425
2426
2427
2428
2429
2430
2431
2432
2433
2434
2435
2436
2437
2438
2439
2440
2441
2442
2443
2444
2445
2446
2447
2448
2449
2450
2451
2452
2453
2454
2455
2456
2457
2458
2459
2460
2461
2462
2463
2464
2465
2466
2467
2468
2469
2470
2471
2472
2473
2474
2475
2476
2477
2478
2479
2480
2481
2482
2483
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
.\" Automatically generated by Pod::Man 2.27 (Pod::Simple 3.28)
.\"
.\" Standard preamble:
.\" ========================================================================
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
..
.de Vb \" Begin verbatim text
.ft CW
.nf
.ne \\$1
..
.de Ve \" End verbatim text
.ft R
.fi
..
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
'br\}
.el\{\
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.    ds C`
.    ds C'
'br\}
.\"
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\"
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.\"
.\" Avoid warning from groff about undefined register 'F'.
.de IX
..
.nr rF 0
.if \n(.g .if rF .nr rF 1
.if (\n(rF:(\n(.g==0)) \{
.    if \nF \{
.        de IX
.        tm Index:\\$1\t\\n%\t"\\$2"
..
.        if !\nF==2 \{
.            nr % 0
.            nr F 2
.        \}
.    \}
.\}
.rr rF
.\"
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.\}
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.\}
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.\}
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.\}
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
\{\
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.\}
.rm #[ #] #H #V #F C
.\" ========================================================================
.\"
.IX Title "RAR 1"
.TH RAR 1 "2013-09-09" " " "RAR User's Manual"
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
.nh
.SH "NAME"
rar \- RAR archiver console version
.SH "SYNOPSIS"
.IX Header "SYNOPSIS"
.ie n .IP "\fBrar\fR \fIcommand\fR [\fIswitches\fR] \fIarchive\fR [\fIfile...\fR] [\fI\fI@listfile\fI...\fR] [\fIpath_to_extract\e\fR]" 4
.el .IP "\fBrar\fR \fIcommand\fR [\fIswitches\fR] \fIarchive\fR [\fIfile...\fR] [\fI\f(CI@listfile\fI...\fR] [\fIpath_to_extract\e\fR]" 4
.IX Item "rar command [switches] archive [file...] [@listfile...] [path_to_extract]"
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
\&\fBrar\fR is a console application allowing to manage archive files in
command line mode. \fBrar\fR provides compression, encryption, data recovery
and many other functions described in this manual.
.PP
\&\fBrar\fR supports only \s-1RAR\s0 format archives, which have .rar file name
extension by default. \s-1ZIP\s0 and other formats are not supported.  Even if
you specify .zip extension when creating an archive, it will still be
in \s-1RAR\s0 format. Windows users may install WinRAR, which supports more
archive types including \s-1RAR\s0 and \s-1ZIP\s0 formats.
.PP
Command line \fIoptions\fR (\fIcommands\fR and \fIswitches\fR) provide control of
creating and managing archives with \fBrar\fR. The \fIcommand\fR is a string
(or a single letter) which commands \fBrar\fR to perform a corresponding
action.  \fISwitches\fR are designed to modify the way \fBrar\fR performs the
action. Other parameters are archive name and files to be archived into
or extracted from the archive.
.PP
\&\fIListfiles\fR are plain text files that contain names of files to process.
File names should start at the first column. It is possible to put
comments to the listfile after \f(CW\*(C`//\*(C'\fR characters. For example, you may
create backup.lst containing the following strings:
.PP
.Vb 3
\&    c:\ework\edoc\e*.txt         //backup text documents
\&    c:\ework\eimage\e*.bmp       //backup pictures
\&    c:\ework\emisc
.Ve
.PP
and then run:
.PP
.Vb 1
\&    rar a backup @backup.lst
.Ve
.PP
If you wish to read file names from stdin (standard input), specify the
empty listfile name (just \f(CW\*(C`@\*(C'\fR).
.PP
By default, console \fBrar\fR uses the single byte encoding in list files,
but it can be redefined with \fB\-sc\fR\fI<charset>\fR\fBl\fR switch.
.PP
You may specify both usual file names and list files in the same command
line. If neither files nor listfiles are specified, then \f(CW\*(C`*.*\*(C'\fR is
implied and \fBrar\fR will process all files.
.PP
Many \fBrar\fR commands, such as extraction, test or list, allow to use
wildcards in archive name. If no extension is specified in archive mask,
\&\fBrar\fR assumes \f(CW\*(C`.rar\*(C'\fR, so \f(CW\*(C`*\*(C'\fR means all archives with \f(CW\*(C`.rar\*(C'\fR extension.
If you need to process all archives without extension, use \f(CW\*(C`*.\*(C'\fR mask.
\&\f(CW\*(C`*.*\*(C'\fR mask selects all files. Wildcards in archive name are not allowed
when archiving and deleting.
.PP
In Unix you need to enclose \fBrar\fR command line parameters containing
wildcards in single or double quotes to prevent their expansion by Unix
shell. For example, this command will extract *.asm files from all *.rar
archives in current directory:
.PP
.Vb 1
\&    rar e \*(Aq*.rar\*(Aq \*(Aq*.asm\*(Aq
.Ve
.SH "COMMAND"
.IX Header "COMMAND"
\&\fIcommand\fR could be any of the following:
.IP "\fBa\fR" 4
.IX Item "a"
Add files to archive.
.Sp
Examples:
.Sp
1) add all *.hlp files from the current directory to the archive help.rar:
.Sp
.Vb 1
\&    rar a help *.hlp
.Ve
.Sp
2) archive all files from the current directory and subdirectories to
362000 bytes size solid, self-extracting volumes and add the recovery
record to each volume:
.Sp
.Vb 1
\&    rar a \-r \-v362 \-s \-sfx \-rr save
.Ve
.Sp
Because no file names are specified, all files (*) are assumed.
.Sp
3) as a special exception, if directory name is specified as an
argument and if directory name does not include file masks and trailing
backslashes, the entire contents of the directory and all subdirectories
will be added to the archive even if switch \-r is not specified.
.Sp
The following command will add all files from the directory Bitmaps and
its subdirectories to the \s-1RAR\s0 archive Pictures.rar:
.Sp
.Vb 1
\&    rar a Pictures.rar Bitmaps
.Ve
.Sp
4) if directory name includes file masks or trailing backslashes,
normal rules apply and you need to specify switch \-r to process its
subdirectories.
.Sp
The following command will add all files from directory Bitmaps, but
not from its subdirectories, because switch \-r is not specified:
.Sp
.Vb 1
\&    rar a Pictures.rar Bitmaps\e*
.Ve
.IP "\fBc\fR" 4
.IX Item "c"
Add archive comment. Comments are displayed while the archive is being
processed. Comment length is limited to 62000 bytes
.Sp
Examples:
.Sp
.Vb 1
\&    rar c distrib.rar
.Ve
.Sp
Also comments may be added from a file using \-z[file] switch.
The following command adds a comment from info.txt file:
.Sp
.Vb 1
\&    rar c \-zinfo.txt dummy
.Ve
.IP "\fBch\fR" 4
.IX Item "ch"
Change archive parameters.
.Sp
This command can be used with most of archive modification switches to
modify archive parameters. It is especially convenient for switches like
\&\-cl, \-cu, \-tl, which do not have a dedicated command.
.Sp
It is not able to recompress, encrypt or decrypt archive data and it
cannot merge or create volumes. If used without any switches, 'ch'
command just copies the archive data without modification.
.Sp
Example:
.Sp
Set archive time to latest file:
.Sp
.Vb 1
\&    rar ch \-tl files.rar
.Ve
.IP "\fBcw\fR" 4
.IX Item "cw"
Write archive comment to specified file.
.Sp
Format of output file depends on \-sc switch.
.Sp
If output file name is not specified, comment data will be sent to stdout.
.Sp
Examples:
.Sp
.Vb 3
\&    rar cw arc comment.txt
\&    rar cw \-scuc arc unicode.txt
\&    rar cw arc
.Ve
.IP "\fBd\fR" 4
.IX Item "d"
Delete files from archive. Please note if the processing of this command
results in removing all the files from the archive, the empty archive
would removed.
.IP "\fBe\fR" 4
.IX Item "e"
Extract files without archived paths.
.Sp
Extract files excluding their path component, so all files are created
in the same destination directory.
.Sp
Use '\fBx\fR' command if you wish to extract full pathnames.
.Sp
Example:
.Sp
.Vb 1
\&    rar e \-or html.rar *.css css\e
.Ve
.Sp
extract all *.css files from html.rar archive to 'css' folder excluding
archived paths. Rename extracted files automatically in case several
files have the same name.
.IP "\fBf\fR" 4
.IX Item "f"
Freshen files in archive. Updates those files changed since they were
packed to the archive. This command will not add new files to the archive.
.IP "\fBi[i|c|h|t]=\fR\fI<string>\fR" 4
.IX Item "i[i|c|h|t]=<string>"
Find string in archives.
.Sp
Supports following optional parameters:
.Sp
\&\fBi\fR \- case insensitive search (default);
.Sp
\&\fBc\fR \- case sensitive search;
.Sp
\&\fBh\fR \- hexadecimal search;
.Sp
\&\fBt\fR \- use \s-1ANSI,\s0 Unicode and \s-1OEM\s0 character tables (Windows only);
.Sp
If no parameters are specified, it is possible to use the simplified
command syntax \fBi\fR\fI<string>\fR instead of \fBi=\fR\fI<string>\fR
.Sp
It is allowed to specify 't' modifier with other parameters, for example,
ict=string performs case sensitive search using all mentioned above
character tables.
.Sp
Examples:
.Sp
.Vb 1
\&    rar "ic=first level" \-r c:\e*.rar *.txt
.Ve
.Sp
Perform case sensitive search of \*(L"first level\*(R" string in *.txt files in
*.rar archives on the disk c:
.Sp
.Vb 1
\&    rar ih=f0e0aeaeab2d83e3a9 \-r e:\etexts
.Ve
.Sp
Search for hex string f0 e0 ae ae ab 2d 83 e3 a9 in rar archives in
e:\etexts directory.
.IP "\fBk\fR" 4
.IX Item "k"
Lock archive. Any command which intends to change the archive will
be ignored.
.Sp
Example:
.Sp
.Vb 1
\&    rar k final.rar
.Ve
.IP "\fBl[t[a],b]\fR" 4
.IX Item "l[t[a],b]"
List archive contents \fB[technical [all], bare]\fR.
.Sp
\&'l' command lists archived file attributes, size, date, time and name,
one file per line. If file is encrypted, line starts from '*' character.
.Sp
\&'lt' displays the detailed file information in multiline mode.
This information includes file checksum value, host \s-1OS,\s0 compression
options and other parameters.
.Sp
\&'lta' provide the detailed information not only for files, but also for
service headers like \s-1NTFS\s0 streams or file security data.
.Sp
\&'lb' lists bare file names with path, one per line, without any additional
information.
.Sp
You can use \-v switch to list contents of all volumes in volume set:
rar l \-v vol.part1.rar
.Sp
Commands 'lt', 'lta' and 'lb' are equal to 'vt', 'vta' and 'vb'
correspondingly.
.IP "\fBm[f]\fR" 4
.IX Item "m[f]"
Move to archive \fB[files only]\fR. Moving files and directories results
in the files and directories being erased upon successful completion of
the packing operation. Directories will not be removed if 'f' modifier
is used and/or '\-ed' switch is applied.
.IP "\fBp\fR" 4
.IX Item "p"
Print file to stdout.
.Sp
You may use this command together with \-inul switch to disable all \s-1RAR\s0
messages and print only file data. It may be important when you need to
send a file to stdout for use in pipes.
.IP "\fBr\fR" 4
.IX Item "r"
Repair archive. Archive repairing is performed in two stages.  First, the
damaged archive is searched for a recovery record (see 'rr' command). If
archive contains the previously added recovery record and if damaged
data area is continuous and smaller than error correction code size in
recovery record, chance of successful archive reconstruction is high.
When this stage has been completed, a new archive is created, named as
fixed.arcname.rar, where 'arcname' is the original (damaged) archive name.
.Sp
If broken archive does not contain a recovery record or if archive
is not completely recovered due to major damage, second stage is
performed. During this stage only the archive structure is reconstructed
and it is impossible to recover files which fail checksum validation,
it is still possible, however, to recover undamaged files, which were
inaccessible due to the broken archive structure. Mostly this is useful
for non-solid archives. This stage is never efficient for archives with
encrypted file headers, which can be repaired only if recovery record
is present.
.Sp
When the second stage is completed, the reconstructed archive is saved
as rebuilt.arcname.rar, where 'arcname' is the original archive name.
.Sp
By default, repaired archives are created in the current directory,
but you can append an optional destpath\e parameter to specify another
destination directory.
.Sp
Example:
.Sp
.Vb 1
\&    rar r buggy.rar c:\efixed\e
.Ve
.Sp
repair buggy.rar and place the result to 'c:\efixed' directory.
.IP "\fBrc\fR" 4
.IX Item "rc"
Reconstruct missing and damaged volumes using recovery volumes (.rev
files). You need to specify any existing volume as the archive name,
for example, 'rar rc backup.part03.rar'
.Sp
Read 'rv' command description for information about recovery volumes.
.IP "\fBrn\fR" 4
.IX Item "rn"
Rename archived files.
.Sp
The command syntax is:
.Sp
.Vb 1
\&    rar rn <arcname> <srcname1> <destname1> ... <srcnameN> <destnameN>
.Ve
.Sp
For example, the following command:
.Sp
.Vb 1
\&    rar rn data.rar readme.txt readme.bak info.txt info.bak
.Ve
.Sp
will rename readme.txt to readme.bak and info.txt to info.bak in the
archive data.rar.
.Sp
It is allowed to use wildcards in the source and destination names for
simple name transformations like changing file extensions. For example:
.Sp
.Vb 1
\&    rar rn data.rar *.txt *.bak
.Ve
.Sp
will rename all *.txt files to *.bak.
.Sp
\&\fBrar\fR does not check if the destination file name is already present in
the archive, so you need to be careful to avoid duplicated names. It is
especially important when using wildcards. Such a command is potentially
dangerous, because a wrong wildcard may corrupt all archived names.
.IP "\fBrr\fR\fI[N]\fR" 4
.IX Item "rr[N]"
Add data recovery record. Optionally, redundant information (recovery
record) may be added to archive. While it increases the archive size, it
helps to recover archived files in case of disk failure or data loss of
other kind, provided that damage is not too severe. Such damage recovery
can be done with command \*(L"r\*(R" (repair).
.Sp
\&\s-1RAR 4\s0.x and \s-1RAR 5.0\s0 archives use different recovery record structure
and algorithms.
.Sp
\&\s-1RAR 4\s0.x recovery record is based on \s-1XOR\s0 algorithm.  You can specify 4.x
record size as a number of recovery sectors or as a percent of archive
size. To specify a number of sectors just add it directly after 'rr', like
\&'rr1000' for 1000 sectors.  To use a percent append 'p' or '%' modifier
after the percent number, such as 'rr5p' or 'rr5%' for 5%. Note that
in Windows .bat and .cmd files it is necessary to use 'rr5%%' instead
of 'rr5%', because the command processor treats the single '%' as the
start of a batch file parameter, so it might be more convenient to use
\&'p' instead of '%' in this case.
.Sp
\&\s-1RAR 4\s0.x recovery sectors are 512 bytes long. If damaged area
is continuous, every sector helps to recover 512 bytes of damaged
information. This value may be lower in cases of multiple damage. Maximum
number of recovery sectors is 524288.
.Sp
Size of 4.x recovery record may be approximately determined as <archive
size>/256 + <number of recovery sectors>*512 bytes.
.Sp
\&\s-1RAR 5.0\s0 recovery record uses Reed-Solomon error correction codes.
Its ability to repair continuous damage is about the same as for \s-1RAR 4\s0.x,
allowing to restore slightly less data than recovery record size. But it
is significantly more efficient than \s-1RAR 4\s0.x record in case of multiple
damaged areas.
.Sp
\&\s-1RAR 5.0\s0 record does not use 512 byte sectors and you can specify its
size only as a percent of archive size. Even if '%' or 'p' modifier is
not present, \fBrar\fR treats the value as a percent in case of \s-1RAR 5.0\s0
format, so both 'rr5' and 'rr5p' mean 5%.  Due to service data overhead
the actual resulting recovery record size only approximately matches
the user defined percent and difference is larger for smaller archives.
.Sp
\&\s-1RAR 5.0\s0 recovery record size cannot exceed the protecting archive size,
so you cannot use more than 100% as a parameter.  Larger recovery records
are processed slower both when creating and repairing.
.Sp
\&\s-1RAR 5.0\s0 recovery record is more resistant to damage of recovery record
itself and can utilize a partially corrupt recovery record data. Note,
though, that 'R' repair command does not fix broken blocks in recovery
record. Only file data are corrected.  After successful archive repair,
you may need to create a new recovery record for saved files.
.Sp
Both 4.x and 5.0 records are most efficient if data positions in damaged
archive are not shifted. If you copy an archive from damaged media using
some special software and if you have a choice to fill damaged areas with
zeroes or to cut out them from copied file, filling with zeroes or any
other value is preferable, because it allows to preserve original data
positions.  Still, even though it is not an optimal mode, both versions
of records attempt to repair data even in case of deletions or insertions
of reasonable size, when data positions were shifted. \s-1RAR 5.0\s0 recovery
record handles deletions and insertions more efficiently than \s-1RAR 4\s0.x.
.Sp
If you use the plain 'rr' command without optional parameter, \fBrar\fR
will set the recovery record size to 3% of archive size by default.
.Sp
Example:
.Sp
.Vb 1
\&    rar rr5p arcname
.Ve
.Sp
add the recovery record of 5% of archive size.
.IP "\fBrv\fR\fI[N]\fR" 4
.IX Item "rv[N]"
Create recovery volumes (.rev files), which can be later used to
reconstruct missing and damaged files in a volume set. This command
makes sense only for multivolume archives and you need to specify the
name of the first volume in the set as the archive name. For example:
.Sp
.Vb 1
\&    rar rv3 data.part01.rar
.Ve
.Sp
This feature may be useful for backups or, for example, when you posted
a multivolume archive to a newsgroup and a part of subscribers did not
receive some of the files.  Reposting recovery volumes instead of usual
volumes may reduce the total number of files to repost.
.Sp
Each recovery volume is able to reconstruct one missing or damaged \s-1RAR\s0
volume. For example, if you have 30 volumes and 3 recovery volumes,
you are able to reconstruct any 3 missing volumes. If the number of
\&.rev files is less than the number of missing volumes, reconstructing
is impossible.  The total number of usual and recovery volumes must not
exceed 255 for \s-1RAR 4\s0.x and 65535 for \s-1RAR 5.0\s0 archive format.
.Sp
Original \s-1RAR\s0 volumes must not be modified after creating recovery
volumes. Recovery algorithm uses data stored both in \s-1REV\s0 files and in \s-1RAR\s0
volumes to rebuild missing \s-1RAR\s0 volumes.  So if you modify \s-1RAR\s0 volumes, for
example, lock them, after creating \s-1REV\s0 files, recovery process will fail.
.Sp
Additionally to recovery data, \s-1RAR 5.0\s0 recovery volumes also store
service information such as checksums of protected \s-1RAR\s0 files. So they
are slightly larger than \s-1RAR\s0 volumes which they protect. If you plan
to copy individual \s-1RAR\s0 and \s-1REV\s0 files to some removable media, you need
to take it into account and specify \s-1RAR\s0 volume size by a few kilobytes
smaller than media size.
.Sp
The optional <N> parameter specifies a number of recovery volumes to
create and must be less than the total number of \s-1RAR\s0 volumes in the
set. You may also append a percent character to this parameter, in such
case the number of creating .rev files will be equal to this percent
taken from the total number of \s-1RAR\s0 volumes. For example:
.Sp
.Vb 1
\&    rar rv15% data.part01.rar
.Ve
.Sp
\&\fBrar\fR reconstructs missing and damaged volumes either when using 'rc'
command or automatically, if it cannot locate the next volume and finds
the required number of .rev files when unpacking.
.Sp
Original copies of damaged volumes are renamed to *.bad before
reconstruction. For example, volname.part03.rar will be renamed to
volname.part03.rar.bad.
.IP "\fBs\fR\fI[name]\fR" 4
.IX Item "s[name]"
Convert archive to \s-1SFX.\s0 The archive is merged with a \s-1SFX\s0 module (using a
module in file \fIdefault.sfx\fR or specified in the switch).  In the Windows
version \fIdefault.sfx\fR should be placed in the same directory as the
rar.exe, in Unix \- in the user's home directory, in /usr/lib or
/usr/local/lib.
.IP "\fBs\-\fR" 4
.IX Item "s-"
Remove \s-1SFX\s0 module from the already existing \s-1SFX\s0 archive.  \fBrar\fR creates
a new archive without \s-1SFX\s0 module, the original \s-1SFX\s0 archive is not deleted.
.IP "\fBt\fR" 4
.IX Item "t"
Test archive files. This command performs a dummy file extraction, writing
nothing to the output stream, in order to validate the specified file(s).
.Sp
Examples:
.Sp
Test archives in current directory:
.Sp
.Vb 1
\&    rar t *
.Ve
.Sp
or for Unix:
.Sp
.Vb 1
\&    rar t \*(Aq*\*(Aq
.Ve
.Sp
User may test archives in all sub-directories, starting with the
current path:
.Sp
.Vb 1
\&    rar t \-r *
.Ve
.Sp
or for Unix:
.Sp
.Vb 1
\&    rar t \-r \*(Aq*\*(Aq
.Ve
.IP "\fBu\fR" 4
.IX Item "u"
Update files in archive. Adds files not yet in the archive and updates
files that have been changed since they were packed into the archive.
.IP "\fBv[t[a],b]\fR" 4
.IX Item "v[t[a],b]"
Verbosely list archive contents \fB[technical [all], bare]\fR.
.Sp
\&'v' command lists archived file attributes, size, packed size, compression
ratio, date, time, checksum and name, one file per line. If file is
encrypted, line starts from '*' character.  For BLAKE2sp checksum only
two first and one last symbol are displayed.
.Sp
\&'vt' displays the detailed file information in multiline mode.
This information includes file checksum value, host \s-1OS,\s0 compression
options and other parameters.
.Sp
\&'vta' provide the detailed information not only for files, but also for
service headers like \s-1NTFS\s0 streams or file security data.
.Sp
\&'vb' lists bare file names with path, one per line, without any additional
information.
.Sp
You can use \-v switch to list contents of all volumes in volume set:
rar v \-v vol.part1.rar
.Sp
Commands 'vt', 'vta' and 'vb' are equal to 'lt', 'lta' and 'lb'
correspondingly.
.IP "\fBx\fR" 4
.IX Item "x"
Extract files with full path.
.Sp
Examples:
.Sp
1) extract 10cents.txt to current directory not displaying the archive
comment
.Sp
.Vb 1
\&    rar x \-c\- dime 10cents.txt
.Ve
.Sp
2) extract *.txt from docs.rar to c:\edocs directory
.Sp
.Vb 1
\&    rar x docs.rar *.txt c:\edocs\e
.Ve
.Sp
3) extract the entire contents of docs.rar to current directory
.Sp
.Vb 1
\&    rar x docs.rar
.Ve
.SH "SWITCHES"
.IX Header "SWITCHES"
\&\fIswitches\fR (used in conjunction with a \fIcommand\fR):
.IP "\fB\-?\fR" 4
.IX Item "-?"
Display help on commands and switches. The same as when none or an
illegal command line option is entered.
.IP "\fB\-\-\fR" 4
.IX Item "--"
Stop switches scanning
.Sp
This switch tells \fBrar\fR that there are no more switches in the command
line. It could be useful, if either archive or file name starts from '\-'
character. Without '\-\-' switch such a name would be treated as a switch.
.Sp
Example:
.Sp
add all files from the current directory to the solid archive
\&'\-StrangeName'
.Sp
.Vb 1
\&    rar a \-s \-\- \-StrangeName
.Ve
.IP "\fB\-@[+]\fR" 4
.IX Item "-@[+]"
Disable [enable] file lists
.Sp
\&\fBrar\fR treats command line parameters starting from '@' character as
file lists. So by default, \fBrar\fR attempts to read 'filename' filelist,
when encountering '@filename' parameter.  But if '@filename' file exists,
\&\fBrar\fR treats the parameter as '@filename' file instead of reading the
file list.
.Sp
Switch \-@[+] allows to avoid this ambiguity and strictly define how to
handle parameters starting from '@' character.
.Sp
If you specify \-@, all such parameters found after this switch will be
considered as file names, not file lists.
.Sp
If you specify \-@+, all such parameters found after this switch will be
considered as file lists, not file names.
.Sp
This switch does not affect processing parameters located before it.
.Sp
Example:
.Sp
test the archived file '@home'
.Sp
.Vb 1
\&    rar t \-@ notes.rar @home
.Ve
.IP "\fB\-ac\fR" 4
.IX Item "-ac"
Clear Archive attribute after compression or extraction (Windows version
only).
.Sp
If this switch is specified when archiving, \*(L"Archive\*(R" file attribute is
cleared for successfully compressed files.  When extracting, this switch
will clear \*(L"Archive\*(R" attribute for extracted files.
.IP "\fB\-ad\fR" 4
.IX Item "-ad"
Append archive name to destination path.
.Sp
This option may be useful when unpacking a group of archives.  By default
\&\fBrar\fR places files from all archives in the same directory, but this
switch creates a separate directory for files unpacked from each archive.
.Sp
Example:
.Sp
.Vb 1
\&    rar x \-ad *.rar data\e
.Ve
.Sp
\&\fBrar\fR will create subdirectories below 'data' for every unpacking
archive.
.IP "\fB\-ag\fR\fI[format]\fR" 4
.IX Item "-ag[format]"
Generate archive name using the current date and time.
.Sp
Appends the current date string to an archive name when creating or
processing an archive. Useful for daily backups.
.Sp
Format of the appending string is defined by the optional \*(L"format\*(R"
parameter or by \*(L"\s-1YYYYMMDDHHMMSS\*(R"\s0 if this parameter is absent. The format
string may include the following characters:
.Sp
\&\fBY\fR   \- year
.Sp
\&\fBM\fR   \- month
.Sp
\&\fB\s-1MMM\s0\fR \- month name as text string (Jan, Feb, etc.)
.Sp
\&\fBW\fR   \- a week number (a week starts with Monday)
.Sp
\&\fBA\fR   \- day of week number (Monday is 1, Sunday \- 7)
.Sp
\&\fBD\fR   \- day of month
.Sp
\&\fBE\fR   \- day of year
.Sp
\&\fBH\fR   \- hours
.Sp
\&\fBM\fR   \- minutes (treated as minutes if encountered after hours)
.Sp
\&\fBI\fR   \- minutes (treated as minutes regardless of hours position)
.Sp
\&\fBS\fR   \- seconds
.Sp
\&\fBN\fR   \- archive number. \fBrar\fR searches for already existing archive
with generated name and if found, increments the archive number until
generating a unique name. 'N' format character is not supported when
creating volumes.  When performing non-archiving operations like
extracting, \fBrar\fR selects the existing archive preceding the first
unused name or sets N to 1 if no such archive exists.
.Sp
Each of format string characters listed above represents only one
character added to archive name. For example, use \s-1WW\s0 for two digit week
number or \s-1YYYY\s0 to define four digit year.
.Sp
If the first character in the format string is '+', positions of the
date string and base archive name are exchanged, so a date will precede
an archive name.
.Sp
The format string may contain optional text enclosed in '{' and '}'
characters. This text is inserted into archive name.
.Sp
All other characters are added to an archive name without changes.
.Sp
If you need to process an already existing archive, be careful with \-ag
switch. Depending on the format string and time passed since previous
\&\-ag use, generated and existing archive names may mismatch. In this
case \fBrar\fR will create or open a new archive instead of processing the
already existing one. You may use \-log switch to write the generated
archive name to a file and then read it from file for further processing.
.Sp
Examples:
.Sp
1) use the default \s-1YYYYMMDDHHMMSS\s0 format
.Sp
.Vb 1
\&    rar a \-ag backup
.Ve
.Sp
2) use DD-MMM-YY format
.Sp
.Vb 1
\&    rar t \-agDD\-MMM\-YY backup
.Ve
.Sp
3) use \s-1YYYYMMDDHHMM\s0 format, place date before 'backup'
.Sp
.Vb 1
\&    rar a \-ag+YYYYMMDDHHMM backup
.Ve
.Sp
4) use YYYY-WW-A format, include fields description
.Sp
.Vb 1
\&    rar a \-agYYYY{year}\-WW{week}\-A{wday} backup
.Ve
.Sp
5) use \s-1YYYYMMDD\s0 and the archive number. It allows to generate unique
names even when \s-1YYYYMMDD\s0 format mask used more than once in the same day
.Sp
.Vb 1
\&    rar a \-agYYYYMMDD\-NN backup
.Ve
.IP "\fB\-ai\fR" 4
.IX Item "-ai"
Ignore file attributes.
.Sp
If this switch is used when extracting, \fBrar\fR does not set general file
attributes stored in archive to extracted files.  This switch preserves
attributes assigned by operating system to a newly created file.
.Sp
In Windows it affects archive, system, hidden and read-only attributes. in
Unix \- user, group, and others file permissions.
.IP "\fB\-ao\fR" 4
.IX Item "-ao"
Add files with Archive attribute set (Windows version only).
.Sp
Example:
.Sp
add all disk C: files with Archive attribute set to the 'f:backup'
and clear files Archive attribute
.Sp
.Vb 1
\&    rar a \-r \-ac \-ao f:backup c:\e*.*
.Ve
.IP "\fB\-ap\fR" 4
.IX Item "-ap"
Set path inside archive. This path is merged to file names when adding
files to an archive and removed from file names when extracting.
.Sp
For example, if you wish to add the file 'readme.txt' to the directory
\&'DOCS\eENG' of archive 'release', you may run:
.Sp
.Vb 1
\&    rar a \-apDOCS\eENG release readme.txt
.Ve
.Sp
or to extract '\s-1ENG\s0' to the current directory:
.Sp
.Vb 1
\&    rar x \-apDOCS release DOCS\eENG\e*.*
.Ve
.IP "\fB\-as\fR" 4
.IX Item "-as"
Synchronize archive contents
.Sp
If this switch is used when archiving, those archived files which are not
present in the list of the currently added files, will be deleted from
the archive. It is convenient to use this switch in combination with \-u
(update) to synchronize contents of an archive and an archiving directory.
.Sp
For example, after the command:
.Sp
.Vb 1
\&    rar a \-u \-as backup sources\e*.cpp
.Ve
.Sp
the archive 'backup.rar' will contain only *.cpp files from directory
\&'sources', all other files will be deleted from the archive. It looks
similar to creating a new archive, but with one important exception: if
no files are modified since the last backup, the operation is performed
much faster than the creation of a new archive.
.IP "\fB\-cfg\-\fR" 4
.IX Item "-cfg-"
Ignore configuration file and \s-1RAR\s0 environment variable.
.IP "\fB\-cl\fR" 4
.IX Item "-cl"
Convert file names to lower case.
.IP "\fB\-cu\fR" 4
.IX Item "-cu"
Convert file names to upper case.
.IP "\fB\-c\-\fR" 4
.IX Item "-c-"
Disable comments show.
.IP "\fB\-df\fR" 4
.IX Item "-df"
Delete files after archiving
.Sp
Move files to archive. This switch in combination with the command \*(L"A\*(R"
performs the same action as the command \*(L"M\*(R".
.IP "\fB\-dh\fR" 4
.IX Item "-dh"
Open shared files
.Sp
Allows to process files opened by other applications for writing.
.Sp
This switch helps if an application allowed read access to file, but if
all types of file access are prohibited, the file open operation will
still fail.
.Sp
This option could be dangerous, because it allows to archive a file, which
at the same time is modified by another application, so use it carefully.
.IP "\fB\-dr\fR" 4
.IX Item "-dr"
Delete files to Recycle Bin
.Sp
Delete files after archiving and place them to Recycle Bin.  Available in
Windows version only.
.IP "\fB\-ds\fR" 4
.IX Item "-ds"
Do not sort files while adding to a solid archive.
.IP "\fB\-dw\fR" 4
.IX Item "-dw"
Wipe files after archiving
.Sp
Delete files after archiving. Before deleting file data are overwritten
by zero bytes to prevent recovery of deleted files.
.Sp
Please be aware that such approach is designed for usual hard disks,
but may fail to overwrite the original file data on solid state disks,
as result of \s-1SSD\s0 wear leveling technology and more complicated data
addressing.
.IP "\fB\-ed\fR" 4
.IX Item "-ed"
Do not add empty directories
.Sp
This switch indicates that directory records are not to be stored in the
created archive. When extracting such archives, \fBrar\fR creates non-empty
directories based on paths of files contained in them. Information about
empty directories is lost. All attributes of non-empty directories except
a name (access rights, streams, etc.) will be lost as well, so use this
switch only if you do not need to preserve such information.
.Sp
If \-ed is used with 'm' command or \-df switch, \fBrar\fR will not remove
empty directories.
.IP "\fB\-ee\fR" 4
.IX Item "-ee"
Do not process extended attributes
.Sp
Disables saving and restoring extended file attributes.  Only for \s-1OS/2\s0
versions.
.IP "\fB\-en\fR" 4
.IX Item "-en"
Do not add \*(L"end of archive\*(R" block
.Sp
Not supported for \s-1RAR 5.0\s0 archives.
.Sp
By default, \fBrar\fR adds an \*(L"end of archive\*(R" block to the end of a new or
updated archive. It allows to skip external data like digital signatures
safely, but in some special cases it may be useful to disable this
feature. For example, if an archive is transferred between two systems
via an unreliable link and at the same time a sender adds new files to
it, it may be important to be sure that the already received file part
will not be modified on the other end between transfer sessions.
.Sp
This switch cannot be used with volumes, because the end of archive
block contains information important for correct volume processing.
.IP "\fB\-ep\fR" 4
.IX Item "-ep"
Exclude paths from names. This switch enables files to be added to an
archive without including the path information. This could, of course,
result in multiple files existing in the archive with the same name.
.IP "\fB\-ep1\fR" 4
.IX Item "-ep1"
Exclude base dir from names. Do not store the path entered in the
command line.
.Sp
Example:
.Sp
all files and directories from the directory tmp will be added to the
archive 'test', but the path in archived names will not include 'tmp\e'
.Sp
.Vb 1
\&    rar a \-ep1 \-r test tmp\e*
.Ve
.Sp
This is equivalent to the commands:
.Sp
.Vb 1
\&    cd tmp rar a \-r ..\etest cd ..
.Ve
.IP "\fB\-ep2\fR" 4
.IX Item "-ep2"
Expand paths to full. Store full file paths (except the drive letter
and leading path separator) when archiving.
.IP "\fB\-ep3\fR" 4
.IX Item "-ep3"
Expand paths to full including the drive letter.  Windows version only.
.Sp
This switch stores full file paths including the drive letter if used
when archiving. Drive separators (colons) are replaced by underscore
characters.
.Sp
If you use \-ep3 when extracting, it will change underscores back to
colons and create unpacked files in their original directories and
disks. If the user also specified a destination path, it will be ignored.
.Sp
It also converts \s-1UNC\s0 paths from \e\eserver\eshare to _\|_server\eshare when
archiving and restores them to the original state when extracting.
.Sp
This switch can help to backup several disks to the same archive. For
example, you may run:
.Sp
.Vb 1
\&    rar a \-ep3 \-r backup.rar c:\e d:\e e:\e
.Ve
.Sp
to create backup and:
.Sp
.Vb 1
\&    rar x \-ep3 backup.rar
.Ve
.Sp
to restore it.
.Sp
But be cautious and use \-ep3 only if you are sure that extracting archive
does not contain any malicious files.  In other words, use it if you
have created an archive yourself or completely trust its author. This
switch allows to overwrite any file in any location on your computer
including important system files and should normally be used only for
the purpose of backup and restore.
.IP "\fB\-e[+]\fR\fI<attr>\fR" 4
.IX Item "-e[+]<attr>"
Specifies file exclude or include attributes mask.
.Sp
<attr> is a number in the decimal, octal (with leading '0') or hex
(with leading '0x') format.
.Sp
By default, without '+' sign before <attr>, this switch defines the
exclude mask. So if result of bitwise \s-1AND\s0 between <attr> and file
attributes is nonzero, file would not be processed.
.Sp
If '+' sign is present, it specifies the include mask.  Only those files
which have at least one attribute specified in the mask will be processed.
.Sp
In Windows version is also possible to use symbols D, S, H, A and R
instead of a digital mask to denote directories and files with system,
hidden, archive and read-only attributes.  The order in which the
attributes are given is not significant.  Unix version supports D and
V symbols to define directory and device attributes.
.Sp
It is allowed to specify both \-e<attr> and \-e+<attr> in the same
command line.
.Sp
Examples:
.Sp
1) archive only directory names without their contents
.Sp
.Vb 1
\&    rar a \-r \-e+d dirs
.Ve
.Sp
2) do not compress system and hidden files:
.Sp
.Vb 1
\&    rar a \-esh files
.Ve
.Sp
3) do not extract read-only files:
.Sp
.Vb 1
\&    rar x \-er files
.Ve
.IP "\fB\-f\fR" 4
.IX Item "-f"
Freshen files. May be used with archive extraction or creation.
The command string \*(L"a \-f\*(R" is equivalent to the command 'f', you could
also use the switch '\-f' with the commands 'm' or 'mf'. If the switch
\&'\-f' is used with the commands 'x' or 'e', then only old files would be
replaced with new versions extracted from the archive.
.IP "\fB\-hp\fR\fI[p]\fR" 4
.IX Item "-hp[p]"
Encrypt both file data and headers.
.Sp
This switch is similar to \-p[p], but switch \-p encrypts only file
data and leaves other information like file names visible. This switch
encrypts all sensitive archive areas including file data, file names,
sizes, attributes, comments and other blocks, so it provides a higher
security level.  Without a password it is impossible to view even the
list of files in archive encrypted with \-hp.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-hpfGzq5yKw secret report.txt
.Ve
.Sp
will add the file report.txt to the encrypted archive secret.rar using
the password 'fGzq5yKw'
.IP "\fB\-ht[b|c]\fR" 4
.IX Item "-ht[b|c]"
Select hash type [\s-1BLAKE2,CRC32\s0] for file checksum.
.Sp
File data integrity in \s-1RAR\s0 archive is protected by checksums calculated
and stored for every archived file.
.Sp
By default, \fBrar\fR uses \s-1CRC32\s0 function to calculate the checksum.
\&\s-1RAR 5.0\s0 archive format also allows to select BLAKE2sp hash function
instead of \s-1CRC32.\s0
.Sp
Specify \-htb switch for BLAKE2sp and \-htc for \s-1CRC32\s0 hash function.
Since \s-1CRC32\s0 is the default algorithm, you may need \-htc only to override
\&\-htb in \fBrar\fR configuration.
.Sp
\&\s-1CRC32\s0 output is 32 bit length. While \s-1CRC32\s0 properties are suitable to
detect most of unintentional data errors, it is not reliable enough to
verify file data identity.  In other words, if two files have the same
\&\s-1CRC32,\s0 it does not guarantee that file contents is the same.
.Sp
BLAKE2sp output is 256 bit. Being a cryptographically strong hash
function, it practically guarantees that if two files have the same
value of BLAKE2sp, their contents is the same.  BLAKE2sp error detection
property is also more reliable than in shorter \s-1CRC32.\s0
.Sp
Since BLAKE2sp output is longer, resulting archive is slightly larger
for \-htb switch.
.Sp
If archive headers are unencrypted (no switch \-hp), checksums
for encrypted \s-1RAR 5.0\s0 files are modified using a special password
dependent algorithm, to make impossible guessing file contents based on
checksums. Do not expect such encrypted file checksums to match usual
\&\s-1CRC32\s0 and BLAKE2sp values.
.Sp
This switch is supported only by \s-1RAR 5.0\s0 format, so you need to use \-ma
switch with it.
.Sp
You can see checksums of archived files using 'vt' or 'lt' commands.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-ma \-htb lists.rar *.lst
.Ve
.Sp
will add *.lst to lists.rar using BLAKE2sp for file checksums.
.IP "\fB\-id[c,d,p,q]\fR" 4
.IX Item "-id[c,d,p,q]"
Disable messages.
.Sp
Switch \-idc disables the copyright string.
.Sp
Switch \-idd disables \*(L"Done\*(R" string at the end of operation.
.Sp
Switch \-idp disables the percentage indicator.
.Sp
Switch \-idq turns on the quiet mode, so only error messages and questions
are displayed.
.Sp
It is allowed to use several modifiers at once, so switch \-idcdp is
correct.
.IP "\fB\-ieml[.]\fR\fI[addr]\fR" 4
.IX Item "-ieml[.][addr]"
Send archive by email. Windows version only.
.Sp
Attach an archive created or updated by the add command to email
message. You need to have a \s-1MAPI\s0 compliant email client to use this switch
(most modern email programs support \s-1MAPI\s0 interface).
.Sp
You may enter a destination email address directly in the switch or
leave it blank. In the latter case you will be asked for it by your email
program. It is possible to specify several addresses separated by commas
or semicolons.
.Sp
If you append a dot character to \-ieml, an archive will be deleted after
it was successfully attached to an email.  If the switch is used when
creating a multivolume archive, every volume is attached to a separate
email message.
.IP "\fB\-ierr\fR" 4
.IX Item "-ierr"
Send all messages to stderr.
.IP "\fB\-ilog\fR\fI[name]\fR" 4
.IX Item "-ilog[name]"
Log errors to file (registered version only).
.Sp
Write error messages to rar.log file. If optional 'name' parameter is
not specified, the log file is created using the following defaults:
.Sp
Unix:    \fI.rarlog\fR file in the user's home directory;
.Sp
Windows: \fIrar.log\fR file in \f(CW%APPDATA\fR%\eWinRAR directory.
.Sp
If 'name' parameter includes a file name without path, \fBrar\fR will
create the log file in the default directory mentioned above using the
specified name. Include both path and name to 'name' parameter if you
wish to change the location of log file.
.Sp
By default, log file uses \s-1UTF\-16\s0 little endian encoding, but it can
be changed with \-sc<charset>g switch, such as \-scag for native single
byte encoding.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-ilogc:\elog\ebackup.log backup d:\edocs
.Ve
.Sp
will create c:\elog\ebackup.log log file in case of errors.
.IP "\fB\-inul\fR" 4
.IX Item "-inul"
Disable all messages.
.IP "\fB\-ioff\fR" 4
.IX Item "-ioff"
Turn \s-1PC\s0 off after completing an operation. The hardware must support
the power off feature. Windows version only.
.IP "\fB\-isnd\fR" 4
.IX Item "-isnd"
Enable sound.
.IP "\fB\-k\fR" 4
.IX Item "-k"
Lock archive. Any command which intends to change the archive will
be ignored.
.IP "\fB\-kb\fR" 4
.IX Item "-kb"
Keep broken extracted files.
.Sp
\&\fBrar\fR, by default, deletes files with checksum errors after
extraction. The switch \-kb specifies that files with checksum errors
should not be deleted.
.IP "\fB\-log\fR\fI[fmt][=name]\fR" 4
.IX Item "-log[fmt][=name]"
Write names to log file.
.Sp
This switch allows to write archive and file names to specified text file
in archiving, extracting, deleting and listing commands.  Its behavior
is defined by 'fmt' string, which can include one or more of following
characters:
.Sp
\&\fBA\fR \- write archive names to log file. If \fBrar\fR creates or processes
volumes, all volume names are logged.
.Sp
\&\fBF\fR \- write processed file names to log file. It includes files added to
archive and extracted, deleted or listed files inside of archive.
.Sp
\&\fBP\fR \- if log file with specified name is exist, append data to existing
file instead of creating a new one.
.Sp
\&\fBU\fR \- write data in Unicode format.
.Sp
If neither 'A' nor 'F' are specified, 'A' is assumed.
.Sp
\&'name' parameter allows to specify the name of log file.  It must be
separated from 'fmt' string by '=' character.  If 'name' is not present,
\&\fBrar\fR will use the default rarinfo.log file name.
.Sp
It is allowed to specify several \-log switches in the same command line.
.Sp
This switch can be particularly useful, when you need to process
an archive created with \-ag or \-v switches in a batch script.
You can specify \-loga=arcname.txt when creating an archive and then
read an archive name generated by \fBrar\fR from arcname.txt with an
appropriate command. For example, in Windows batch file it can be:
set /p name=<arcname.txt.
.Sp
Examples:
.Sp
1) write names of created volumes to vollist.txt:
.Sp
.Vb 1
\&    rar a \-v100m \-loga=vollist.txt volume.rar c:\edata
.Ve
.Sp
2) write the generated archive name to backup.txt in Unicode:
.Sp
.Vb 1
\&    rar a \-ag \-logau=backup.txt backup.rar myfiles\e*
.Ve
.Sp
3) write names of tested volumes to vollist.txt and names of tested
archived files inside of volumes to filelist.txt:
.Sp
.Vb 1
\&    rar t \-log=vollist.txt \-logf=filelist.txt volume.part01.rar
.Ve
.IP "\fB\-m\fR\fI<n>\fR" 4
.IX Item "-m<n>"
Set compression method:
.Sp
\&\fB\-m0\fR   store     do not compress file when adding to archive
.Sp
\&\fB\-m1\fR   fastest   use fastest method (less compressive)
.Sp
\&\fB\-m2\fR   fast      use fast compression method
.Sp
\&\fB\-m3\fR   normal    use normal (default) compression method
.Sp
\&\fB\-m4\fR   good      use good compression method (more compressive, but
slower)
.Sp
\&\fB\-m5\fR   best      use best compression method (slightly more compressive,
but slowest)
.Sp
If this switch is not specified, \fBrar\fR uses \-m3 method (normal
compression).
.IP "\fB\-ma[4|5]\fR" 4
.IX Item "-ma[4|5]"
Specify a version of archiving format.
.Sp
By default \fBrar\fR creates archives in \s-1RAR 4\s0.x format.  Use \-ma5 or just
\&\-ma to create \s-1RAR 5.0\s0 archives.  Use \-ma4 in case you need to override
\&\-ma5 saved in configuration and force \fBrar\fR to use \s-1RAR 4\s0.x format.
.Sp
This switch is used only when creating a new archive.  It is ignored
when updating an existing archive.
.IP "\fB\-mc\fR\fI<par>\fR" 4
.IX Item "-mc<par>"
Set advanced compression parameters.
.Sp
This switch is intended mainly for benchmarking and experiments. In the
real environment it is usually better to allow \fBrar\fR to select optimal
parameters automatically.  Please note that improper use of this switch
may lead to very serious performance and compression loss, so use it
only if you clearly understand what you do.
.Sp
It has the following syntax:
.Sp
.Vb 1
\&    \-mc[param1][:param2][module][+ or \-]
.Ve
.Sp
where <module> is the one character field denoting a part of the
compression algorithm, which has to be configured.
.Sp
It may have the following values:
.Sp
\&\fBA\fR \- audio compression;
.Sp
\&\fBC\fR \- true color (\s-1RGB\s0) data compression;
.Sp
\&\fBD\fR \- delta compression;
.Sp
\&\fBE\fR \- 32\-bit x86 executables compression;
.Sp
\&\fBI\fR \- 64\-bit Intel Itanium executables compression;
.Sp
\&\fBT\fR \- text compression.
.Sp
\&\s-1RAR 5.0\s0 archive format supports only 'D' and 'E' values.
.Sp
\&'+' sign at the end of switch applies the selected algorithm module
to all processed data, '\-' disables the module at all.  If no sign is
specified, \fBrar\fR will choose modules automatically, based on data and
the current compression method.
.Sp
Switch \-mc\- disables all optional modules and allows only the general
compression algorithm.
.Sp
<Param1> and <Param2> are module dependent parameters described below.
.Sp
Audio compression, delta compression:
.Sp
<Param1> is a number of byte channels (can be 1 \- 31).  \fBrar\fR splits
multibyte channels to bytes, for example, two 16\-bit audio channels are
considered by \fBrar\fR as four channels one byte each.
.Sp
<Param2> is ignored.
.Sp
32\-bit x86 Intel executables compression, 64\-bit Intel Itanium executables
compression, true color (\s-1RGB\s0) data compression:
.Sp
<Param1> and <Param2> are ignored.
.Sp
Text compression:
.Sp
Text compression algorithm provides noticeably higher compression on plain
text data. But it cannot utilize several \s-1CPU\s0 cores efficiently resulting
in slower compression time comparing to general algorithm in multicore
and multiprocessor environment.  Also its decompression speed is much
slower than in general algorithm regardless of \s-1CPU\s0 cores number. This
is why the text compression is disabled by default. You can specify \-mct
switch to allow \s-1RAR\s0 to select this algorithm automatically for suitable
data. Switch \-mct+ will force use of the text compression for all data.
.Sp
Switch \-mct can also include <Param1> and <Param2>, so its full syntax
is \-mc[param1][:param2]t[+ or \-].
.Sp
<Param1> is the order of \s-1PPM\s0 algorithm (can be 2 \- 63).  Usually a higher
value slightly increases the compression ratio of redundant data, but
only if enough memory is available to \s-1PPM.\s0 In case of lack of memory the
result may be negative.  Higher order values decrease both compression
and decompression speed.
.Sp
<Param2> is memory in megabytes allocated for \s-1PPM \s0(1\-128).  Higher values
may increase the compression ratio, but note that \s-1PPM\s0 uses the equal
memory size both to compress and decompress, so if you allocate too much
memory when creating an archive, other people may have problems when
decompressing it on a computer with less memory installed. Decompression
will be still possible using virtual memory, but it may become very slow.
.Sp
Examples:
.Sp
1) switch \-mc1a+ forces use of 8\-bit mono audio compression for all data.
.Sp
2) switch \-mc10:40t+ forces use of text compression algorithm for all
data, sets the compression order to 10 and allocates 40 \s-1MB\s0 memory.
.Sp
3) switch \-mc12t sets the text compression order to 12, when the text
compression is used, but leaves to \s-1RAR\s0 to decide when to use it.
.Sp
4) switches \-mct \-mcd\- allow \s-1RAR\s0 to apply the text compression to suitable
data and disable the delta compression.
.IP "\fB\-md\fR\fI<n>\fR\fB[k,m,g]\fR" 4
.IX Item "-md<n>[k,m,g]"
Select the dictionary size.
.Sp
Sliding dictionary is the memory area used by compression algorithm
to find and compress repeated data patterns.  If size of file being
compressed (or total files size in case of solid archive) is larger
than dictionary size, increasing the dictionary is likely to increase
the compression ratio, reduce the archiving speed and increase memory
requirements.
.Sp
For \s-1RAR 4\s0.x archive format the dictionary size can be: 64 \s-1KB, 128 KB,
256 KB, 512 KB, 1 MB, 2 MB, 4 MB.\s0
.Sp
For \s-1RAR 5.0\s0 archive format the dictionary size can be: 128 \s-1KB, 256 KB,
512 KB, 1 MB, 2 MB, 4 MB, 8 MB, 16 MB, 32 MB, 64 MB, 128 MB, 256 MB,
512 MB, 1 GB.\s0
.Sp
You can use 'k', 'm' and 'g' modifiers to specify the size in kilo\-,
mega\- and gigabytes, like \-md64m for 64 \s-1MB\s0 dictionary.  If no modifier
is specified, megabytes are assumed, so \-md64m and \-md64 are equal.
.Sp
When archiving, \fBrar\fR needs about 6x memory of specified dictionary
size, so 512 \s-1MB\s0 and 1 \s-1GB\s0 sizes are available in 64 bit \fBrar\fR version
only. When extracting, slightly more than a single dictionary size is
allocated, so both 32 and 64 bit versions can unpack archives with all
dictionaries up to and including 1 \s-1GB.\s0
.Sp
\&\fBrar\fR can reduce the dictionary size if it is significantly larger
than source data size. It helps to reduce memory requirements without
decreasing compression.
.Sp
Default sliding dictionary size is 4 \s-1MB\s0 for \s-1RAR 4\s0.x and 32 \s-1MB\s0 for \s-1RAR
5.0\s0 archive format.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-s \-ma \-md128 lib *.dll
.Ve
.Sp
create a solid archive in \s-1RAR 5.0\s0 format with 128 \s-1MB\s0 dictionary.
.IP "\fB\-ms\fR\fI[list]\fR" 4
.IX Item "-ms[list]"
Specify file types to store.
.Sp
Specify file types, which will be stored without compression.  This switch
may be used to store already compressed files, which helps to increase
archiving speed without noticeable loss in the compression ratio.
.Sp
Optional <list> parameter defines the list of file extensions separated by
semicolons. For example, \-msrar;zip;jpg will force \fBrar\fR to store without
compression all \s-1RAR\s0 and \s-1ZIP\s0 archives and \s-1JPG\s0 images. It is also allowed
to specify wildcard file masks in the list, so \-ms*.rar;*.zip;*.jpg will
work too.  Several \-ms switches are permitted, such as \-msrar \-mszip
instead of \-msrar;zip.
.Sp
In Unix \-ms switch containing several file types needs to be enclosed in
quote marks. It protects semicolons from processing by Unix shell. Another
solution is to use individual \-ms<type> switches for every file type.
.Sp
If <list> is not specified, \-ms switch will use the default set of
extensions, which includes the following file types:
.Sp
7z, ace, arj, bz2, cab, gz, jpeg, jpg, lha, lzh, mp3, rar, taz, tgz,
xz, z, zip
.IP "\fB\-mt\fR\fI<threads>\fR" 4
.IX Item "-mt<threads>"
Set the number of threads.
.Sp
<threads> parameter can take values from 1 to 32.  It defines the
recommended maximum number of active threads for compression algorithm
also as for other \fBrar\fR modules, which can start several threads. While
\&\fBrar\fR attempts to follow this recommendation, sometimes the real number
of active threads can exceed the specified value.
.Sp
Change of <threads> parameter slightly affects the compression ratio,
so archives created with different \-mt switches will not be exactly the
same even if all other compression settings are equal.
.Sp
If \-mt switch is not specified, \fBrar\fR will try to detect the number
of available processors and select the optimal number of threads
automatically.
.IP "\fB\-n\fR\fI<f>\fR" 4
.IX Item "-n<f>"
Additionally filter included files.
.Sp
Apply the mask as an additional filter to included file list.  Wildcards
can be used both in the name and file parts of file mask. You can specify
the switch '\-n' several times.
.Sp
This switch does not replace usual file masks, which still need to
be entered in the command line. It is an additional filter limiting
processed files only to those matching the include mask specified in \-n
switch. It can help to reduce the command line length sometimes.
.Sp
For example, if you need to compress all *.txt and *.lst files in
directories Project and Info, you can enter:
.Sp
.Vb 1
\&    rar a \-r text Project\e*.txt Project\e*.lst Info\e*.txt Info\e*.lst
.Ve
.Sp
or using the switch \-n:
.Sp
.Vb 1
\&    rar a \-r \-n*.txt \-n*.lst text Project Info
.Ve
.IP "\fB\-n\fR\fI@<lf>\fR" 4
.IX Item "-n@<lf>"
Read additional filter masks from list file.
.Sp
Similar to \-n<f> switch, but reads filter masks from the list file. If
you use \-n@ without the list file name parameter, it will read filter
masks from stdin.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-r \-n@inclist.txt text Project Info
.Ve
.IP "\fB\-oc\fR" 4
.IX Item "-oc"
Set \s-1NTFS\s0 Compressed attribute. Windows version only.
.Sp
This switch allows to restore \s-1NTFS\s0 Compressed attribute when extracting
files. \fBrar\fR saves Compressed file attributes when creating an archive,
but does not restore them unless \-oc switch is specified.
.IP "\fB\-oh\fR" 4
.IX Item "-oh"
Save hard links as the link instead of the file.
.Sp
If archiving files include several hard links, store the first archived
hard link as usual file and the rest of hard links in the same set as
links to this first file. When extracting such files, \fBrar\fR will create
hard links instead of usual files.
.Sp
You must not delete or rename the first hard link in archive after the
archive was created, because it will make extraction of following links
impossible. If you modify the first link, all following links will also
have the modified contents after extracting. Extraction command must
involve the first hard link to create following hard links successfully.
.Sp
This switch is supported only by \s-1RAR 5.0\s0 format, so you need to use \-ma
switch with it.
.IP "\fB\-oi\fR\fI[0\-4][:<minsize>]\fR" 4
.IX Item "-oi[0-4][:<minsize>]"
Save identical files as references.
.Sp
Switch \-oi0 (or just \-oi\-) turns off identical file processing, so such
files are compressed as usual files. It can be used to override another
\&\-oi value stored in \fBrar\fR configuration.
.Sp
If \-oi1 (or just \-oi) is specified, \fBrar\fR analyzes the file contents
before starting archiving. If several identical files are found, the
first file in the set is saved as usual file and all following files are
saved as references to this first file. It allows to reduce the archive
size, but applies some restrictions to resulting archive. You must not
delete or rename the first identical file in archive after the archive
was created, because it will make extraction of following files using it
as a reference impossible. If you modify the first file, following files
will also have the modified contents after extracting. Extraction command
must involve the first file to create following files successfully.
.Sp
It is recommended to use \-oi only if you compress a lot of identical
files, will not modify an archive later and will extract an archive
entirely, without necessity to unpack or skip individual files. If
all identical files are small enough to fit into compression dictionary
specified with \-md<n> switch, switch \-s can provide more flexible solution
than \-oi.
.Sp
Switch \-oi2 is similar to \-oi1, with the only difference: it will display
names of found identical files before starting archiving.
.Sp
Switches \-oi3 and \-oi4 allow to utilize \fBrar\fR to generate lists of
identical files. Though you still need to provide a dummy archive name
to make the command syntax valid, in this mode an archive is not created
and nothing is compressed.  If \-oi3 is used, file sizes and names are
displayed and every identical file group is separated with empty line.
Switch \-oi4 displays bare file names and skips the first identical file
in every file group, so only duplicates are listed.
.Sp
Optional <minsize> value allows to define the minimum file size
threshold. Files smaller than <minsize> are not analyzed and not
considered as identical. If this parameter is not present, it is assumed
to be 64 \s-1KB\s0 by default. Selecting too small <minsize> may increase the
time required to detect identical files.
.Sp
Switches \-oi1 and \-oi2 are supported only by \s-1RAR 5.0\s0 format, so you need
to use \-ma switch with it.
.Sp
Examples:
.Sp
.Vb 1
\&    rar a \-oi \-ma archive
.Ve
.Sp
Save contents of current directory to archive.rar.  Store identical
files as references.
.Sp
.Vb 1
\&    rar a \-oi3:1000000 \-r dummy c:\ephoto\e*.jpg
.Ve
.Sp
List all duplicate *.jpg files lather than 1000000 bytes found in c:\ephoto
and its subdirectories.
.IP "\fB\-ol\fR" 4
.IX Item "-ol"
Save symbolic links as the link instead of the file.
.Sp
Save symbolic links as links, so file contents is not archived.
In Windows version it also saves reparse points as links.  Such archive
entries are restored as symbolic links or reparse points when extracting.
.Sp
Supported both for \s-1RAR 4\s0.x and \s-1RAR 5.0\s0 archives in \fBrar\fR for Unix and
only for \s-1RAR 5.0\s0 archives in \fBrar\fR for Windows.
.Sp
In Windows you may need to run \fBrar\fR as administrator to create symbolic
links when extracting.
.IP "\fB\-or\fR" 4
.IX Item "-or"
Rename extracted files automatically if file with the same name already
exists. Renamed file will get the name like 'filename(N).txt', where
\&'filename.txt' is the original file name and 'N' is a number starting
from 1 and incrementing if file exists.
.IP "\fB\-os\fR" 4
.IX Item "-os"
Save \s-1NTFS\s0 streams. Windows version only.
.Sp
This switch has meaning only for \s-1NTFS\s0 file system and allows to save
alternative data streams associated with a file.  You may need to specify
it when archiving if you use software storing data in alternative streams
and wish to preserve these streams.
.Sp
Streams are not saved for \s-1NTFS\s0 encrypted files.
.IP "\fB\-ow\fR" 4
.IX Item "-ow"
Use this switch when archiving to save file security information and
when extracting to restore it.
.Sp
Unix \fBrar\fR version saves file owner and group when using this switch.
.Sp
Windows version stores owner, group, file permissions and audit
information, but only if you have necessary privileges to read them. Note
that only \s-1NTFS\s0 file system supports file based security under Windows.
.IP "\fB\-o[+|\-]\fR" 4
.IX Item "-o[+|-]"
Set the overwrite mode. Can be used both when extracting and updating
archived files. Following modes are available:
.Sp
\&\fB\-o\fR    Ask before overwrite (default for extracting files);
.Sp
\&\fB\-o+\fR   Overwrite all (default for updating archived files);
.Sp
\&\fB\-o\-\fR   Skip existing files.
.IP "\fB\-p\fR\fI[p]\fR" 4
.IX Item "-p[p]"
Encrypt files with the string <p> as password while archiving.
The password is case-sensitive. If you omit the password on the command
line, you will be prompted with message \*(L"Enter password\*(R".
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-pmyhoney secret1 *.txt
.Ve
.Sp
add files *.txt and encrypt them with password \*(L"myhoney\*(R".
.IP "\fB\-p\-\fR" 4
.IX Item "-p-"
Do not query password
.Sp
Do not query password for encrypted files when extracting.  Actually you
can specify any invalid password to suppress the password prompt and
force \fBrar\fR to issue 'incorrect password' message when extracting an
encrypted file. This switch just sets '\-' as a password.
.IP "\fB\-qo[\-|+]\fR" 4
.IX Item "-qo[-|+]"
Add quick open information [none|force]
.Sp
\&\s-1RAR\s0 archives store every file header containing information such as file
name, time, size and attributes immediately before data of described
file. This approach is more damage resistant than storing all file headers
in a single continuous block, which if broken or truncated would destroy
the entire archive contents. But while being more reliable, such file
headers scattered around the entire archive are slower to access if
we need to quickly open the archive contents in a shell like WinRAR
graphical interface.
.Sp
To improve archive open speed and still not make the entire archive
dependent on a single damaged block, \s-1RAR 5.0\s0 archives can include an
optional quick open record. Such record is added to the end of archive
and contains copies of file names and other file information stored in
a single continuous block additionaly to normal file headers inside of
archive.  Since the block is continuous, its contents can be read quickly,
without necessity to perform a lot of disk seek operations.  Every file
header in this block is protected with a checksum.  If \fBrar\fR detects
that quick open information is damaged, it resorts to reading individual
headers from inside of archive, so damage resistance is not lessened.
.Sp
Quick open record contains the full copy of file header, which may be
several tens or hundreds of bytes per file, increasing the archive size
by the same amount. This size increase is most noticeable for many small
files, when file data size is comparable to file header. So by default,
if no \-qo is specified or \-qo without parameter is used, \fBrar\fR stores
copies of headers only for relatively large files and continues to
use local headers for smaller files.  Concrete file size threshold can
depend on \s-1RAR\s0 version.  Such approach provides a reasonable open speed
to archive size tradeoff. If you prefer to have the maximum archive
open speed regardless of size, you can use \-qo+ to store copies of all
file headers. If you need to have the smallest possible archive and do
not care about archive open speed in different programs, specify \-qo\-
to exclude the quick open information completely.
.Sp
If you wish to measure the performance effect of this switch, be sure
that archive contents is not stored in a disk cache.  No real disk seeks
are performed for cached archive file, making access to file headers
fast even without quick open record.
.IP "\fB\-r\fR" 4
.IX Item "-r"
Recurse subdirectories. May be used with commands: a, u, f, m, x, e, t,
p, v, l, c, cf and s.
.Sp
When used with the commands 'a', 'u', 'f', 'm' will process files in
all sub-directories as well as the current working directory.
.Sp
When used with the commands x, e, t, p, v, l, c, cf or s will process
all archives in sub-directories as well as the current working directory.
.IP "\fB\-r\-\fR" 4
.IX Item "-r-"
Disable recursion.
.Sp
Even without \-r switch \fBrar\fR can enable the recursion automatically in
some situations. Switch \-r\- prohibits it.
.Sp
If you specify a directory name when archiving and if such name does
not include wildcards, by default \fBrar\fR adds the directory contents
even if switch \-r is not specified.  Also \fBrar\fR automatically enables
the recursion if disk root without wildcards is specified as a file
mask. Switch \-r\- disables such behavior.
.Sp
For example:
.Sp
.Vb 1
\&    rar a \-r\- arc dirname
.Ve
.Sp
command will add only the empty 'dirname' directory and ignore its
contents. Following command:
.Sp
.Vb 1
\&    rar a \-r\- arc c:\e
.Ve
.Sp
will compress contents of root c: directory only and will not recurse
into subdirectories.
.IP "\fB\-r0\fR" 4
.IX Item "-r0"
Similar to \-r, but when used with the commands 'a', 'u', 'f', 'm' will
recurse into subdirectories only for those file masks, which include
wildcard characters '*' and '?'.
.Sp
This switch works only for file names. Directory names without a file
name part, such as 'dirname', are not affected by \-r0 and their contents
is added to archive completely unless \-r\- switch is specified.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-r0 docs.rar *.doc readme.txt
.Ve
.Sp
add *.doc files from the current directory and its subdirectories and
readme.txt only from the current directory to docs.rar archive. In case of
usual \-r switch, \fBrar\fR would search for readme.txt in subdirectories too.
.IP "\fB\-ri\fR\fI<p>[:<s>]\fR" 4
.IX Item "-ri<p>[:<s>]"
Set priority and sleep time. Available only in \fBrar\fR for Windows.
This switch regulates system load by \fBrar\fR in multitasking
environment. Possible task priority <p> values are 0 \- 15.
.Sp
If <p> is 0, \fBrar\fR uses the default task priority.  <p> equal to 1 sets
the lowest possible priority, 15 \- the highest possible.
.Sp
Sleep time <s> is a value from 0 to 1000 (milliseconds).  This is a
period of time that \fBrar\fR gives back to the system after every read
or write operation while compressing or extracting. Non-zero <s> may be
useful if you need to reduce system load even more than can be achieved
with <p> parameter.
.Sp
Example:
.Sp
execute \fBrar\fR with default priority and 10 ms sleep time:
.Sp
.Vb 1
\&    rar a \-ri0:10 backup *.*
.Ve
.IP "\fB\-rr\fR\fI[N]\fR" 4
.IX Item "-rr[N]"
Add data recovery record. This switch is used when creating or modifying
an archive to add a data recovery record to the archive. See the 'rr[N]'
command description for details.
.IP "\fB\-rv\fR\fI[N]\fR" 4
.IX Item "-rv[N]"
Create recovery volumes. This switch is used when creating a multivolume
archive to generate recovery volumes.  See the 'rv[N]' command description
for details.
.IP "\fB\-s\fR" 4
.IX Item "-s"
Create solid archive. A solid archive is an archive packed by a special
compression method, which treats several or all files, within the archive,
as one continuous data stream.
.Sp
Solid archiving significantly increases compression, when adding a
large number of small, similar files. But it also has a few important
disadvantages: slower updating of existing solid archives, slower access
to individual files, lower damage resistance.
.Sp
Usually files in a solid archive are sorted by extension.  But it is
possible to disable sorting with \-ds switch or set an alternative file
order using a special file, \fIrarfiles.lst\fR.
.Sp
Example:
.Sp
create solid archive sources.rar with 512 \s-1KB\s0 dictionary, recursing all
directories, starting with the current directory.  Add only .asm files:
.Sp
.Vb 1
\&    rar a \-s \-md512 sources.rar *.asm \-r
.Ve
.IP "\fB\-s\fR\fIN\fR" 4
.IX Item "-sN"
Create solid groups using file count
.Sp
Similar to \-s, but resets solid statistics after compressing <N>
files. Usually decreases compression, but also decreases losses in case
of solid archive damages.
.IP "\fB\-sc\fR\fI<charset>[objects]\fR" 4
.IX Item "-sc<charset>[objects]"
Specify the character set for list files, log files and archive comment
files.
.Sp
\&'Charset' parameter is mandatory and can have one of the following values:
.Sp
\&\fBU\fR \- Unicode;
.Sp
\&\fBA\fR \- the native single byte encoding, which is \s-1ANSI\s0 for Windows version;
.Sp
\&\fBO\fR \- \s-1OEM \s0(\s-1DOS\s0) encoding. Windows version only.
.Sp
Files in Unicode format must have \s-1FFFE\s0 or \s-1FEFF\s0 Unicode character in the
beginning, otherwise \fBrar\fR will ignore this switch and process the file
as \s-1ASCII\s0 text.
.Sp
\&'Objects' parameter is optional and can have one of the following values:
.Sp
\&\fBG\fR \- log files produced by \-ilog switch;
.Sp
\&\fBL\fR \- list files;
.Sp
\&\fBC\fR \- comment files.
.Sp
It is allowed to specify more than one object, for example, \-scolc. If
\&'objects' parameter is missing, 'charset' is applied to all objects.
.Sp
This switch allows to specify the character set for files in \-z[file]
switch, list files and comment files written by \*(L"cw\*(R" command.
.Sp
Examples:
.Sp
.Vb 1
\&    rar a \-scol data @list
.Ve
.Sp
Read names contained in 'list' using \s-1OEM\s0 encoding.
.Sp
.Vb 1
\&    rar c \-scuc \-zcomment.txt data
.Ve
.Sp
Read comment.txt as Unicode file.
.Sp
.Vb 1
\&    rar cw \-scuc data comment.txt
.Ve
.Sp
Write comment.txt as Unicode file.
.IP "\fB\-se\fR" 4
.IX Item "-se"
Create solid groups using extension
.Sp
Similar to \-s, but resets solid statistics if file extension is
changed. Usually decreases compression, but also decreases losses from
solid archive damages.
.IP "\fB\-sfx\fR\fI[name]\fR" 4
.IX Item "-sfx[name]"
Create \s-1SFX\s0 archives. If this switch is used when creating a new archive,
a Self-Extracting archive (using a module in file \fIdefault.sfx\fR or
specified in the switch) would be created.  In the Windows version
\&\fIdefault.sfx\fR should be placed in the same directory as the rar.exe, in
Unix \- in the user's home directory, in /usr/lib or /usr/local/lib.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-sfxwincon.sfx myinst
.Ve
.Sp
create SelF-eXtracting (\s-1SFX\s0) archive using wincon.sfx SFX-module.
.IP "\fB\-si\fR\fI[name]\fR" 4
.IX Item "-si[name]"
Read data from stdin (standard input), when creating an archive. Optional
\&'name' parameter allows to specify a file name of compressed stdin data
in the created archive. If this parameter is missing, the name will be
set to 'stdin'. This switch cannot be used with \-v.
.Sp
Example:
.Sp
.Vb 1
\&    type Tree.Far | rar a \-siTree.Far tree.rar
.Ve
.Sp
will compress 'type Tree.Far' output as 'Tree.Far' file.
.IP "\fB\-sl\fR\fI<size>\fR" 4
.IX Item "-sl<size>"
Process only those files, which size is less than specified in <size>
parameter of this switch.  Parameter <size> must be specified in bytes.
.IP "\fB\-sm\fR\fI<size>\fR" 4
.IX Item "-sm<size>"
Process only those files, which size is more than specified in <size>
parameter of this switch.  Parameter <size> must be specified in bytes.
.IP "\fB\-sv\fR" 4
.IX Item "-sv"
Create independent solid volumes
.Sp
By default \fBrar\fR tries to reset solid statistics as soon as possible
when starting a new volume, but only if enough data was packed after a
previous reset (at least a few megabytes).
.Sp
This switch forces \fBrar\fR to ignore packed data size and attempt to
reset statistics for volumes of any size. It decreases compression,
but increases chances to extract a part of data if one of several solid
volumes in a volume set was lost or damaged.
.Sp
Note that sometimes \fBrar\fR cannot reset statistics even using this
switch. For example, it cannot be done when compressing one large file
split between several volumes.  \fBrar\fR is able to reset solid statistics
only between separate files, but not inside of single file.
.Sp
Ignored if used when creating a non-volume archive.
.IP "\fB\-sv\-\fR" 4
.IX Item "-sv-"
Create dependent solid volumes
.Sp
Disables to reset solid statistics between volumes.
.Sp
It slightly increases compression, but significantly reduces chances to
extract a part of data if one of several solid volumes in a volume set
was lost or damaged.
.Sp
Ignored if used when creating a non-volume archive.
.IP "\fB\-s\-\fR" 4
.IX Item "-s-"
Disable solid archiving
.IP "\fB\-t\fR" 4
.IX Item "-t"
Test files after archiving. This switch is especially useful in
combination with the move command, so files will be deleted only if the
archive had been successfully tested.
.IP "\fB\-ta\fR\fI<date>\fR" 4
.IX Item "-ta<date>"
Process only files modified after the specified date.
.Sp
Format of the date string is \s-1YYYYMMDDHHMMSS. \s0 It is allowed to insert
separators like '\-' or ':' to the date string and omit trailing
fields. For example, the following switch is correct: \-ta2001\-11\-20
Internally it will be expanded to \-ta20011120000000 and treated as
\&\*(L"files modified after 0 hour 0 minutes 0 seconds of 20 November 2001\*(R".
.IP "\fB\-tb\fR\fI<date>\fR" 4
.IX Item "-tb<date>"
Process only files modified before the specified date.  Format of the
switch is the same as \-ta<date>.
.IP "\fB\-tk\fR" 4
.IX Item "-tk"
Keep original archive date. Prevents \s-1RAR\s0 from modifying the archive date
when changing an archive.
.IP "\fB\-tl\fR" 4
.IX Item "-tl"
Set archive time to newest file. Forces \s-1RAR\s0 to set the date of a changed
archive to the date of the newest file in the archive.
.IP "\fB\-tn\fR\fI<time>\fR" 4
.IX Item "-tn<time>"
Process files newer than the specified time period. Format of the time
string is:
.Sp
.Vb 1
\&    [<ndays>d][<nhours>h][<nminutes>m][<nseconds>s]
.Ve
.Sp
For example, use switch \-tn15d to process files newer than 15 days and
\&\-tn2h30m to process files newer than 2 hours 30 minutes.
.IP "\fB\-to\fR\fI<time>\fR" 4
.IX Item "-to<time>"
Process files older than the specified time period. Format of the switch
is the same as \-tn<time>.
.IP "\fB\-ts<m,c,a>\fR\fI[N]\fR" 4
.IX Item "-ts<m,c,a>[N]"
Save or restore file time (modification, creation, access).
.Sp
Switch \-tsm instructs \fBrar\fR to save file modification time, \-tsc \-
creation time and tsa \- last access time.
.Sp
For \s-1RAR 4\s0.x archive format the optional parameter after the switch is
the number between 0 and 4 controlling the file time precision. Value '1'
enables 1 second precision, 2 \- 0.0065536 sec, 3 \- 0.0000256 sec and 4 or
\&'+' enables the maximum \s-1NTFS\s0 time precision, which is equal to 0.0000001
sec. Value '0' or '\-' means that creation and access time are not saved
and low (two seconds) precision is used for modification time. Higher
precision modes add more data to archive, up to 19 additional bytes
per file in case of \-tsm4 \-tsa4 \-tsc4 combination. If no precision is
specified, \fBrar\fR uses '4' (high) value.
.Sp
\&\s-1RAR 5.0\s0 archive format saves file times either with 1 second precision for
parameter value '1' or with maximum \s-1NTFS\s0 precision for '2', '3' and '4'.
.Sp
Default \fBrar\fR mode is \-tsm4 \-tsc0 \-tsa0, so modification time is stored
with the high precision and other times are ignored.
.Sp
It is necessary to specify \-tsc and \-tsa switches to set creation and
access time when unpacking files (precision is irrelevant, but must
not be 0). By default \fBrar\fR sets only the modification time, even if
archive contains creation and last access time. Setting the modification
time to unpacked files may be also disabled with \-tsm\-.
.Sp
It is possible to omit the time type letter if you need to apply
the switch to all three times. For example, \-tsm4 \-tsa4 \-tsc4 can be
replaced by \-ts4, \-ts+ or \-ts.  Use \-ts\- to save only the low precision
modification time or to ignore all three file times on unpacking.
.Sp
When creating an archive, \fBrar\fR automatically reduces the precision
if high mode is not supported by the file system. It is not more than
2 seconds on \s-1FAT\s0 and 1 second in Unix. \s-1NTFS\s0 time precision is 0.0000001
second.
.Sp
Operating systems limit which time can be set on unpacking.  Windows
allows to set all three times, Unix \- modification and last access,
but not creation.
.Sp
Examples:
.Sp
.Vb 1
\&    rar a \-ts backup
.Ve
.Sp
Store all file times with the highest possible precision.
.Sp
.Vb 1
\&    rar x \-tsa backup
.Ve
.Sp
Restore modification and last access time. Switch \-tsm is not required,
because \fBrar\fR uses it by default.
.Sp
.Vb 1
\&    rar a \-tsm1 \-tsc1 backup
.Ve
.Sp
Store low precision modification and creation time.  Without \-tsm1 \fBrar\fR
would save the high precision modification time.
.IP "\fB\-u\fR" 4
.IX Item "-u"
Update files. May be used with archive extraction or creation.
The command string \*(L"a \-u\*(R" is equivalent to the command 'u', you could
also use the switch '\-u' with the commands 'm' or 'mf'. If the switch
\&'\-u' is used with the commands 'x' or 'e', then files not present on the
disk and files newer than their copies on the disk would extracted from
the archive.
.IP "\fB\-v\fR" 4
.IX Item "-v"
Create volumes with size autodetection or list all volumes
.Sp
This switch may be used when creating or listing volumes.
.Sp
In the first case it enables volume size autodetection, so new volumes
will use all available space on the destination media. It is convenient
when creating volumes on removable disks. You may read more about volumes
in \-v<size> description.
.Sp
In the second case, when this switch is used together with 'V' or 'L'
command, it forces \fBrar\fR to list contents of all volumes starting from
that specified in the command line.  Without this switch \fBrar\fR displays
contents of only one single specified volume.
.IP "\fB\-v\fR\fI<size>\fR\fB[k|b|f|m|M|g|G]\fR" 4
.IX Item "-v<size>[k|b|f|m|M|g|G]"
Create volumes with size=<size>*1000 [*1024 | *1].  By default this switch
uses <size> as thousands (1000) of bytes (not 1024 x bytes). You may also
enter the size in kilobytes using the symbol 'k', in bytes using the
symbol 'b', megabytes \- 'm', millions of bytes \- 'M', gigabytes \- 'g',
billions (milliards) of bytes \- 'G' or select one of several predefined
values using the symbol 'f' following the numerical value. Predefined
values can be 360, 720, 1200, 1440 or 2880 and replaced with corresponding
floppy disk size.
.Sp
If the size is omitted, autodetection will be used.
.Sp
It is allowed to enter decimal fractions using the dot as the decimal
mark. For example, \-v1.5g means 1.5 gigabytes.
.Sp
You may specify several \-v switches to set different sizes for different
volumes. For example:
.Sp
.Vb 1
\&    rar a \-v100k \-v200k \-v300k arcname
.Ve
.Sp
sets 100 \s-1KB\s0 size for first volume, 200 \s-1KB\s0 for second and 300 \s-1KB\s0 for all
following volumes.
.Sp
If volumes are created on removable media, then after the creation of
the first volume, the user will be prompted with:
.Sp
  Create next volume: Yes/No/All
.Sp
At this moment in time, you should change the disks. Answering 'A'
will cause all volumes to be created without a pause.
.Sp
By default \s-1RAR\s0 volumes have names like 'volname.partNNN.rar', where
\&\s-1NNN\s0 is the volume number. For \s-1RAR 4\s0.x archive format using \-vn switch
it is possible to select another, extension based naming scheme, where
the first volume file in a multi-volume set has the extension .rar,
following volumes are numbered from .r00 to .r99. \s-1RAR 5.0\s0 archives do
not support \-vn and extension based names.
.Sp
When extracting or testing a multi-volume archive you must use only the
first volume name. If there is no next volume on the drive and the disk
is removable, the user will be prompted with:
.Sp
  Insert disk with <next volume name>
.Sp
Insert the disk with the correct volume and press any key.
.Sp
If while extracting, the next volume is not found and volumes are placed
on the non-removable disk, \fBrar\fR will abort with the error message:
.Sp
  Cannot find <volume name>
.Sp
Archive volumes may not be modified. The commands 'd', 'f', 'u', 's'
cannot be used with Multi-volume sets. The command 'a' may be used only
for the creation of a new multi-volume sequence.
.Sp
It is possible, although unlikely, that the file size, of a file in
a multi-volume set, could be greater than its uncompressed size. This
is due to the fact that 'storing' (no compression if size increases)
cannot be enabled for multi-volume sets.
.Sp
Archive volumes may be Self-Extracting (\s-1SFX\s0). Such an archive should be
created using both the '\-v' and '\-sfx' switches.
.Sp
Example:
.Sp
create archive in volumes of fixed size:
.Sp
.Vb 1
\&    rar a \-s \-v1440 floparch.rar *.*
.Ve
.Sp
will create solid volumes of size 1440000 bytes.
.IP "\fB\-vd\fR" 4
.IX Item "-vd"
Erase disk contents before creating volume
.Sp
All files and directories on the target disk will be erased when '\-vd'
is used.  The switch applies only to removable media, the hard disk
cannot be erased using this switch.
.IP "\fB\-ver\fR\fI[n]\fR" 4
.IX Item "-ver[n]"
File version control
.Sp
Forces \fBrar\fR to keep previous file versions when updating files in
the already existing archive. Old versions are renamed to 'filename;n',
where 'n' is the version number.
.Sp
By default, when unpacking an archive without the switch \-ver, \fBrar\fR
extracts only the last added file version, the name of which does not
include a numeric suffix. But if you specify a file name exactly,
including a version, it will be also unpacked. For example, 'rar x
arcname' will unpack only last versions, when 'rar x arcname file.txt;5'
will unpack 'file.txt;5', if it is present in the archive.
.Sp
If you specify \-ver switch without a parameter when unpacking, \fBrar\fR will
extract all versions of all files that match the entered file mask. In
this case a version number is not removed from unpacked file names. You
may also extract a concrete file version specifying its number as \-ver
parameter.  It will tell \fBrar\fR to unpack only this version and remove
a version number from file names. For example, 'rar x \-ver5 arcname'
will unpack only 5th file versions.
.Sp
If you specify 'n' parameter when archiving, it will limit the maximum
number of file versions stored in the archive.  Old file versions
exceeding this threshold will be removed.
.IP "\fB\-vn\fR" 4
.IX Item "-vn"
Use the old style volume naming scheme
.Sp
By default \s-1RAR\s0 volumes have names like 'volname.partNNN.rar', where
\&\s-1NNN\s0 is the volume number. For \s-1RAR 4\s0.x archive format using \-vn switch
it is possible to select another, extension based naming scheme, where
the first volume file in a multi-volume set has the extension .rar,
following volumes are numbered from .r00 to .r99. \s-1RAR 5.0\s0 archives do
not support \-vn and extension based names.
.IP "\fB\-vp\fR" 4
.IX Item "-vp"
Pause before each volume
.Sp
By default \s-1RAR\s0 asks for confirmation before processing next volume only
when archiving to removable disks and only if free disk space is less than
volume size. This switch forces \s-1RAR\s0 to always ask for such confirmation
when creating or extracting volumes. For example, it can be useful if
you wish to copy new volumes to another media immediately after creating.
.IP "\fB\-w\fR\fI<p>\fR" 4
.IX Item "-w<p>"
Assign work directory as <p>. This switch may be used to assign the
directory for temporary files.
.IP "\fB\-x\fR\fI<f>\fR" 4
.IX Item "-x<f>"
Exclude the specified <f> file or directory. Wildcards can be used in
both the name and path parts of file mask. You can specify the switch '\-x'
several times to define several exclusion masks in the same command line.
.Sp
If mask contains wildcards, it applies to files in current directory and
its subdirectories. It is not recursive without wildcards, so \*(L"filename\*(R"
mask will exclude 'filename' file only in current directory when archiving
or in root archive directory when extracting.
.Sp
Use \*(L"*\efilename\*(R" syntax to exclude \*(L"filename\*(R" recursively in all
directories.
.Sp
If you know the exact path to file, you can use \*(L"path\efilename\*(R" syntax to
exclude only this copy of \*(L"filename\*(R". If you use \-xpath\efilename syntax
when unpacking an archive, \*(L"path\*(R" must be the path inside of archive,
not the file path on the disk after unpacking.
.Sp
By default, masks containing wildcards are applied only to files.
If you need a mask with wildcards to exclude several directories,
use the special syntax for directory exclusion masks.  Such masks must
have the trailing path separator character ('\e' for Windows and '/' for
Unix). For example, \*(L"*tmp*\e\*(R" mask will exclude all directories matching
\&\*(L"*tmp*\*(R" and \*(L"*\etmp\e\*(R" will exclude all 'tmp' directories. Since wildcards
are present, both masks will be applied to contents of current directory
and all its subdirectories.
.Sp
If you wish to exclude only one directory, specify the exact name
of directory including the absolute or relative path without any
wildcards. In this case you do not need to append the path separator to
mask, which is required only for directory exclusion masks containing
wildcards to distinguish them from file exclusion masks.
.Sp
Examples:
.Sp
.Vb 1
\&    rar a \-r \-x*.jpg \-x*.avi rawfiles
.Ve
.Sp
compress all files except *.jpg and *.avi in current directory and its
subdirectories;
.Sp
.Vb 1
\&    rar a \-r \-x*\etemp\e savec c:\e*
.Ve
.Sp
compress all files on the disk c: except 'temp' directories and files
inside of 'temp' directories;
.Sp
.Vb 1
\&    rar x \-x*.txt docs
.Ve
.Sp
extract all files except *.txt from docs.rar.
.IP "\fB\-x\fR\fI@<lf>\fR" 4
.IX Item "-x@<lf>"
Exclude files listed in the specified list file. If you use \-x@ without
the list file name parameter, it will read file names from stdin.
.Sp
Example:
.Sp
.Vb 1
\&    rar a \-x@exlist.txt arch *.exe
.Ve
.IP "\fB\-y\fR" 4
.IX Item "-y"
Assume Yes on all queries.
.IP "\fB\-z\fR\fI[f]\fR" 4
.IX Item "-z[f]"
Read archive comment from file <f>. Use with \-sc switch if you need to
specify the character set for comment text file.  If <f> is not specified,
comment is read from stdin.
.SH "LIMITATIONS"
.IX Header "LIMITATIONS"
Command limitations:
.PP
Commands 'd','u','f','c','cf' will not operate with archive volumes.
.PP
Command 'a' cannot be used to update an archive volume, only to create
a new one.
.SH "CONFIGURATION FILE"
.IX Header "CONFIGURATION FILE"
\&\fBrar\fR for Unix reads configuration information from the file \fI.rarrc\fR
in the user's home directory (stored in \s-1HOME\s0 environment variable)
or in /etc directory.
.PP
\&\fBrar\fR for Windows reads configuration information from the file
\&\fIrar.ini\fR, placed in the same directory as the rar.exe file.
.PP
This file may contain the following string:
.PP
switches=any \fBrar\fR switches, separated by spaces
.PP
For example:
.PP
.Vb 1
\&    switches=\-m5 \-s
.Ve
.SH "ENVIRONMENT VARIABLE"
.IX Header "ENVIRONMENT VARIABLE"
Default parameters may be added to the \fBrar\fR command line by establishing
an environment variable \*(L"\s-1RAR\*(R".\s0
.PP
For instance, in Unix following lines may be added to your profile:
.PP
.Vb 2
\&    RAR=\*(Aq\-s \-md1024\*(Aq
\&    export RAR
.Ve
.PP
\&\fBrar\fR will use this string as default parameters in the command line
and will create \*(L"solid\*(R" archives with 1024 \s-1KB\s0 sliding dictionary size.
.PP
\&\fBrar\fR handles options with priority as following:
.PP
command line switches                   highest priority
.PP
switches in the \s-1RAR\s0 variable            lower priority
.PP
switches saved in configuration file    lowest priority
.SH "LOG FILE"
.IX Header "LOG FILE"
If the switch \-ilog is specified in the command line or configuration
file, \fBrar\fR will write informational messages, concerning errors
encountered while processing archives, into a log file. Read switch
\&\-ilog description for more details.
.SH "THE FILE ORDER LIST FOR SOLID ARCHIVING \- RARFILES.LST"
.IX Header "THE FILE ORDER LIST FOR SOLID ARCHIVING - RARFILES.LST"
\&\fIrarfiles.lst\fR contains a user-defined file list, which tells \fBrar\fR
the order in which to add files to a solid archive. It may contain file
names, wildcards and special entry \- \f(CW$default\fR. The default entry defines
the place in order list for files not matched with other entries in this
file. The comment character is ';'.
.PP
In Windows this file should be placed in the same directory as \fBrar\fR
or in \f(CW%APPDATA\fR%\eWinRAR directory, in Unix \- to the user's home directory
or in /etc.
.PP
Tips to provide improved compression and speed of operation:
.PP
\&\- similar files should be grouped together in the archive;
.PP
\&\- frequently accessed files should be placed at the beginning.
.PP
Normally masks placed nearer to the top of list have a higher priority,
but there is an exception from this rule. If \fIrarfiles.lst\fR contains such
two masks that all files matched by one mask are also matched by another,
that mask which matches a smaller subset of file names will have higher
priority regardless of its position in the list. For example, if you have
*.cpp and f*.cpp masks, f*.cpp has a higher priority, so the position of
\&'filename.cpp' will be chosen according to 'f*.cpp', not '*.cpp'.
.SH "EXIT VALUES"
.IX Header "EXIT VALUES"
\&\s-1RAR\s0 exits with a zero code (0) in case of successful operation.
Non-zero exit code indicates some kind of error:
.PP
Code    Description
.PP
0       Successful operation.
.PP
1       Non fatal error(s) occurred.
.PP
2       A fatal error occurred.
.PP
3       Invalid checksum. Data is damaged.
.PP
4       Attempt to modify an archive locked by 'k' command.
.PP
5       Write error.
.PP
6       File open error.
.PP
7       Wrong command line option.
.PP
8       Not enough memory.
.PP
9       File create error.
.PP
10      No files matching the specified mask and options were found.
.PP
11      Wrong password.
.PP
255     User stopped the process.
.SH "GLOSSARY"
.IX Header "GLOSSARY"
.IP "\fBArchive\fR" 4
.IX Item "Archive"
Special file containing one or more files optionally compressed and/or
encrypted.
.IP "\fBCompression\fR" 4
.IX Item "Compression"
A method of encoding data to reduce it's size.
.IP "\fBChecksum\fR" 4
.IX Item "Checksum"
Value calculating for data block or file and allowing to check data or
file validity.
.IP "\fB\s-1SFX\s0 archive\fR" 4
.IX Item "SFX archive"
SelF-eXtracting archive. Archive in executable format, consisting
of self-extracting module followed by compressed data. It is enough to
run such executable to start extraction.
.IP "\fBSolid\fR" 4
.IX Item "Solid"
An archive packed using a special compression method which sees all
files as one continuous data stream. Particularly advantageous when
packing a large number of small files.
.IP "\fBVolume\fR" 4
.IX Item "Volume"
Part of a split archive. Splitting an archive to volumes allows storing
them on several removable disks.  Solid volumes must be extracted starting
from first volume in sequence.
.SH "COPYRIGHTS"
.IX Header "COPYRIGHTS"
(c) 1993\-2013 Alexander Roshal