Skip to content

Commit 31bf179

Browse files
committed
Add commands
1 parent 3a16a26 commit 31bf179

560 files changed

Lines changed: 44610 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

assets/commands/lpinfo.md

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# TLDR
2+
3+
**List available printers**
4+
5+
```lpinfo -v```
6+
7+
**List available printer drivers**
8+
9+
```lpinfo -m```
10+
11+
**List drivers matching keyword**
12+
13+
```lpinfo -m | grep -i [keyword]```
14+
15+
**Show long printer names**
16+
17+
```lpinfo -l -v```
18+
19+
**List drivers for specific make**
20+
21+
```lpinfo --make-and-model "[HP LaserJet]" -m```
22+
23+
**Exclude specific schemes**
24+
25+
```lpinfo -v --exclude-schemes [dnssd]```
26+
27+
**Include only specific schemes**
28+
29+
```lpinfo -v --include-schemes [usb,parallel]```
30+
31+
# SYNOPSIS
32+
33+
**lpinfo** [_-l_] [_-m_] [_-v_] [_--make-and-model pattern_] [_options_]
34+
35+
# PARAMETERS
36+
37+
**-l**
38+
> Show long listing with device details.
39+
40+
**-m**
41+
> List available printer drivers (PPD files).
42+
43+
**-v**
44+
> List available printer devices.
45+
46+
**--device-id** _ID_
47+
> Show only devices matching IEEE-1284 device ID.
48+
49+
**--make-and-model** _PATTERN_
50+
> Filter by make and model string.
51+
52+
**--exclude-schemes** _SCHEMES_
53+
> Exclude device URIs matching schemes.
54+
55+
**--include-schemes** _SCHEMES_
56+
> Include only device URIs matching schemes.
57+
58+
**-h** _SERVER_
59+
> Connect to CUPS server.
60+
61+
**--timeout** _SECONDS_
62+
> Timeout for device discovery.
63+
64+
# DESCRIPTION
65+
66+
**lpinfo** lists available printers and printer drivers known to CUPS. It queries the CUPS server for devices and PPD (PostScript Printer Description) files.
67+
68+
Device listing (-v) shows all detected printer connections including USB, network, and parallel ports. Each entry includes a device URI that can be used when adding printers with lpadmin.
69+
70+
Driver listing (-m) shows PPD files that describe printer capabilities. PPDs define paper sizes, resolutions, color options, and other features. Driverless printing uses generic IPP Everywhere or AirPrint drivers.
71+
72+
The make-and-model filter helps find drivers for specific printers. Combined with grep, you can search for compatible drivers for your hardware.
73+
74+
Network printer discovery may include DNS-SD (Bonjour/Avahi) discovered printers. Use scheme filters to focus on specific connection types.
75+
76+
# CAVEATS
77+
78+
Requires CUPS to be running. Network discovery can be slow. Some printers need proprietary drivers not included with CUPS. Driverless printing requires modern printers with IPP Everywhere or AirPrint support.
79+
80+
# HISTORY
81+
82+
**lpinfo** is part of the **CUPS** (Common UNIX Printing System) suite, originally developed by **Michael Sweet** at Easy Software Products. CUPS was released in **1999** and acquired by **Apple** in **2007**. lpinfo provides the discovery mechanism used by print configuration tools.
83+
84+
# SEE ALSO
85+
86+
[lpadmin](/man/lpadmin)(1), [lpstat](/man/lpstat)(1), [lp](/man/lp)(1), [lpr](/man/lpr)(1), [cupsd](/man/cupsd)(8)

