neulab/tldr huggingface dataset:
The locale for category LC_foo is specified by examining the three environment variables LC_ALL, LC_foo, LANG, in that order.  The first of these variables that is set specifies the locale.  For example, if LC_ALL is not set, but LC_MESSAGES is set to pt_BR, then the Brazilian Portuguese locale is used for the LC_MESSAGES category.  The C locale is used if none of these environment variables are set, if the locale catalog is not installed, or if grep was not compiled with national language support (NLS).  The shell command locale -a lists locales that are currently available.
GREP_COLOR This variable specifies the color used to highlight matched (non- empty) text.  It is deprecated in favor of GREP_COLORS, but still supported.  The mt, ms, and mc capabilities of GREP_COLORS have priority over it.  It can only specify the color used to highlight the matching non-empty text in any matching line (a selected line when the -v command-line option is omitted, or a context line when -v is specified).  The default is 01;31, which means a bold red foreground text on the terminal's default background.
GREP_COLORS Specifies the colors and other attributes used to highlight various parts of the output.  Its value is a colon-separated list of capabilities that defaults to ms=01;31:mc=01;31:sl=:cx=:fn=35:ln=32:bn=32:se=36 with the rv and ne boolean capabilities omitted (i.e., false).  Supported capabilities are as follows.
sl=    SGR substring for whole selected lines (i.e., matching lines when the -v command-line option is omitted, or non- matching lines when -v is specified).  If however the boolean rv capability and the -v command-line option are both specified, it applies to context matching lines instead.  The default is empty (i.e., the terminal's default color pair).
cx=    SGR substring for whole context lines (i.e., non-matching lines when the -v command-line option is omitted, or matching lines when -v is specified).  If however the boolean rv capability and the -v command-line option are both specified, it applies to selected non-matching lines instead.  The default is empty (i.e., the terminal's default color pair).
rv     Boolean value that reverses (swaps) the meanings of the sl= and cx= capabilities when the -v command-line option is specified.  The default is false (i.e., the capability is omitted).
mt=01;31 SGR substring for matching non-empty text in any matching line (i.e., a selected line when the -v command-line option is omitted, or a context line when -v is specified). Setting this is equivalent to setting both ms= and mc= at once to the same value.  The default is a bold red text foreground over the current line background.
ms=01;31 SGR substring for matching non-empty text in a selected line.  (This is only used when the -v command-line option is omitted.)  The effect of the sl= (or cx= if rv) capability remains active when this kicks in.  The default is a bold red text foreground over the current line background.
mc=01;31 SGR substring for matching non-empty text in a context line.  (This is only used when the -v command-line option is specified.)  The effect of the cx= (or sl= if rv) capability remains active when this kicks in.  The default is a bold red text foreground over the current line background.
fn=35  SGR substring for file names prefixing any content line. The default is a magenta text foreground over the terminal's default background.
ln=32  SGR substring for line numbers prefixing any content line. The default is a green text foreground over the terminal's default background.
bn=32  SGR substring for byte offsets prefixing any content line. The default is a green text foreground over the terminal's default background.
se=36  SGR substring for separators that are inserted between selected line fields (:), between context line fields, (-), and between groups of adjacent lines when nonzero context is specified (--).  The default is a cyan text foreground over the terminal's default background.
ne     Boolean value that prevents clearing to the end of line using Erase in Line (EL) to Right (\33[K) each time a colorized item ends.  This is needed on terminals on which EL is not supported.  It is otherwise useful on terminals for which the back_color_erase (bce) boolean terminfo capability does not apply, when the chosen highlight colors do not affect the background, or when EL is too slow or causes too much flicker.  The default is false (i.e., the capability is omitted).
Note that boolean capabilities have no =... part.  They are omitted (i.e., false) by default and become true when specified.
See the Select Graphic Rendition (SGR) section in the documentation of the text terminal that is used for permitted values and their meaning as character attributes.  These substring values are integers in decimal representation and can be concatenated with semicolons.  grep takes care of assembling the result into a complete SGR sequence (\33[...m).  Common values to concatenate include 1 for bold, 4 for underline, 5 for blink, 7 for inverse, 39 for default foreground color, 30 to 37 for foreground colors, 90 to 97 for 16-color mode foreground colors, 38;5;0 to 38;5;255 for 88-color and 256-color modes foreground colors, 49 for default background color, 40 to 47 for background colors, 100 to 107 for 16-color mode background colors, and 48;5;0 to 48;5;255 for 88-color and 256-color modes background colors.
LC_ALL, LC_COLLATE, LANG These variables specify the locale for the LC_COLLATE category, which determines the collating sequence used to interpret range expressions like [a-z].
LC_ALL, LC_CTYPE, LANG These variables specify the locale for the LC_CTYPE category, which determines the type of characters, e.g., which characters are whitespace.  This category also determines the character encoding, that is, whether text is encoded in UTF-8, ASCII, or some other encoding.  In the C or POSIX locale, all characters are encoded as a single byte and every byte is a valid character.
LC_ALL, LC_MESSAGES, LANG These variables specify the locale for the LC_MESSAGES category, which determines the language that grep uses for messages.  The default C locale uses American English messages.
POSIXLY_CORRECT If set, grep behaves as POSIX requires; otherwise, grep behaves more like other GNU programs.  POSIX requires that options that follow file names must be treated as file names; by default, such options are permuted to the front of the operand list and are treated as options.  Also, POSIX requires that unrecognized options be diagnosed as “illegal”, but since they are not really against the law the default is to diagnose them as “invalid”. POSIXLY_CORRECT also disables _N_GNU_nonoption_argv_flags_, described below.
_N_GNU_nonoption_argv_flags_ (Here N is grep's numeric process ID.)  If the ith character of this environment variable's value is 1, do not consider the ith operand of grep to be an option, even if it appears to be one.  A shell can put this variable in the environment for each command it runs, specifying which operands are the results of file name wildcard expansion and therefore should not be treated as options. This behavior is available only with the GNU C library, and only when POSIXLY_CORRECT is not set.
This man page is maintained only fitfully; the full documentation is often more up-to-date.
Copyright 1998-2000, 2002, 2005-2021 Free Software Foundation, Inc.
Reporting Bugs Email bug reports to the bug-reporting address ⟨bug-grep@gnu.org⟩.  An email archive ⟨https://lists.gnu.org/mailman/listinfo/bug-grep⟩ and a bug tracker ⟨https://debbugs.gnu.org/cgi/pkgreport.cgi?package=grep⟩ are available.
Known Bugs Large repetition counts in the {n,m} construct may cause grep to use lots of memory.  In addition, certain other obscure regular expressions require exponential time and space, and may cause grep to run out of memory.
Back-references are very slow, and may require exponential time.
The following example outputs the location and contents of any line containing “f” and ending in “.c”, within all files in the current directory whose names contain “g” and end in “.h”.  The -n option outputs line numbers, the -- argument treats expansions of “*g*.h” starting with “-” as file names not options, and the empty file /dev/null causes file names to be output even if only one file name happens to be of the form “*g*.h”.
$ grep -n -- 'f.*\.c$' *g*.h /dev/null argmatch.h:1:/* definitions and prototypes for argmatch.c
The only line that matches is line 1 of argmatch.h.  Note that the regular expression syntax used in the pattern differs from the globbing syntax that the shell uses to match file names.
Regular Manual Pages awk(1), cmp(1), diff(1), find(1), perl(1), sed(1), sort(1), xargs(1), read(2), pcre(3), pcresyntax(3), pcrepattern(3), terminfo(5), glob(7), regex(7)
Full Documentation A complete manual ⟨https://www.gnu.org/software/grep/manual/⟩ is available.  If the info and grep programs are properly installed at your site, the command
info grep
EJECT(1)                          User Commands                         EJECT(1)
eject - eject removable media
eject [options] device|mountpoint
eject allows removable media (typically a CD-ROM, floppy disk, tape, JAZ, ZIP or USB disk) to be ejected under software control. The command can also control some multi-disc CD-ROM changers, the auto-eject feature supported by some devices, and close the disc tray of some CD-ROM drives.
The device corresponding to device or mountpoint is ejected. If no name is specified, the default name /dev/cdrom is used. The device may be addressed by device name (e.g., 'sda'), device path (e.g., '/dev/sda'), UUID=uuid or LABEL=label tags.
There are four different methods of ejecting, depending on whether the device is a CD-ROM, SCSI device, removable floppy, or tape. By default eject tries all four methods in order until it succeeds.
If a device partition is specified, the whole-disk device is used.
If the device or a device partition is currently mounted, it is unmounted before ejecting. The eject is processed on exclusive open block device file descriptor if --no-unmount or --force are not specified.
-a, --auto on|off This option controls the auto-eject mode, supported by some devices. When enabled, the drive automatically ejects when the device is closed.
-c, --changerslot slot With this option a CD slot can be selected from an ATAPI/IDE CD-ROM changer. The CD-ROM drive cannot be in use (mounted data CD or playing a music CD) for a change request to work. Please also note that the first slot of the changer is referred to as 0, not 1.
-d, --default List the default device name.
-F, --force Force eject, don’t check device type, don’t open device with exclusive lock. The successful result may be false positive on non hot-pluggable devices.
-f, --floppy This option specifies that the drive should be ejected using a removable floppy disk eject command.
-i, --manualeject on|off This option controls locking of the hardware eject button. When enabled, the drive will not be ejected when the button is pressed. This is useful when you are carrying a laptop in a bag or case and don’t want it to eject if the button is inadvertently pressed.
-M, --no-partitions-unmount The option tells eject to not try to unmount other partitions on partitioned devices. If another partition is still mounted, the program will not attempt to eject the media. It will attempt to unmount only the device or mountpoint given on the command line.
-m, --no-unmount The option tells eject to not try to unmount at all. If this option is not specified than eject opens the device with O_EXCL flag to be sure that the device is not used (since v2.35).
-n, --noop With this option the selected device is displayed but no action is performed.
-p, --proc This option allows you to use /proc/mounts instead /etc/mtab. It also passes the -n option to umount(8).
-q, --tape This option specifies that the drive should be ejected using a tape drive offline command.
-r, --cdrom This option specifies that the drive should be ejected using a CDROM eject command.
-s, --scsi This option specifies that the drive should be ejected using SCSI commands.
-T, --traytoggle With this option the drive is given a CD-ROM tray close command if it’s opened, and a CD-ROM tray eject command if it’s closed. Not all devices support this command, because it uses the above CD-ROM tray close command.
-t, --trayclose With this option the drive is given a CD-ROM tray close command. Not all devices support this command.
-v, --verbose Run in verbose mode; more information is displayed about what the command is doing.
-X, --listspeed With this option the CD-ROM drive will be probed to detect the available speeds. The output is a list of speeds which can be used as an argument of the -x option. This only works with Linux 2.6.13 or higher, on previous versions solely the maximum speed will be reported. Also note that some drives may not correctly report the speed and therefore this option does not work with them.
-x, --cdspeed speed With this option the drive is given a CD-ROM select speed command. The speed argument is a number indicating the desired speed (e.g., 8 for 8X speed), or 0 for maximum data rate. Not all devices support this command and you can only specify speeds that the drive is capable of. Every time the media is changed this option is cleared. This option can be used alone, or with the -t and -c options.
eject only works with devices that support one or more of the four methods of ejecting. This includes most CD-ROM drives (IDE, SCSI, and proprietary), some SCSI tape drives, JAZ drives, ZIP drives (parallel port, SCSI, and IDE versions), and LS120 removable floppies. Users have also reported success with floppy drives on Sun SPARC and Apple Macintosh systems. If eject does not work, it is most likely a limitation of the kernel driver for the device and not the eject program itself.
The -r, -s, -f, and -q options allow controlling which methods are used to eject. More than one method can be specified. If none of these options are specified, it tries all four (this works fine in most cases).
eject may not always be able to determine if the device is mounted (e.g., if it has several names). If the device name is a symbolic link, eject will follow the link and use the device that it points to.
If eject determines that the device can have multiple partitions, it will attempt to unmount all mounted partitions of the device before ejecting (see also --no-partitions-unmount). If an unmount fails, the program will not attempt to eject the media.
You can eject an audio CD. Some CD-ROM drives will refuse to open the tray if the drive is empty. Some devices do not support the tray close command.
If the auto-eject feature is enabled, then the drive will always be ejected after running this command. Not all Linux kernel CD-ROM drivers support the auto-eject mode. There is no way to find out the state of the auto-eject mode.
You need appropriate privileges to access the device files. Running as root is required to eject some devices (e.g., SCSI devices).
Jeff Tranter <tranter@pobox.com> - original author, Karel Zak <kzak@redhat.com> and Michal Luscon <mluscon@redhat.com> - util-linux version.
findmnt(8), lsblk(8), mount(8), umount(8)
The eject command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
LSLOCKS(8)                    System Administration                   LSLOCKS(8)
lslocks - list local system locks
lslocks [options]
lslocks lists information about all the currently held file locks in a Linux system.
Note that lslocks also lists OFD (Open File Description) locks, these locks are not associated with any process (PID is -1). OFD locks are associated with the open file description on which they are acquired. This lock type is available since Linux 3.15, see fcntl(2) for more details.
-b, --bytes Print the SIZE column in bytes rather than in a human-readable format.
-i, --noinaccessible Ignore lock files which are inaccessible for the current user.
-J, --json Use JSON output format.
-n, --noheadings Do not print a header line.
The default list of columns may be extended if list is specified in the format +list (e.g., lslocks -o +BLOCKER).
-p, --pid pid Display only the locks held by the process with this pid.
-r, --raw Use the raw output format.
-u, --notruncate Do not truncate text in columns.
COMMAND The command name of the process holding the lock.
PID The process ID of the process which holds the lock or -1 for OFDLCK.
TYPE The type of lock; can be FLOCK (created with flock(2)), POSIX (created with fcntl(2) and lockf(3)) or OFDLCK (created with fcntl(2)).
SIZE Size of the locked file.
MODE The lock’s access permissions (read, write). If the process is blocked and waiting for the lock, then the mode is postfixed with an '*' (asterisk).
M Whether the lock is mandatory; 0 means no (meaning the lock is only advisory), 1 means yes. (See fcntl(2).)
START Relative byte offset of the lock.
END Ending offset of the lock.
PATH Full path of the lock. If none is found, or there are no permissions to read the path, it will fall back to the device’s mountpoint and "..." is appended to the path. The path might be truncated; use --notruncate to get the full path.
BLOCKER The PID of the process which blocks the lock.
The lslocks command is meant to replace the lslk(8) command, originally written by Victor A. Abell <abe@purdue.edu> and unmaintained since 2001.
Davidlohr Bueso <dave@gnu.org>
flock(1), fcntl(2), lockf(3)
The lslocks command is part of the util-linux package which can be downloaded from Linux Kernel Archive <https://www.kernel.org/pub/linux/utils/util-linux/>.
molecule - draws 3D molecular structures
gltext [-display host:display.screen] [-window] [-root] [-visual visual] [-delay microseconds] [-fps] [-wander] [-no-wander] [-spin axes] [-no- spin] [-wire] [-timeout seconds] [-labels] [-no-labels] [-titles] [-no- titles] [-atoms] [-no-atoms] [-bonds] [-no-bonds] [-molecule filename]
The molecule program draws several different representations of molecules.  Some common molecules are built in, and it can read PDB (Protein Data Base) files as input.
molecule accepts the following options:
-fps    Display a running tally of how many frames per second are being rendered.  In conjunction with -delay 0, this can be a useful benchmark of your GL performance.
-wander Move the molecules around the screen.
-no-wander Keep the molecule centered on the screen.  This is the default.
-spin   Which axes around which the molecule should spin.  The default is "XYZ", meaning rotate it freely in space.  "-spin Z" would rotate the molecule in the plane of the screen while not rotating it into or out of the screen; etc.
-no-spin Don't spin it at all: the same as -spin "".
-labels Draw labels on the atoms (or the spot where the atoms would be.) This is the default.
-no-labels Do not draw labels on the atoms.
-titles Print the name of the molecule and its chemical formula at the top of the screen.
-no-titles Do not print the molecule name.
-atoms  Represent the atoms as shaded spheres of appropriate sizes.  This is the default.
-no-atoms Do not draw spheres for the atoms: only draw bond lines.
-bonds  Represent the atomic bonds as solid tubes of appropriate thicknesses.  This is the default.
-no-bonds Do not draw the bonds: instead, make the spheres for the atoms be larger, for a "space-filling" representation of the molecule.
-wire   Draw a wireframe rendition of the molecule: this will consist only of single-pixel lines for the bonds, and text labels where the atoms go.  This will be very fast.
-timeout seconds When using the built-in data set, change to a new molecule every this-many seconds.  Default is 20 seconds.
-molecule filename Instead of using the built-in molecules, read one from the given file.  This file must be in PDB (Protein Data Base) format. (Note that it's not uncommon for PDB files to contain only the atoms, with no (or little) information about the atomic bonds.)
When the molecule is too large (bigger than about 30 angstroms from side to side), the -label option will be automatically turned off, because otherwise, the labels would overlap and completely obscure the display.
When the molecule is around 150 angstroms from side to side, wireframe mode will be turned on (because otherwise it would be too slow.)
Documentation on the PDB file format: http://www.rcsb.org/pdb/docs/format/pdbguide2.2/guide2.2_frame.html A good source of PDB files: http://www.sci.ouc.bc.ca/chem/molecule/molecule.html
Copyright Â© 2001 by Jamie Zawinski.  Permission to use, copy, modify, distribute, and sell this software and its documentation for any purpose is hereby granted without fee, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.  No representations are made about the suitability of this software for any purpose.  It is provided "as is" without express or implied warranty.
Jamie Zawinski <jwz@jwz.org>
mmcli(1)                          User Commands                         mmcli(1)
mmcli - Control and monitor the ModemManager
mmcli [OPTION...]
ModemManager is a DBus-powered Linux daemon which provides a unified high level API for communicating with (mobile broadband) modems. It acts as a standard RIL (Radio Interface Layer) and may be used by different connection managers, like NetworkManager. Thanks to the built-in plugin architecture, ModemManager talks to very different kinds of modems with very different kinds of ports. In addition to the standard AT serial ports, Qualcomm-based QCDM and QMI ports are also supported.
-h, --help Show summary of options by group.
--help-all Show all groups and options.
--help-manager Show manager specific options.
--help-common Show common options. These are used for defining the device an option operates on. For example, modems, bearers, SIMs, SMS', etc.
--help-modem Show modem specific options.
--help-3gpp Show 3GPP specific options.
--help-cdma Show CDMA specific options.
--help-simple Show simple options. These are useful for getting connected or disconnected and understanding the state of things as fast as possible without worrying so much about the details.
--help-location Show location or positioning specific options.
--help-messaging Show messaging specific options. See also --help-sms which is related.
--help-time Show time specific options.
--help-firmware Show firmware specific options.
--help-oma Show OMA specific options.
--help-sim Show SIM card specific options.
--help-bearer Show bearer specific options.
--help-sms Show SMS specific options. See also --help-messaging which is related.
-B, --get-daemon-version Retrieve the version of the currently running ModemManager daemon.
-G, --set-logging=[ERR|WARN|INFO|DEBUG] Set the logging level in ModemManager daemon. For debugging information you can supply DEBUG. Each value above DEBUG provides less detail. In most cases ERR (for displaying errors) are the important messages.
The default mode is ERR.
-L, --list-modems List available modems.
-M, --monitor-modems List available modems and monitor modems added or removed.
-S, --scan-modems Scan for any potential new modems. This is only useful when expecting pure RS232 modems, as they are not notified automatically by the kernel.
-I, --inhibit-device=[UID] Inhibit the specific device from being used by ModemManager. The UID that should be given is the value of the Device property exposed by a given modem (i.e. equal to the ID_MM_PHYSDEV_UID if one set, or otherwise equal to the full device sysfs path).
This command will not exit right away, as that would implicitly remove the inhibition. The user must make sure to stop the mmcli process hitting Ctrl+C in order to un-inhibit the device.
When a device is inhibited via this method, ModemManager will disable the modem (therefore stopping any ongoing connection) and will no longer use it until it is uninhibited.
--report-kernel-event=['KEY1=VALUE1,KEY2=VALUE2,...'] Manually report kernel events, instead of relying on udev (e.g. if the daemon is running with --no-auto-scan or if the system was built without udev support).
The supported KEYs are:
'action' Action to report, one of 'add' or 'remove'. Required.
'subsystem' Subsystem of the specific port being reported, e.g. 'tty' (for serial ports),
'name' Name of the port being reported, e.g. 'ttyACM0', 'wwan0' or 'cdc-wdm0'.
'uid'  The specific UID of the device, equivalent to the ID_MM_PHYSDEV_UID udev tag. All ports reported with the same 'UID' value will be considered part of the same device, which may be useful for e.g. modems with multiple platform TTYs.
--report-kernel-event-auto-scan When built with udev support but the daemon is running with --no-auto-scan, this method may be used to automatically report kernel events based on udev.
This command will not exit right away. The user must make sure to stop the mmcli process hitting Ctrl+C in order to stopping monitoring for new events.
All options below take a PATH or INDEX argument. If no action is provided, the default information about the modem, bearer, etc. is shown instead.
The PATH and INDEX are created automatically when the modem is plugged in. They can be found using mmcli -L. This produces something like (for modems only):
Found 1 modems: /org/freedesktop/ModemManager1/Modem/4
In this case, the INDEX is 4 and the PATH is the entire string above.
However, for the bearers, SIMs and SMS cases, the PATH is slightly different. The Modem is replaced with the object name in use, like Bearer. For example:
/org/freedesktop/ModemManager1/Bearer/4
-m, --modem=[PATH|INDEX] Specify a modem.
-b, --bearer=[PATH|INDEX] Specify a bearer.
-i, --sim=[PATH|INDEX] Specify a SIM card.
-s, --sms=[PATH|INDEX] Specify an SMS.
All of the modem options below make use of the --modem or -m switch to specify the modem to act on.
Some operations require a MODE. MODE can be any combination of the modes actually supported by the modem. In the perfect case, the following are possible:
'2G'  - 2G technologies, e.g. EDGE, CDMA1x '3G'  - 3G technologies, e.g. HSPA, EV-DO '4G'  - 4G technologies, e.g. LTE 'ANY' - for all supported modes.
-w, --monitor-state Monitor the state of a given modem.
-e, --enable Enable a given modem.
This powers the antenna, starts the automatic registration process and in general prepares the modem to be connected.
-d, --disable Disable a given modem.
This disconnects the existing connection(s) for the modem and puts it into a low power mode.
-r, --reset Resets the modem to the settings it had when it was power cycled.
--factory-reset=CODE Resets the modem to its original factory default settings.
The CODE provided is vendor specific. Without the correct vendor code, it's unlikely this operation will succeed. This is not a common user action.
--command=COMMAND Send an AT COMMAND to the given modem. For example, COMMAND could be 'AT+GMM' to probe for phone model information. This operation is only available when ModemManager is run in debug mode.
--create-bearer=['KEY1=VALUE1,KEY2=VALUE2,...'] Create a new packet data bearer for a given modem. The KEYs and some VALUEs are listed below:
'apn'  Access Point Name. Required in 3GPP.
'ip-type' Addressing type. Given as a MMBearerIpFamily value (e.g. 'ipv4', 'ipv6', 'ipv4v6'). Optional in 3GPP and CDMA.
'allowed-auth' Authentication method to use. Given as a MMBearerAllowedAuth value (e.g. 'none|pap|chap|mschap|mschapv2|eap'). Optional in 3GPP.
'user' User name (if any) required by the network. Optional in 3GPP.
'password' Password (if any) required by the network. Optional in 3GPP.
'allow-roaming' Flag to tell whether connection is allowed during roaming, given as a boolean value (i.e 'yes' or 'no'). Optional in 3GPP.
'rm-protocol' Protocol of the Rm interface, given as a MMModemCdmaRmProtocol value (e.g. 'async', 'packet- relay', 'packet-network-ppp', 'packet-network-slip', 'stu-iii'). Optional in CDMA.
'number' Telephone number to dial. Required in POTS.
--delete-bearer=[PATH|INDEX] Delete bearer from a given modem.
--set-allowed-modes=[MODE1|MODE2|...] Set allowed modes for a given modem. For possible modes, see the beginning of this section.
--set-preferred-mode=MODE Set the preferred MODE for the given modem. The MODE MUST be one of the allowed modes as set with the --set-allowed-modes option. Possible MODE arguments are detailed at the beginning of this section.
--set-current-bands=[BAND1|BAND2|...] Set bands to be used for a given modem. These are frequency ranges the modem should use. There are quite a number of supported bands and listing them all here would be quite extensive. For details, see the MMModemBand documentation.
An example would be: 'egsm|dcs|pcs|g850' to select all the GSM frequency bands.
--set-primary-sim-slot=[SLOT] Request to switch the primary SIM slot.
The given SLOT must be a valid slot number in the [1,N] range, where N is the amount of SIM slots available in the system.
--inhibit Inhibit the specific modem from being used by ModemManager. This method is completely equivalent to --inhibit-device, with the only difference being that in this case, the modem must be managed by the daemon at the time the inhibition is requested.
3GPP OPTIONS The 3rd Generation Partnership Project (3GPP) is a collaboration between groups of telecommunications associations. These options pertain to devices which support 3GPP.
Included are options to control USSD (Unstructured Supplementary Service Data) sessions.
All of the 3GPP options below make use of the --modem or -m switch to specify the modem to act on.
--3gpp-scan Scan for available 3GPP networks.
--3gpp-register-home Request a given modem to register in its home network.
This registers with the default network(s) specified by the modem,
--3gpp-register-in-operator=MCCMNC Request a given modem to register on the network of the given MCCMNC (Mobile Country Code, Mobile Network Code) based operator. This code is used for GSM/LTE, CDMA, iDEN, TETRA and UMTS public land mobile networks and some satellite mobile networks. The ITU-T Recommendation E.212 defines mobile country codes.
--3gpp-ussd-status Request the status of ANY ongoing USSD session.
--3gpp-ussd-initiate=COMMAND Request the given modem to initiate a USSD session with COMMAND.
For example, COMMAND could be '*101#' to give your current pre-pay balance.
--3gpp-ussd-respond=RESPONSE When initiating an USSD session, a RESPONSE may be needed by a network-originated request. This option allows for that.
--3gpp-ussd-cancel Cancel an ongoing USSD session for a given modem.
--3gpp-disable-facility-lock=FACILITY,CONTROL_KEY Disable selected facility lock using provided control key.
'FACILITY' One of the following types of lock: 'net-pers'  - network personalization 'net-sub-pers'  - network subset personalization 'provider-pers' - provider personalization 'corp-pers' - corporate personalization
'CONTROL_KEY' Alphanumeric code to unlock facility.
All CDMA (Code Division Multiple Access) options require the --modem or -m option.
--cdma-activate=CARRIER Activate the given modem using OTA (Over the Air) settings. The CARRIER is a code provided by the network for the default settings they provide.
All simple options must be used with --modem or -m.
--simple-connect=['KEY1=VALUE1,KEY2=VALUE2,...'] Run a full connection sequence using KEY / VALUE pairs.  You can use the --create-bearer options, plus any of the following ones:
'pin'  SIM-PIN unlock code.
'operator-id' ETSI MCC-MNC of a network to force registration.
--simple-disconnect Disconnect ALL connected bearers for a given modem.
These options detail how to discover your location using Global Positioning System (GPS) or directly from your mobile network infrastructure (either 3GPP or 3GPP2).
All location options must be used with --modem or -m.
--location-status Show the current status for discovering our location.
--location-get Show all location information available.
--location-enable-3gpp Enable location discovery using the 3GPP network.
--location-disable-3gpp Disable location discovery using the 3GPP network.
--location-enable-agps-msa Enable A-GPS (MSA) support. This command does not implicitly start the GPS engine, it just specifies that A-GPS should be enabled when the engine is started. Therefore, the user should request enabling A-GPS before the raw or NMEA outputs are enabled with --location-enable-gps-raw or --location-enable-gps-nmea.
--location-disable-agps-msa Disable A-GPS (MSA) support.
--location-enable-agps-msb Enable A-GPS (MSB) support. This command does not implicitly start the GPS engine, it just specifies that A-GPS should be enabled when the engine is started. Therefore, the user should request enabling A-GPS before the raw or NMEA outputs are enabled with --location-enable-gps-raw or --location-enable-gps-nmea.
--location-disable-agps-msb Disable A-GPS (MSB) support.
--location-enable-gps-nmea Enable location discovery using GPS and reported with NMEA traces.
This command will start the GPS engine, if it isn't started already.
--location-disable-gps-nmea Disable location discovery using GPS and NMEA traces.
If the raw output is not enabled at the same time, the GPS engine will be stopped.
--location-enable-gps-raw Enable location discovery using GPS and reported with raw (i.e. longitude/latitude) values.
--location-disable-gps-raw Disable location discovery using GPS and raw values.
If the NMEA output is not enabled at the same time, the GPS engine will be stopped.
--location-enable-cdma-bs Enable location discovery using the 3GPP2 network.
--location-disable-cdma-bs Disable location discovery using the 3GPP2 network.
--location-enable-gps-unmanaged Enable location discovery using GPS but without taking control of the NMEA tty port. This allows other programs, e.g. gpsd, to use the NMEA tty once the GPS engine has been enabled.
--location-disable-gps-unmanaged Disable location discovery using GPS and unmanaged port.
--location-set-gps-refresh-rate=SEC Set the location refresh rate on the DBus interface to SEC seconds. If set to 0, the new location is published on the DBus interface as soon as ModemManager detects it.
--location-set-supl-server=[IP:PORT] or --location-set-supl-server=[FQDN:PORT] Configure the location of the A-GPS SUPL server, either specifying the IP address (IP:PORT) or specifyng a fully qualified domain name ([FQDN:PORT]).
--location-inject-assistance-data=[PATH] Inject assistance data into the GNSS module, loaded from a local file at PATH. The assistance data should be in a format expected by the device, e.g. downloaded from the URLs exposed by the 'AssistanceDataServers' property.
--location-set-enable-signal Enable reporting location updates via DBus property signals. This is required if applications rely on listening to 'Location' property updates, instead of explicit queries with the policy- protected 'GetLocation' method.
This DBus property signal updates are by default disabled.
--location-set-disable-signal Disable reporting location updates via DBus property signals.
All messaging options must be used with --modem or -m.
--messaging-status Show the status of the messaging support.
--messaging-list-sms List SMS messages available on a given modem.
--messaging-create-sms=['KEY1=VALUE1,...'] Create a new SMS on a given modem. KEYs can be any of the following:
'number' Number to which the message is addressed.
'text' Message text, in UTF-8. When sending, if the text is larger than the limit of the technology or modem, the message will be broken into multiple parts or messages. Note that text and data are never given at the same time.
'smsc' Indicates the SMS service center number.
'validity' Specifies when the SMS expires in the SMSC.
'class' 3GPP message class (0..3).
'delivery-report-request' Specifies whether delivery report is requested when sending the SMS ('yes' or 'no')
'storage' Specifies the storage where this message is kept. Storages may be 'sm', 'me', 'mt', 'sr', 'bm', 'ta'.
--messaging-create-sms-with-data=PATH Use PATH to a filename as the data to create a new SMS.
--messaging-delete-sms=[PATH|INDEX] Delete an SMS from a given modem.
All time operations require the --modem or -m option.
--time Display the current network time from the operator. This includes the timezone which is usually of importance.
All voice operations require the --modem or -m option.
--voice-list-calls List calls managed (initiated, received, ongoing) on a given modem.
--voice-create-call=['KEY1=VALUE1,...'] Create a new outgoing call on a given modem. KEYs can be any of the following:
'number' Number to call.
--voice-delete-call=[PATH|INDEX] Delete a call from a given modem.
All firmware options require the --modem or -m option.
--firmware-status Show firmware update specific details and properties.
--firmware-list List all the firmware images installed on a given modem.
--firmware-select=ID Select a firmware image from those installed on a given modem. A list of available firmware images can be seen using the --firmware-list option.
The ID provided is a UNIQUE identifier for the firmware.
All signal options require the --modem or -m option.
--signal-setup=[Rate] Setup extended signal quality information retrieval at the specified rate (in seconds).
By default this is disabled (rate set to 0).
--signal-get Retrieve the last extended signal quality information loaded.
All OMA options require the --modem or -m option.
--oma-status Show the status of the OMA device management subsystem.
--oma-start-client-initiated-session=[SESSION TYPE] Request to start a client initiated session.
The given session type must be one of: 'client-initiated-device-configure' 'client-initiated-prl-update' 'client-initiated-hands-free-activation'
--oma-accept-network-initiated-session=[SESSION ID] Request to accept a network initiated session.
--oma-reject-network-initiated-session=[SESSION ID] Request to reject a network initiated session.
--oma-cancel-session Request to cancel current OMA session, if any.
--pin=PIN Send PIN code to a given SIM card.
--puk=PUK Send PUK code to a given SIM card. This must be used WITH --pin.
--enable-pin Enable PIN request for a given SIM card. This must be used WITH --pin.
--disable-pin Disable PIN request for a given SIM card. This must be used WITH --pin.
--change-pin=PIN Change the PIN for a given SIM card. It will be set to PIN. This must be used WITH --pin to supply the old PIN number.
All bearer options require the --bearer or -b option.
-c, --connect Connect to a given bearer.
-x, --disconnect Disconnect from a given bearer.
All SMS options require the --sms or -s option.
--send Send an SMS.
--store This option will store the SMS in the default storage defined by the modem, which may be either modem-memory or SMS-memory. To know what the existing default storage is, see the --messaging-status option.
--store-in-storage=STORAGE This option states which STORAGE to use for SMS messages. Possible values for STORAGE include:
'sm'   SIM card storage area.
'me'   Mobile equipment storage area.
'mt'   Sum of SIM and Mobile equipment storages
'sr'   Status report message storage area.
'bm'   Broadcast message storage area.
'ta'   Terminal adaptor message storage area.
--create-file-with-data=PATH This option takes an SMS that has DATA (not TEXT) and will create a local file described by PATH and store the content of the SMS there.
--start Initiate an outgoing call.
--accept Accept an incoming call.
--hangup Reject an incoming call or hangup an ongoing one.
--send-dtmf=[0-9A-D*#] Send a DTMF sequence through an ongoing call.
-J, --output-json Run action with machine-friendly JSON output, to be used e.g. by shell scripts that rely on mmcli operations.
-K, --output-keyvalue Run action with machine-friendly key-value output, to be used e.g. by shell scripts that rely on mmcli operations.
-v, --verbose Perform actions with more details reported and/or logged.
-V, --version Returns the version of this program.
-a, --async Use asynchronous methods. This is purely a development tool and has no practical benefit to most user operations.
--timeout=SECONDS Use SECONDS for the timeout when performing operations with this command. This option is useful when executing long running operations, like --3gpp-scan.
Send the PIN to the SIM card You'll need first to know which the proper path/index is for the SIM in your modem: $ mmcli -m 0 -K | grep "modem.generic.sim" | awk -F ": " '{ print $2 }' /org/freedesktop/ModemManager1/SIM/0
And after that, you can just use the SIM index: $ sudo mmcli -i 0 --pin=1234 successfully sent PIN code to the SIM
Simple connect and disconnect You can launch the simple connection process like: $ sudo mmcli -m 0 --simple-connect="pin=1234,apn=internet" successfully connected the modem
Then, you can disconnect it like: $ sudo mmcli -m 0 --simple-disconnect successfully disconnected all bearers in the modem
3GPP network scan Scanning for 3GPP networks may really take a long time, so a specific timeout must be given: $ sudo mmcli -m 0 --3gpp-scan --timeout=300 --------------------- 3GPP scan | networks: 21403 - Orange SP (gprs, unknown) |           21407 - Movistar (gprs, unknown) |           21404 - YOIGO (gprs, unknown) |           21401 - vodafone ES (gprs, unknown)
Creating a new SMS message & storing it Using the “sm” (SIM), you can do this using:
$ sudo mmcli -m 0 --messaging-create-sms="text='Hello world',number='+1234567890'" Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/21 (unknown)
$ sudo mmcli -s 21 --store-in-storage="sm" successfully stored the SMS
$ sudo mmcli -s 21 ------------------------------- General    |         dbus path: /org/freedesktop/ModemManager1/SMS/21 ------------------------------- Content    |            number: +1234567890 |              text: Hello world ------------------------------- Properties |          PDU type: submit |             state: stored |              smsc: unknown |          validity: 0 |             class: 0 |           storage: sm |   delivery report: not requested | message reference: 0
$ sudo mmcli -m 0 --messaging-status ---------------------------- Messaging | supported storages: sm, me |    default storage: me
Sending binary SMS messages from files As you can see below, the important part is the --messaging-create-sms-with-data and the PATH provided.
$ sudo mmcli -m 0 \ --messaging-create-sms="number='+1234567890'" \ --messaging-create-sms-with-data=/path/to/your/file Successfully created new SMS: /org/freedesktop/ModemManager1/SMS/22 (unknown)
$ sudo mmcli -s 22 --send successfully sent the SMS
Listing SMS messages When the receiver gets all the parts of the message, they can now recover the sent file with another mmcli command in their ModemManager setup:
$> sudo mmcli -m 0 --messaging-list-sms /org/freedesktop/ModemManager1/SMS/0 (received)
$> sudo mmcli -s 0 --create-file-with-data=/path/to/the/output/file
GPS location status You first need to check whether the modem has GPS-specific location capabilities. Note that we’ll assume the modem is exposed as index 0; if you have more than one modem, just use --list-modems to check the proper modem index:
$ mmcli -m 0 --location-status ---------------------------- Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea |      enabled: none |      signals: no
The output says that the modem supports 3GPP Location area code/Cell ID, GPS raw and GPS-NMEA location sources. None is enabled yet, as we didn’t enable the modem, which we can do issuing:
$ sudo mmcli -m 0 --enable successfully enabled the modem
$ mmcli -m 0 --location-status ---------------------------- Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea |      enabled: 3gpp-lac-ci |      signals: no
GPS location technology enabling We can start the GPS engine by enabling the RAW or NMEA GPS location sources:
$ sudo mmcli -m 0 \ --location-enable-gps-raw \ --location-enable-gps-nmea successfully setup location gathering
If we do check again the status, we’ll see the GPS-specific locations are enabled:
$ mmcli -m 0 --location-status -------------------------------- Location | capabilities: 3gpp-lac-ci, gps-raw, gps-nmea |      enabled: 3gpp-lac-ci, gps-raw, gps-nmea |      signals: no
GPS location retrieval You can query all location information at the same time with a single command.  If any of the specific outputs is not available, the corresponding section will be omitted from the output.
$ sudo mmcli -m 0 --location-get ------------------------- 3GPP location   | Mobile country code: 214 | Mobile network code: 3 |  Location area code: 21071 |             Cell ID: 7033737 ------------------------- GPS NMEA traces | $GPGGA,,,,,,0,,,,,,,,*66 | $GPRMC,,V,,,,,,,,,,N*53 | $GPGSA,A,1,,,,,,,,,,,,,,,*1E | $GPGSV,4,1,16,24,,,,29,,,,05,,,,18,,,*7A | $GPGSV,4,2,16,22,,,,14,,,,11,,,,17,,,*7B | $GPGSV,4,3,16,03,,,,12,,,,30,,,,13,,,*78 | $GPGSV,4,4,16,23,,,,15,,,,27,,,,07,,,*79 | $GPVTG,,T,,M,,N,,K,N*2C
A-GPS support If A-GPS is enabled before starting the GPS engine, and if a data connection is available in the modem, the configured SUPL servers may be used to obtain a faster initial position fix.
Note that the GPS engine will not be started when just A-GPS capability is enabled. An explicit output (RAW or NMEA) is required to be enabled in order to start the GPS engine.
$ mmcli -m 0 --location-status -------------------------------- Location |      capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps- msa, agps-msb |           enabled: 3gpp-lac-ci |           signals: no ----------------------------- GPS      |      refresh rate: 30 seconds | a-gps supl server: supl.google.com:7276
$ sudo mmcli -m 0 --location-enable-agps-msa successfully setup location gathering
$ sudo mmcli -m 0 --location-enable-gps-nmea successfully setup location gathering
$ sudo mmcli -m 0 --location-enable-gps-raw successfully setup location gathering
Injecting assistance data If the modem device does not have an ongoing connection (e.g. no mobile network coverage) but the system has other means to access the Internet (e.g. WiFi), the user may be able to download location assistance data and inject it in the module.
E.g. If the device supports XTRA assistance data, the user may download it from one of the servers listed by ModemManager and manually inject it afterwards. The XTRA assistance data is usually valid for several days.
$ mmcli -m 0 --location-status -------------------------------- Location |         capabilities: 3gpp-lac-ci, gps-raw, gps-nmea, agps-msa, agps-msb |              enabled: 3gpp-lac-ci |              signals: no -------------------------------- GPS      |         refresh rate: 30 seconds |    a-gps supl server: supl.google.com:7276 | supported assistance: xtra |   assistance servers: https://xtrapath3.izatcloud.net/xtra3grcej.bin | https://xtrapath1.izatcloud.net/xtra3grcej.bin | https://xtrapath2.izatcloud.net/xtra3grcej.bin
$ wget -q https://xtrapath3.izatcloud.net/xtra3grcej.bin
$ sudo mmcli -m 0 --location-inject-assistance-data=./xtra3grcej.bin successfully injected assistance data
Key-Value output Writing shell scripts that use mmcli to perform operations with the modem is easy when using the --output-keyvalue option. For example, you could gather all the main status information of the modem with a single call and then parse it to read single fields:
$ STATUS=$(mmcli -m 0 --output-keyvalue) $ echo "${STATUS}" | grep "modem.generic.state " | awk -F ": " '{ print $2 }' failed $ echo "${STATUS}" | grep "modem.generic.state-failed-reason " | awk -F ": " '{ print $2 }' sim-missing
Written by Martyn Russell <martyn@lanedo.com> and Aleksander Morgado <aleksander@aleksander.es>
ModemManager(8), NetworkManager(8)
AT (http://en.wikipedia.org/wiki/AT_commands).
3GPP (http://en.wikipedia.org/wiki/3GPP).
MCCMNC (http://en.wikipedia.org/wiki/Mobile_Network_Code).
USSD (http://en.wikipedia.org/wiki/Unstructured_Supplementary_Service_Data).
CDMA (http://en.wikipedia.org/wiki/Code_division_multiple_access).
OTA (http://en.wikipedia.org/wiki/Over-the-air_programming).
GPS (http://en.wikipedia.org/wiki/Global_Positioning_System)
NMEA (http://en.wikipedia.org/wiki/NMEA_0183)
GIT-SHOW-BRANCH(1)                 Git Manual                 GIT-SHOW-BRANCH(1)
git-show-branch - Show branches and their commits
git show-branch [-a|--all] [-r|--remotes] [--topo-order | --date-order] [--current] [--color[=<when>] | --no-color] [--sparse] [--more=<n> | --list | --independent | --merge-base] [--no-name | --sha1-name] [--topics] [(<rev> | <glob>)...] git show-branch (-g|--reflog)[=<n>[,<base>]] [--list] [<ref>]
Shows the commit ancestry graph starting from the commits named with <rev>s or <glob>s (or all refs under refs/heads and/or refs/tags) semi-visually.
It cannot show more than 29 branches and commits at a time.