assets/commands/lsar.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# TLDR
2+
3+
**List archive contents**
4+
5+
```lsar [archive.zip]```
6+
7+
**List with detailed info**
8+
9+
```lsar -l [archive.rar]```
10+
11+
**List very long format**
12+
13+
```lsar -L [archive.7z]```
14+
15+
**Test archive integrity**
16+
17+
```lsar -t [archive.zip]```
18+
19+
**List with password**
20+
21+
```lsar -p [password] [encrypted.zip]```
22+
23+
**List specific encoding**
24+
25+
```lsar -e [shift_jis] [japanese.zip]```
26+
27+
**Print only filenames**
28+
29+
```lsar -1 [archive.tar.gz]```
30+
31+
# SYNOPSIS
32+
33+
**lsar** [_-l_] [_-L_] [_-t_] [_-p password_] [_-e encoding_] [_archive_]
34+
35+
# PARAMETERS
36+
37+
**-l**
38+
> Long listing with size, date, permissions.
39+
40+
**-L**
41+
> Very long listing with extra details.
42+
43+
**-t**
44+
> Test archive integrity.
45+
46+
**-p** _PASSWORD_
47+
> Specify password for encrypted archives.
48+
49+
**-e** _ENCODING_
50+
> Force character encoding for filenames.
51+
52+
**-1**
53+
> Print only filenames, one per line.
54+
55+
**-j**
56+
> Output as JSON.
57+
58+
**-q**
59+
> Quiet mode.
60+
61+
**-nr**
62+
> Don't recurse into nested archives.
63+
64+
**-h**, **--help**
65+
> Show help.
66+
67+
# DESCRIPTION
68+
69+
**lsar** lists the contents of archive files. It supports a wide variety of formats including Zip, RAR, 7-Zip, tar, gzip, bzip2, ISO, and many legacy formats.
70+
71+
The tool is part of The Unarchiver suite. While unar extracts files, lsar provides inspection without extraction. It handles archives that standard tools may fail on, including corrupted or non-standard archives.
72+
73+
Encoding detection handles international filenames automatically. For archives with mislabeled encodings, the -e flag forces specific character sets like Shift_JIS, GBK, or EUC-KR.
74+
75+
Long listing shows file sizes (compressed and uncompressed), modification dates, and permissions where available. The test mode (-t) verifies archive integrity without extracting.
76+
77+
JSON output enables scripting and integration with other tools.
78+
79+
# CAVEATS
80+
81+
Not installed by default on most systems - requires The Unarchiver package. Some formats may have limited metadata support. Encrypted RAR5 archives require specific builds.
82+
83+
# HISTORY
84+
85+
**lsar** is part of **The Unarchiver**, created by **Dag Ågren** starting around **2006**. Originally a macOS application, command-line tools were added later. The project focuses on compatibility with many archive formats and proper handling of international filenames.
86+
87+
# SEE ALSO
88+
89+
[unar](/man/unar)(1), [unzip](/man/unzip)(1), [tar](/man/tar)(1), [7z](/man/7z)(1), [unrar](/man/unrar)(1)

assets/commands/lstopo.md

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
# TLDR
2+
3+
**Show hardware topology**
4+
5+
```lstopo```
6+
7+
**Display in terminal** (text mode)
8+
9+
```lstopo-no-graphics```
10+
11+
**Output as image**
12+
13+
```lstopo [topology.png]```
14+
15+
**Output as PDF**
16+
17+
```lstopo [topology.pdf]```
18+
19+
**Output as XML**
20+
21+
```lstopo [topology.xml]```
22+
23+
**Show only CPU info**
24+
25+
```lstopo --only core```
26+
27+
**Show with PCI devices**
28+
29+
```lstopo --whole-io```
30+
31+
**Show physical indexes**
32+
33+
```lstopo -p```
34+
35+
# SYNOPSIS
36+
37+
**lstopo** [_--of format_] [_--only type_] [_--whole-io_] [_options_] [_output_]
38+
39+
# PARAMETERS
40+
41+
**--of** _FORMAT_
42+
> Output format (png, pdf, svg, xml, txt, console).
43+
44+
**--only** _TYPE_
45+
> Show only specific object types.
46+
47+
**--whole-io**
48+
> Show all I/O devices.
49+
50+
**--no-io**
51+
> Hide I/O devices.
52+
53+
**-p**, **--physical**
54+
> Show physical/OS indexes.
55+
56+
**-l**, **--logical**
57+
> Show logical indexes.
58+
59+
**--merge**
60+
> Merge identical objects.
61+
62+
**--no-legend**
63+
> Hide the legend.
64+
65+
**--no-caches**
66+
> Hide cache information.
67+
68+
**-v**, **--verbose**
69+
> Verbose output.
70+
71+
**--input** _FILE_
72+
> Read topology from XML file.
73+
74+
**--version**
75+
> Print version.
76+
77+
# DESCRIPTION
78+
79+
**lstopo** displays hardware topology including CPUs, caches, memory, and I/O devices. It visualizes the hierarchical structure of the system from machine level down to individual cores and threads.
80+
81+
The output shows NUMA nodes, packages (sockets), cores, and processing units (threads). Cache levels (L1, L2, L3) are displayed with their sizes and sharing between cores.
82+
83+
Graphical output creates images showing the topology tree. Text mode (lstopo-no-graphics) works in terminals without graphics support.
84+
85+
Understanding topology is important for performance optimization. It shows which cores share caches, which are on the same NUMA node, and how memory is organized.
86+
87+
The tool can load topology from XML files, enabling offline analysis or comparison between systems.
88+
89+
# CAVEATS
90+
91+
Graphical output requires Cairo/X11 libraries. Some virtual environments may show incorrect topology. Root access may be needed for complete I/O device information.
92+
93+
# HISTORY
94+
95+
**lstopo** is part of **hwloc** (Hardware Locality), developed by the **Open MPI** project starting around **2009**. hwloc provides a portable abstraction for hardware topology across different operating systems. lstopo evolved from earlier tools in the project.
96+
97+
# SEE ALSO
98+
99+
[hwloc-info](/man/hwloc-info)(1), [hwloc-bind](/man/hwloc-bind)(1), [lscpu](/man/lscpu)(1), [numactl](/man/numactl)(8)

assets/commands/lsyncd.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# TLDR
2+
3+
**Sync directories locally**
4+
5+
```lsyncd -rsync [/source/] [/destination/]```
6+
7+
**Sync to remote server**
8+
9+
```lsyncd -rsyncssh [/local/] [user@host] [/remote/]```
10+
11+
**Use configuration file**
12+
13+
```lsyncd [config.lua]```
14+
15+
**Run in foreground with logging**
16+
17+
```lsyncd -log all [config.lua]```
18+
19+
**Dry run** (show what would sync)
20+
21+
```lsyncd -nodaemon -log all [config.lua]```
22+
23+
**Specify log file**
24+
25+
```lsyncd -logfile [/var/log/lsyncd.log] [config.lua]```
26+
27+
# SYNOPSIS
28+
29+
**lsyncd** [_-rsync source dest_] [_-rsyncssh source host dest_] [_-log level_] [_options_] [_config.lua_]
30+
31+
# PARAMETERS
32+
33+
**-rsync** _SOURCE_ _DEST_
34+
> Simple rsync sync mode.
35+
36+
**-rsyncssh** _SOURCE_ _HOST_ _DEST_
37+
> Rsync over SSH to remote host.
38+
39+
**-nodaemon**
40+
> Run in foreground, don't daemonize.
41+
42+
**-log** _LEVEL_
43+
> Set log level (all, scarce, normal, error).
44+
45+
**-logfile** _FILE_
46+
> Write logs to file.
47+
48+
**-pidfile** _FILE_
49+
> Write PID file.
50+
51+
**-delay** _SECONDS_
52+
> Delay before syncing (aggregation window).
53+
54+
**-insist**
55+
> Keep trying on startup errors.
56+
57+
**-version**
58+
> Show version.
59+
60+
**-help**
61+
> Show help.
62+
63+
# DESCRIPTION
64+
65+
**lsyncd** (Live Syncing Daemon) watches directories for changes and synchronizes them in real-time. It uses inotify on Linux to detect file changes efficiently.
66+
67+
When changes occur, lsyncd waits briefly (delay) to aggregate multiple changes, then triggers rsync to synchronize. This approach handles burst writes efficiently while maintaining near-real-time sync.
68+
69+
Configuration files use Lua scripting for flexibility. They define sync pairs, exclude patterns, rsync options, and can implement custom sync logic.
70+
71+
The tool works with both local directories and remote servers via SSH. Multiple sync pairs can run simultaneously from a single configuration.
72+
73+
Common uses include backup systems, cluster file synchronization, and development environments where files need to stay synchronized across machines.
74+
75+
# CAVEATS
76+
77+
Initial sync can take time for large directories. Inotify watch limits may need increasing for large trees. High-frequency changes can cause delays. Symlinks and special files need careful handling.
78+
79+
# HISTORY
80+
81+
**lsyncd** was created by **Axel Kittenberger** around **2008**. It combined inotify's efficient change notification with rsync's reliable file synchronization. The project introduced Lua configuration in version 2, enabling sophisticated sync scenarios.
82+
83+
# SEE ALSO
84+
85+
[rsync](/man/rsync)(1), [inotifywait](/man/inotifywait)(1), [unison](/man/unison)(1), [syncthing](/man/syncthing)(1)

0 commit comments

Comments
 (0)