command
stringlengths 1
42
| description
stringlengths 29
182k
⌀ | name
stringlengths 7
64.9k
⌀ | synopsis
stringlengths 4
85.3k
⌀ | options
stringclasses 593
values | examples
stringclasses 455
values |
|---|---|---|---|---|---|
batch
|
The at and batch utilities read commands from standard input or a specified file which are to be executed at a later time, using sh(1). at executes commands at a specified time; atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed; atrm deletes jobs; batch executes commands when system load levels permit; in other words, when the load average drops below 1.5 times number of active CPUs, or the value specified in the invocation of atrun. The at utility allows some moderately complex time specifications. It accepts times of the form HHMM or HH:MM to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: midnight, noon, or teatime (4pm) and time-of-day may be suffixed with AM, PM, or UTC for running in the morning, the evening, or in UTC time. The day on which the job is to be run may also be specified by giving a date in the form month-name day with an optional year, or giving a date of the forms DD.MM.YYYY, DD.MM.YY, MM/DD/YYYY, MM/DD/YY, MMDDYYYY, or MMDDYY. The specification of a date must follow the specification of the time of day. Time can also be specified as: [now] + count time-units, where the time- units can be minutes, hours, days, weeks, months or years and at may be told to run the job today by suffixing the time with today and to run the job tomorrow by suffixing the time with tomorrow. The shortcut next can be used instead of + 1. For example, to run a job at 4pm three days from now, use at 4pm + 3 days, to run a job at 10:00am on July 31, use at 10am Jul 31 and to run a job at 1am tomorrow, use at 1am tomorrow. The at utility also supports the POSIX time format (see -t option). For both at and batch, commands are read from standard input or the file specified with the -f option and executed. The working directory, the environment (except for the variables TERM, TERMCAP, DISPLAY and _) and the umask are retained from the time of invocation. An at or batch command invoked from a su(1) shell will retain the current userid. The user will be mailed standard error and standard output from his commands, if any. Mail will be sent using the command sendmail(8). If at is executed from a su(1) shell, the owner of the login shell will receive the mail. The superuser may use these commands in any case. For other users, permission to use at is determined by the files /usr/lib/cron/at.allow and /usr/lib/cron/at.deny. If the file /usr/lib/cron/at.allow exists, only usernames mentioned in it are allowed to use at. In these two files, a user is considered to be listed only if the user name has no blank or other characters before it on its line and a newline character immediately after the name, even at the end of the file. Other lines are ignored and may be used for comments. If /usr/lib/cron/at.allow does not exist, /usr/lib/cron/at.deny is checked, every username not mentioned in it is then allowed to use at. If neither exists, only the superuser is allowed use of at. This is the default configuration. IMPLEMENTATION NOTES Note that at is implemented through the launchd(8) daemon periodically invoking atrun(8), which is disabled by default. See atrun(8) for information about enabling atrun.
|
at, batch, atq, atrm – queue, examine or delete jobs for later execution
|
at [-q queue] [-f file] [-mldbv] time at [-q queue] [-f file] [-mldbv] -t [[CC]YY]MMDDhhmm[.SS] at -c job [job ...] at -l [job ...] at -l -q queue at -r job [job ...] atq [-q queue] [-v] atrm job [job ...] batch [-q queue] [-f file] [-mv] [time]
|
-q queue Use the specified queue. A queue designation consists of a single letter; valid queue designations range from a to z and A to Z. The a queue is the default for at and the b queue for batch. Queues with higher letters run with increased niceness. If a job is submitted to a queue designated with an uppercase letter, it is treated as if it had been submitted to batch at that time. If atq is given a specific queue, it will only show jobs pending in that queue. -m Send mail to the user when the job has completed even if there was no output. -f file Read the job from file rather than standard input. -l With no arguments, list all jobs for the invoking user. If one or more job numbers are given, list only those jobs. -d Is an alias for atrm (this option is deprecated; use -r instead). -b Is an alias for batch. -v For atq, shows completed but not yet deleted jobs in the queue; otherwise shows the time the job will be executed. -c Cat the jobs listed on the command line to standard output. -r Remove the specified jobs. -t Specify the job time using the POSIX time format. The argument should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following: CC The first two digits of the year (the century). YY The second two digits of the year. MM The month of the year, from 1 to 12. DD the day of the month, from 1 to 31. hh The hour of the day, from 0 to 23. mm The minute of the hour, from 0 to 59. SS The second of the minute, from 0 to 60. If the CC and YY letter pairs are not specified, the values default to the current year. If the SS letter pair is not specified, the value defaults to 0. FILES /usr/lib/cron/jobs directory containing job files /usr/lib/cron/spool directory containing output spool files /var/run/utmpx login records /usr/lib/cron/at.allow allow permission control /usr/lib/cron/at.deny deny permission control /usr/lib/cron/jobs/.lockfile job-creation lock file SEE ALSO nice(1), sh(1), umask(2), compat(5), atrun(8), cron(8), launchd(8), sendmail(8) AUTHORS At was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>. The time parsing routines are by David Parsons <orc@pell.chi.il.us>, with minor enhancements by Joe Halpin <joe.halpin@attbi.com>. BUGS If the file /var/run/utmpx is not available or corrupted, or if the user is not logged on at the time at is invoked, the mail is sent to the userid found in the environment variable LOGNAME. If that is undefined or empty, the current userid is assumed. The at and batch utilities as presently implemented are not suitable when users are competing for resources. If this is the case, another batch system such as nqs may be more suitable. Specifying a date past 2038 may not work on some systems. macOS 14.5 August 11, 2018 macOS 14.5
| null |
sqlite3
|
To start a sqlite3 interactive session, invoke the sqlite3 command and optionally provide the name of a database file. If the database file does not exist, it will be created. If the database file does exist, it will be opened. For example, to create a new database file named "mydata.db", create a table named "memos" and insert a couple of records into that table: $ sqlite3 mydata.db SQLite version 3.8.8 Enter ".help" for instructions sqlite> create table memos(text, priority INTEGER); sqlite> insert into memos values('deliver project description', 10); sqlite> insert into memos values('lunch with Christine', 100); sqlite> select * from memos; deliver project description|10 lunch with Christine|100 sqlite> If no database name is supplied, the ATTACH sql command can be used to attach to existing or create new database files. ATTACH can also be used to attach to multiple databases within the same interactive session. This is useful for migrating data between databases, possibly changing the schema along the way. Optionally, a SQL statement or set of SQL statements can be supplied as a single argument. Multiple statements should be separated by semi- colons. For example: $ sqlite3 -line mydata.db 'select * from memos where priority > 20;' text = lunch with Christine priority = 100 SQLITE META-COMMANDS The interactive interpreter offers a set of meta-commands that can be used to control the output format, examine the currently attached database files, or perform administrative operations upon the attached databases (such as rebuilding indices). Meta-commands are always prefixed with a dot (.). A list of available meta-commands can be viewed at any time by issuing the '.help' command. For example: sqlite> .help .backup ?DB? FILE Backup DB (default "main") to FILE .bail on|off Stop after hitting an error. Default OFF .clone NEWDB Clone data into NEWDB from the existing database .databases List names and files of attached databases .dump ?TABLE? ... Dump the database in an SQL text format If TABLE specified, only dump tables matching LIKE pattern TABLE. .echo on|off Turn command echo on or off .eqp on|off Enable or disable automatic EXPLAIN QUERY PLAN .exit Exit this program .explain ?on|off? Turn output mode suitable for EXPLAIN on or off. With no args, it turns EXPLAIN on. .fullschema Show schema and the content of sqlite_stat tables .headers on|off Turn display of headers on or off .help Show this message .import FILE TABLE Import data from FILE into TABLE .indices ?TABLE? Show names of all indices If TABLE specified, only show indices for tables matching LIKE pattern TABLE. .load FILE ?ENTRY? Load an extension library .log FILE|off Turn logging on or off. FILE can be stderr/stdout .mode MODE ?TABLE? Set output mode where MODE is one of: csv Comma-separated values column Left-aligned columns. (See .width) html HTML <table> code insert SQL insert statements for TABLE line One value per line list Values delimited by .separator string tabs Tab-separated values tcl TCL list elements .nullvalue STRING Use STRING in place of NULL values .once FILENAME Output for the next SQL command only to FILENAME .open ?FILENAME? Close existing database and reopen FILENAME .output ?FILENAME? Send output to FILENAME or stdout .print STRING... Print literal STRING .prompt MAIN CONTINUE Replace the standard prompts .quit Exit this program .read FILENAME Execute SQL in FILENAME .restore ?DB? FILE Restore content of DB (default "main") from FILE .save FILE Write in-memory database into FILE .schema ?TABLE? Show the CREATE statements If TABLE specified, only show tables matching LIKE pattern TABLE. .separator STRING ?NL? Change separator used by output mode and .import NL is the end-of-line mark for CSV .shell CMD ARGS... Run CMD ARGS... in a system shell .show Show the current values for various settings .stats on|off Turn stats on or off .system CMD ARGS... Run CMD ARGS... in a system shell .tables ?TABLE? List names of tables If TABLE specified, only list tables matching LIKE pattern TABLE. .timeout MS Try opening locked tables for MS milliseconds .timer on|off Turn SQL timer on or off .trace FILE|off Output each SQL statement as it is run .vfsname ?AUX? Print the name of the VFS stack .width NUM1 NUM2 ... Set column widths for "column" mode Negative values right-justify sqlite>
|
sqlite3 - A command line interface for SQLite version 3
|
sqlite3 [options] [databasefile] [SQL] SUMMARY sqlite3 is a terminal-based front-end to the SQLite library that can evaluate queries interactively and display the results in multiple formats. sqlite3 can also be used within shell scripts and other applications to provide batch processing features.
|
sqlite3 has the following options: -bail Stop after hitting an error. -batch Force batch I/O. -column Query results will be displayed in a table like form, using whitespace characters to separate the columns and align the output. -cmd command run command before reading stdin -csv Set output mode to CSV (comma separated values). -echo Print commands before execution. -init file Read and execute commands from file , which can contain a mix of SQL statements and meta-commands. -[no]header Turn headers on or off. -help Show help on options and exit. -html Query results will be output as simple HTML tables. -interactive Force interactive I/O. -line Query results will be displayed with one value per line, rows separated by a blank line. Designed to be easily parsed by scripts or other programs -list Query results will be displayed with the separator (|, by default) character between each field value. The default. -mmap N Set default mmap size to N -nullvalue string Set string used to represent NULL values. Default is '' (empty string). -separator separator Set output field separator. Default is '|'. -stats Print memory stats before each finalize. -version Show SQLite version. -vfs name Use name as the default VFS. INIT FILE sqlite3 reads an initialization file to set the configuration of the interactive environment. Throughout initialization, any previously specified setting can be overridden. The sequence of initialization is as follows: o The default configuration is established as follows: mode = LIST separator = "|" main prompt = "sqlite> " continue prompt = " ...> " o If the file ~/.sqliterc exists, it is processed first. can be found in the user's home directory, it is read and processed. It should generally only contain meta-commands. o If the -init option is present, the specified file is processed. o All other command line options are processed. SEE ALSO http://www.sqlite.org/cli.html The sqlite3-doc package. AUTHOR This manual page was originally written by Andreas Rottmann <rotty@debian.org>, for the Debian GNU/Linux system (but may be used by others). It was subsequently revised by Bill Bumgarner <bbum@mac.com> and further updated by Laszlo Boszormenyi <gcs@debian.hu> . Fri Oct 31 10:41:31 EDT 2014 SQLITE3(1)
| null |
make
|
The purpose of the make utility is to determine automatically which pieces of a large program need to be recompiled, and issue the commands to recompile them. The manual describes the GNU implementation of make, which was written by Richard Stallman and Roland McGrath, and is currently maintained by Paul Smith. Our examples show C programs, since they are most common, but you can use make with any programming language whose compiler can be run with a shell command. In fact, make is not limited to programs. You can use it to describe any task where some files must be updated automatically from others whenever the others change. To prepare to use make, you must write a file called the makefile that describes the relationships among files in your program, and the states the commands for updating each file. In a program, typically the executable file is updated from object files, which are in turn made by compiling source files. Once a suitable makefile exists, each time you change some source files, this simple shell command: make suffices to perform all necessary recompilations. The make program uses the makefile data base and the last-modification times of the files to decide which of the files need to be updated. For each of those files, it issues the commands recorded in the data base. make executes commands in the makefile to update one or more target names, where name is typically a program. If no -f option is present, make will look for the makefiles GNUmakefile, makefile, and Makefile, in that order. Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears prominently near the beginning of a directory listing, right near other important files such as README.) The first name checked, GNUmakefile, is not recommended for most makefiles. You should use this name if you have a makefile that is specific to GNU make, and will not be understood by other versions of make. If makefile is `-', the standard input is read. make updates a target if it depends on prerequisite files that have been modified since the target was last modified, or if the target does not exist.
|
make - GNU make utility to maintain groups of programs
|
make [ -f makefile ] [ options ] ... [ targets ] ... WARNING This man page is an extract of the documentation of GNU make. It is updated only occasionally, because the GNU project does not use nroff. For complete, current documentation, refer to the Info file make.info which is made from the Texinfo source file make.texi.
|
-b, -m These options are ignored for compatibility with other versions of make. -B, --always-make Unconditionally make all targets. -C dir, --directory=dir Change to directory dir before reading the makefiles or doing anything else. If multiple -C options are specified, each is interpreted relative to the previous one: -C / -C etc is equivalent to -C /etc. This is typically used with recursive invocations of make. -d Print debugging information in addition to normal processing. The debugging information says which files are being considered for remaking, which file-times are being compared and with what results, which files actually need to be remade, which implicit rules are considered and which are applied---everything interesting about how make decides what to do. --debug[=FLAGS] Print debugging information in addition to normal processing. If the FLAGS are omitted, then the behavior is the same as if -d was specified. FLAGS may be a for all debugging output (same as using -d), b for basic debugging, v for more verbose basic debugging, i for showing implicit rules, j for details on invocation of commands, and m for debugging while remaking makefiles. -e, --environment-overrides Give variables taken from the environment precedence over variables from makefiles. +-f file, --file=file, --makefile=FILE Use file as a makefile. -i, --ignore-errors Ignore all errors in commands executed to remake files. -I dir, --include-dir=dir Specifies a directory dir to search for included makefiles. If several -I options are used to specify several directories, the directories are searched in the order specified. Unlike the arguments to other flags of make, directories given with -I flags may come directly after the flag: -Idir is allowed, as well as -I dir. This syntax is allowed for compatibility with the C preprocessor's -I flag. -j [jobs], --jobs[=jobs] Specifies the number of jobs (commands) to run simultaneously. If there is more than one -j option, the last one is effective. If the -j option is given without an argument, make will not limit the number of jobs that can run simultaneously. -k, --keep-going Continue as much as possible after an error. While the target that failed, and those that depend on it, cannot be remade, the other dependencies of these targets can be processed all the same. -l [load], --load-average[=load] Specifies that no new jobs (commands) should be started if there are others jobs running and the load average is at least load (a floating-point number). With no argument, removes a previous load limit. -L, --check-symlink-times Use the latest mtime between symlinks and target. -n, --just-print, --dry-run, --recon Print the commands that would be executed, but do not execute them. -o file, --old-file=file, --assume-old=file Do not remake the file file even if it is older than its dependencies, and do not remake anything on account of changes in file. Essentially the file is treated as very old and its rules are ignored. -p, --print-data-base Print the data base (rules and variable values) that results from reading the makefiles; then execute as usual or as otherwise specified. This also prints the version information given by the -v switch (see below). To print the data base without trying to remake any files, use make -p -f/dev/null. -q, --question ``Question mode''. Do not run any commands, or print anything; just return an exit status that is zero if the specified targets are already up to date, nonzero otherwise. -r, --no-builtin-rules Eliminate use of the built-in implicit rules. Also clear out the default list of suffixes for suffix rules. -R, --no-builtin-variables Don't define any built-in variables. -s, --silent, --quiet Silent operation; do not print the commands as they are executed. -S, --no-keep-going, --stop Cancel the effect of the -k option. This is never necessary except in a recursive make where -k might be inherited from the top-level make via MAKEFLAGS or if you set -k in MAKEFLAGS in your environment. -t, --touch Touch files (mark them up to date without really changing them) instead of running their commands. This is used to pretend that the commands were done, in order to fool future invocations of make. -v, --version Print the version of the make program plus a copyright, a list of authors and a notice that there is no warranty. -w, --print-directory Print a message containing the working directory before and after other processing. This may be useful for tracking down errors from complicated nests of recursive make commands. --no-print-directory Turn off -w, even if it was turned on implicitly. -W file, --what-if=file, --new-file=file, --assume-new=file Pretend that the target file has just been modified. When used with the -n flag, this shows you what would happen if you were to modify that file. Without -n, it is almost the same as running a touch command on the given file before running make, except that the modification time is changed only in the imagination of make. --warn-undefined-variables Warn when an undefined variable is referenced. EXIT STATUS GNU make exits with a status of zero if all makefiles were successfully parsed and no targets that were built failed. A status of one will be returned if the -q flag was used and make determines that a target needs to be rebuilt. A status of two will be returned if any errors were encountered. SEE ALSO The GNU Make Manual BUGS See the chapter `Problems and Bugs' in The GNU Make Manual. AUTHOR This manual page contributed by Dennis Morse of Stanford University. It has been reworked by Roland McGrath. Further updates contributed by Mike Frysinger. COPYRIGHT Copyright (C) 1992, 1993, 1996, 1999 Free Software Foundation, Inc. This file is part of GNU make. GNU make is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. GNU make is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with GNU make; see the file COPYING. If not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. GNU 22 August 1989 MAKE(1)
| null |
pod2html5.34
|
Converts files from pod format (see perlpod) to HTML format. ARGUMENTS pod2html takes the following arguments: help --help Displays the usage message. htmldir --htmldir=name Sets the directory to which all cross references in the resulting HTML file will be relative. Not passing this causes all links to be absolute since this is the value that tells Pod::Html the root of the documentation tree. Do not use this and --htmlroot in the same call to pod2html; they are mutually exclusive. htmlroot --htmlroot=URL Sets the base URL for the HTML files. When cross-references are made, the HTML root is prepended to the URL. Do not use this if relative links are desired: use --htmldir instead. Do not pass both this and --htmldir to pod2html; they are mutually exclusive. infile --infile=name Specify the pod file to convert. Input is taken from STDIN if no infile is specified. outfile --outfile=name Specify the HTML file to create. Output goes to STDOUT if no outfile is specified. podroot --podroot=name Specify the base directory for finding library pods. podpath --podpath=name:...:name Specify which subdirectories of the podroot contain pod files whose HTML converted forms can be linked-to in cross-references. cachedir --cachedir=name Specify which directory is used for storing cache. Default directory is the current working directory. flush --flush Flush the cache. backlink --backlink Turn =head1 directives into links pointing to the top of the HTML file. nobacklink --nobacklink Do not turn =head1 directives into links pointing to the top of the HTML file (default behaviour). header --header Create header and footer blocks containing the text of the "NAME" section. noheader --noheader Do not create header and footer blocks containing the text of the "NAME" section (default behaviour). poderrors --poderrors Include a "POD ERRORS" section in the outfile if there were any POD errors in the infile (default behaviour). nopoderrors --nopoderrors Do not include a "POD ERRORS" section in the outfile if there were any POD errors in the infile. index --index Generate an index at the top of the HTML file (default behaviour). noindex --noindex Do not generate an index at the top of the HTML file. recurse --recurse Recurse into subdirectories specified in podpath (default behaviour). norecurse --norecurse Do not recurse into subdirectories specified in podpath. css --css=URL Specify the URL of cascading style sheet to link from resulting HTML file. Default is none style sheet. title --title=title Specify the title of the resulting HTML file. quiet --quiet Don't display mostly harmless warning messages. noquiet --noquiet Display mostly harmless warning messages (default behaviour). But this is not the same as "verbose" mode. verbose --verbose Display progress messages. noverbose --noverbose Do not display progress messages (default behaviour). AUTHOR Tom Christiansen, <tchrist@perl.com>. BUGS See Pod::Html for a list of known bugs in the translator. SEE ALSO perlpod, Pod::Html COPYRIGHT This program is distributed under the Artistic License. perl v5.34.1 2024-04-13 POD2HTML(1)
|
pod2html - convert .pod files to .html files
|
pod2html --help --htmldir=<name> --htmlroot=<URL> --infile=<name> --outfile=<name> --podpath=<name>:...:<name> --podroot=<name> --cachedir=<name> --flush --recurse --norecurse --quiet --noquiet --verbose --noverbose --index --noindex --backlink --nobacklink --header --noheader --poderrors --nopoderrors --css=<URL> --title=<name>
| null | null |
dig
|
dig is a flexible tool for interrogating DNS name servers. It performs DNS lookups and displays the answers that are returned from the name server(s) that were queried. Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than dig. Although dig is normally used with command-line arguments, it also has a batch mode of operation for reading lookup requests from a file. A brief summary of its command-line arguments and options is printed when the -h option is given. Unlike earlier versions, the BIND 9 implementation of dig allows multiple lookups to be issued from the command line. Unless it is told to query a specific name server, dig will try each of the servers listed in /etc/resolv.conf. If no usable server addresses are found, dig will send the query to the local host. When no command line arguments or options are given, dig will perform an NS query for "." (the root). It is possible to set per-user defaults for dig via ${HOME}/.digrc. This file is read and any options in it are applied before the command line arguments. The IN and CH class names overlap with the IN and CH top level domain names. Either use the -t and -c options to specify the type and class, use the -q the specify the domain name, or use "IN." and "CH." when looking up these top level domains. SIMPLE USAGE A typical invocation of dig looks like: dig @server name type where: server is the name or IP address of the name server to query. This can be an IPv4 address in dotted-decimal notation or an IPv6 address in colon-delimited notation. When the supplied server argument is a hostname, dig resolves that name before querying that name server. If no server argument is provided, dig consults /etc/resolv.conf; if an address is found there, it queries the name server at that address. If either of the -4 or -6 options are in use, then only addresses for the corresponding transport will be tried. If no usable addresses are found, dig will send the query to the local host. The reply from the name server that responds is displayed.
|
dig - DNS lookup utility is the name of the resource record that is to be looked up. type indicates what type of query is required — ANY, A, MX, SIG, etc. type can be any valid query type. If no type argument is supplied, dig will perform a lookup for an A record.
|
dig [@server] [-b address] [-c class] [-f filename] [-k filename] [-m] [-p port#] [-q name] [-t type] [-v] [-x addr] [-y [hmac:]name:key] [-4] [-6] [name] [type] [class] [queryopt...] dig [-h] dig [global-queryopt...] [query...]
|
-4 Use IPv4 only. -6 Use IPv6 only. -b address[#port] Set the source IP address of the query. The address must be a valid address on one of the host's network interfaces, or "0.0.0.0" or "::". An optional port may be specified by appending "#<port>" -c class Set the query class. The default class is IN; other classes are HS for Hesiod records or CH for Chaosnet records. -f file Batch mode: dig reads a list of lookup requests to process from the given file. Each line in the file should be organized in the same way they would be presented as queries to dig using the command-line interface. -i Do reverse IPv6 lookups using the obsolete RFC1886 IP6.INT domain, which is no longer in use. Obsolete bit string label queries (RFC2874) are not attempted. -k keyfile Sign queries using TSIG using a key read from the given file. Key files can be generated using tsig-keygen(8). When using TSIG authentication with dig, the name server that is queried needs to know the key and algorithm that is being used. In BIND, this is done by providing appropriate key and server statements in named.conf. -m Enable memory usage debugging. -p port Send the query to a non-standard port on the server, instead of the defaut port 53. This option would be used to test a name server that has been configured to listen for queries on a non-standard port number. -q name The domain name to query. This is useful to distinguish the name from other arguments. -t type The resource record type to query. It can be any valid query type which is supported in BIND 9. The default query type is "A", unless the -x option is supplied to indicate a reverse lookup. A zone transfer can be requested by specifying a type of AXFR. When an incremental zone transfer (IXFR) is required, set the type to ixfr=N. The incremental zone transfer will contain the changes made to the zone since the serial number in the zone's SOA record was N. -v Print the version number and exit. -x addr Simplified reverse lookups, for mapping addresses to names. The addr is an IPv4 address in dotted-decimal notation, or a colon-delimited IPv6 address. When the -x is used, there is no need to provide the name, class and type arguments. dig automatically performs a lookup for a name like 94.2.0.192.in-addr.arpa and sets the query type and class to PTR and IN respectively. IPv6 addresses are looked up using nibble format under the IP6.ARPA domain (but see also the -i option). -y [hmac:]keyname:secret Sign queries using TSIG with the given authentication key. keyname is the name of the key, and secret is the base64 encoded shared secret. hmac is the name of the key algorithm; valid choices are hmac-md5, hmac-sha1, hmac-sha224, hmac-sha256, hmac-sha384, or hmac-sha512. If hmac is not specified, the default is hmac-md5 or if MD5 was disabled hmac-sha256. NOTE: You should use the -k option and avoid the -y option, because with -y the shared secret is supplied as a command line argument in clear text. This may be visible in the output from ps(1) or in a history file maintained by the user's shell. macOS NOTICE The dig command does not use the host name and address resolution or the DNS query routing mechanisms used by other processes running on macOS. The results of name or address queries printed by dig may differ from those found by other processes that use the macOS native name and address resolution mechanisms. The results of DNS queries may also differ from queries that use the macOS DNS routing library. QUERY OPTIONS dig provides a number of query options which affect the way in which lookups are made and the results displayed. Some of these set or reset flag bits in the query header, some determine which sections of the answer get printed, and others determine the timeout and retry strategies. Each query option is identified by a keyword preceded by a plus sign (+). Some keywords set or reset an option. These may be preceded by the string no to negate the meaning of that keyword. Other keywords assign values to options like the timeout interval. They have the form +keyword=value. Keywords may be abbreviated, provided the abbreviation is unambiguous; for example, +cd is equivalent to +cdflag. The query options are: +[no]aaflag A synonym for +[no]aaonly. +[no]aaonly Sets the "aa" flag in the query. +[no]additional Display [do not display] the additional section of a reply. The default is to display it. +[no]adflag Set [do not set] the AD (authentic data) bit in the query. This requests the server to return whether all of the answer and authority sections have all been validated as secure according to the security policy of the server. AD=1 indicates that all records have been validated as secure and the answer is not from a OPT-OUT range. AD=0 indicate that some part of the answer was insecure or not validated. This bit is set by default. +[no]all Set or clear all display flags. +[no]answer Display [do not display] the answer section of a reply. The default is to display it. +[no]authority Display [do not display] the authority section of a reply. The default is to display it. +[no]besteffort Attempt to display the contents of messages which are malformed. The default is to not display malformed answers. +bufsize=B Set the UDP message buffer size advertised using EDNS0 to B bytes. The maximum and minimum sizes of this buffer are 65535 and 0 respectively. Values outside this range are rounded up or down appropriately. Values other than zero will cause a EDNS query to be sent. +[no]cdflag Set [do not set] the CD (checking disabled) bit in the query. This requests the server to not perform DNSSEC validation of responses. +[no]class Display [do not display] the CLASS when printing the record. +[no]cmd Toggles the printing of the initial comment in the output identifying the version of dig and the query options that have been applied. This comment is printed by default. +[no]comments Toggle the display of comment lines in the output. The default is to print comments. +[no]cookie[=####] Send an COOKIE EDNS option, containing an optional value. Replaying a COOKIE from a previous response will allow the server to identify a previous client. The default is +nocookie. +cookie is automatically set when +trace is in use, to better emulate the default queries from a nameserver. This option was formerly called +[no]sit (Server Identity Token). In BIND 9.10.0 through BIND 9.10.2, it sent the experimental option code 65001. This was changed to option code 10 in BIND 9.10.3 when the DNS COOKIE option was allocated. The +[no]sit is now deprecated, but has been retained as a synonym for +[no]cookie for backward compatibility within the BIND 9.10 branch. +[no]crypto Toggle the display of cryptographic fields in DNSSEC records. The contents of these field are unnecessary to debug most DNSSEC validation failures and removing them makes it easier to see the common failures. The default is to display the fields. When omitted they are replaced by the string "[omitted]" or in the DNSKEY case the key id is displayed as the replacement, e.g. "[ key id = value ]". +[no]defname Deprecated, treated as a synonym for +[no]search +[no]dnssec Requests DNSSEC records be sent by setting the DNSSEC OK bit (DO) in the OPT record in the additional section of the query. +domain=somename Set the search list to contain the single domain somename, as if specified in a domain directive in /etc/resolv.conf, and enable search list processing as if the +search option were given. +[no]edns[=#] Specify the EDNS version to query with. Valid values are 0 to 255. Setting the EDNS version will cause a EDNS query to be sent. +noedns clears the remembered EDNS version. EDNS is set to 0 by default. +[no]ednsflags[=#] Set the must-be-zero EDNS flags bits (Z bits) to the specified value. Decimal, hex and octal encodings are accepted. Setting a named flag (e.g. DO) will silently be ignored. By default, no Z bits are set. +[no]ednsnegotiation Enable / disable EDNS version negotiation. By default EDNS version negotiation is enabled. +[no]ednsopt[=code[:value]] Specify EDNS option with code point code and optionally payload of value as a hexadecimal string. code can be either an EDNS option name (for example, NSID or ECS), or an arbitrary numeric value. +noednsopt clears the EDNS options to be sent. +[no]expire Send an EDNS Expire option. +[no]fail Do not try the next server if you receive a SERVFAIL. The default is to not try the next server which is the reverse of normal stub resolver behavior. +[no]identify Show [or do not show] the IP address and port number that supplied the answer when the +short option is enabled. If short form answers are requested, the default is not to show the source address and port number of the server that provided the answer. +[no]idnout Convert [do not convert] puny code on output. This requires IDN SUPPORT to have been enabled at compile time. The default is to convert output. +[no]ignore Ignore truncation in UDP responses instead of retrying with TCP. By default, TCP retries are performed. +[no]keepopen Keep the TCP socket open between queries and reuse it rather than creating a new TCP socket for each lookup. The default is +nokeepopen. +[no]multiline Print records like the SOA records in a verbose multi-line format with human-readable comments. The default is to print each record on a single line, to facilitate machine parsing of the dig output. +ndots=D Set the number of dots that have to appear in name to D for it to be considered absolute. The default value is that defined using the ndots statement in /etc/resolv.conf, or 1 if no ndots statement is present. Names with fewer dots are interpreted as relative names and will be searched for in the domains listed in the search or domain directive in /etc/resolv.conf if +search is set. +[no]nsid Include an EDNS name server ID request when sending a query. +[no]nssearch When this option is set, dig attempts to find the authoritative name servers for the zone containing the name being looked up and display the SOA record that each name server has for the zone. +[no]onesoa Print only one (starting) SOA record when performing an AXFR. The default is to print both the starting and ending SOA records. +[no]opcode=value Set [restore] the DNS message opcode to the specified value. The default value is QUERY (0). +[no]qr Print [do not print] the query as it is sent. By default, the query is not printed. +[no]question Print [do not print] the question section of a query when an answer is returned. The default is to print the question section as a comment. +[no]rdflag A synonym for +[no]recurse. +[no]recurse Toggle the setting of the RD (recursion desired) bit in the query. This bit is set by default, which means dig normally sends recursive queries. Recursion is automatically disabled when the +nssearch or +trace query options are used. +retry=T Sets the number of times to retry UDP queries to server to T instead of the default, 2. Unlike +tries, this does not include the initial query. +[no]rrcomments Toggle the display of per-record comments in the output (for example, human-readable key information about DNSKEY records). The default is not to print record comments unless multiline mode is active. +[no]search Use [do not use] the search list defined by the searchlist or domain directive in resolv.conf (if any). The search list is not used by default. 'ndots' from resolv.conf (default 1) which may be overridden by +ndots determines if the name will be treated as relative or not and hence whether a search is eventually performed or not. +[no]short Provide a terse answer. The default is to print the answer in a verbose form. +[no]showsearch Perform [do not perform] a search showing intermediate results. +[no]sigchase Chase DNSSEC signature chains. Requires dig be compiled with -DDIG_SIGCHASE. This feature is deprecated. Use delv instead. +[no]sit[=####] This option is a synonym for +[no]cookie. The +[no]sit is deprecated. +split=W Split long hex- or base64-formatted fields in resource records into chunks of W characters (where W is rounded up to the nearest multiple of 4). +nosplit or +split=0 causes fields not to be split at all. The default is 56 characters, or 44 characters when multiline mode is active. +[no]stats This query option toggles the printing of statistics: when the query was made, the size of the reply and so on. The default behavior is to print the query statistics. +[no]subnet=addr[/prefix-length] Send (don't send) an EDNS Client Subnet option with the specified IP address or network prefix. dig +subnet=0.0.0.0/0, or simply dig +subnet=0 for short, sends an EDNS CLIENT-SUBNET option with an empty address and a source prefix-length of zero, which signals a resolver that the client's address information must not be used when resolving this query. +[no]tcp Use [do not use] TCP when querying name servers. The default behavior is to use UDP unless an ixfr=N query is requested, in which case the default is TCP. AXFR queries always use TCP. +time=T Sets the timeout for a query to T seconds. The default timeout is 5 seconds. An attempt to set T to less than 1 will result in a query timeout of 1 second being applied. +[no]topdown When chasing DNSSEC signature chains perform a top-down validation. Requires dig be compiled with -DDIG_SIGCHASE. This feature is deprecated. Use delv instead. +[no]trace Toggle tracing of the delegation path from the root name servers for the name being looked up. Tracing is disabled by default. When tracing is enabled, dig makes iterative queries to resolve the name being looked up. It will follow referrals from the root servers, showing the answer from each server that was used to resolve the lookup. If @server is also specified, it affects only the initial query for the root zone name servers. +dnssec is also set when +trace is set to better emulate the default queries from a nameserver. +tries=T Sets the number of times to try UDP queries to server to T instead of the default, 3. If T is less than or equal to zero, the number of tries is silently rounded up to 1. +trusted-key=#### Specifies a file containing trusted keys to be used with +sigchase. Each DNSKEY record must be on its own line. If not specified, dig will look for /etc/trusted-key.key then trusted-key.key in the current directory. Requires dig be compiled with -DDIG_SIGCHASE. This feature is deprecated. Use delv instead. +[no]ttlid Display [do not display] the TTL when printing the record. +[no]vc Use [do not use] TCP when querying name servers. This alternate syntax to +[no]tcp is provided for backwards compatibility. The "vc" stands for "virtual circuit". MULTIPLE QUERIES The BIND 9 implementation of dig supports specifying multiple queries on the command line (in addition to supporting the -f batch file option). Each of those queries can be supplied with its own set of flags, options and query options. In this case, each query argument represent an individual query in the command-line syntax described above. Each consists of any of the standard options and flags, the name to be looked up, an optional query type and class and any query options that should be applied to that query. A global set of query options, which should be applied to all queries, can also be supplied. These global query options must precede the first tuple of name, class, type, options, flags, and query options supplied on the command line. Any global query options (except the +[no]cmd option) can be overridden by a query-specific set of query options. For example: dig +qr www.isc.org any -x 127.0.0.1 isc.org ns +noqr shows how dig could be used from the command line to make three lookups: an ANY query for www.isc.org, a reverse lookup of 127.0.0.1 and a query for the NS records of isc.org. A global query option of +qr is applied, so that dig shows the initial query it made for each lookup. The final query has a local query option of +noqr which means that dig will not print the initial query when it looks up the NS records for isc.org. IDN SUPPORT If dig has been built with IDN (internationalized domain name) support, it can accept and display non-ASCII domain names. dig appropriately converts character encoding of domain name before sending a request to DNS server or displaying a reply from the server. If you'd like to turn off the IDN support for some reason, defines the IDN_DISABLE environment variable. The IDN support is disabled if the variable is set when dig runs. FILES /etc/resolv.conf ${HOME}/.digrc SEE ALSO delv(1), host(1), named(8), dnssec-keygen(8), RFC1035. BUGS There are probably too many query options. AUTHOR Internet Systems Consortium, Inc. COPYRIGHT Copyright © 2004-2011, 2013-2017 Internet Systems Consortium, Inc. ("ISC") Copyright © 2000-2003 Internet Software Consortium. ISC 2018-05-25 DIG(1)
| null |
zipdetails5.30
|
Zipdetails displays information about the internal record structure of the zip file. It is not concerned with displaying any details of the compressed data stored in the zip file. The program assumes prior understanding of the internal structure of a Zip file. You should have a copy of the Zip APPNOTE file at hand to help understand the output from this program ("SEE ALSO" for details).
|
zipdetails - display the internal structure of zip files
|
zipdetails [-v] zipfile.zip zipdetails -h
|
-v Enable Verbose mode -h Display help By default zipdetails will output the details of the zip file in three columns. Column 1 This contains the offset from the start of the file in hex. Column 2 This contains a textual description of the field. Column 3 If the field contains a numeric value it will be displayed in hex. Zip stored most numbers in little-endian format - the value displayed will have the little-endian encoding removed. Next, is an optional description of what the value means. If the "-v" option is present, column 1 is expanded to include • The offset from the start of the file in hex. • The length of the filed in hex. • A hex dump of the bytes in field in the order they are stored in the zip file. TODO Error handling is still a work in progress. If the program encounters a problem reading a zip file it is likely to terminate with an unhelpful error message. SEE ALSO The primary reference for Zip files is the "appnote" document available at <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>. An alternative reference is the Info-Zip appnote. This is available from <ftp://ftp.info-zip.org/pub/infozip/doc/> The "zipinfo" program that comes with the info-zip distribution (<http://www.info-zip.org/>) can also display details of the structure of a zip file. See also Archive::Zip::SimpleZip, IO::Compress::Zip, IO::Uncompress::Unzip. AUTHOR Paul Marquess pmqs@cpan.org. COPYRIGHT Copyright (c) 2011-2018 Paul Marquess. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. perl v5.30.3 2024-04-13 ZIPDETAILS(1)
| null |
macerror
|
The macerror script translates Mac error numbers into their symbolic name and description. SEE ALSO Mac::Errors AUTHOR Chris Nandor, pudge@pobox.com COPYRIGHT Copryright 2002, Chris Nandor, All rights reserved You may use this under the same terms as Perl itself. perl v5.34.0 2018-06-20 MACERROR(1)
|
macerror
|
% macerror -23
| null | null |
infocmp
|
infocmp can be used to compare a binary terminfo entry with other terminfo entries, rewrite a terminfo description to take advantage of the use= terminfo field, or print out a terminfo description from the binary file (term) in a variety of formats. In all cases, the boolean fields will be printed first, followed by the numeric fields, followed by the string fields. Default Options If no options are specified and zero or one termnames are specified, the -I option will be assumed. If more than one termname is specified, the -d option will be assumed. Comparison Options [-d] [-c] [-n] infocmp compares the terminfo description of the first terminal termname with each of the descriptions given by the entries for the other terminal's termnames. If a capability is defined for only one of the terminals, the value returned will depend on the type of the capability: F for boolean variables, -1 for integer variables, and NULL for string variables. The -d option produces a list of each capability that is different between two entries. This option is useful to show the difference between two entries, created by different people, for the same or similar terminals. The -c option produces a list of each capability that is common between two or more entries. Capabilities that are not set are ignored. This option can be used as a quick check to see if the -u option is worth using. The -n option produces a list of each capability that is in none of the given entries. If no termnames are given, the environment variable TERM will be used for both of the termnames. This can be used as a quick check to see if anything was left out of a description. Source Listing Options [-I] [-L] [-C] [-r] The -I, -L, and -C options will produce a source listing for each terminal named. -I use the terminfo names -L use the long C variable name listed in <term.h> -C use the termcap names -r when using -C, put out all capabilities in termcap form -K modifies the -C option, improving BSD-compatibility. If no termnames are given, the environment variable TERM will be used for the terminal name. The source produced by the -C option may be used directly as a termcap entry, but not all parameterized strings can be changed to the termcap format. infocmp will attempt to convert most of the parameterized information, and anything not converted will be plainly marked in the output and commented out. These should be edited by hand. For best results when converting to termcap format, you should use both -C and -r. Normally a termcap description is limited to 1023 bytes. infocmp trims away less essential parts to make it fit. If you are converting to one of the (rare) termcap implementations which accept an unlimited size of termcap, you may want to add the -T option. More often however, you must help the termcap implementation, and trim excess whitespace (use the -0 option for that). All padding information for strings will be collected together and placed at the beginning of the string where termcap expects it. Mandatory padding (padding information with a trailing '/') will become optional. All termcap variables no longer supported by terminfo, but which are derivable from other terminfo variables, will be output. Not all terminfo capabilities will be translated; only those variables which were part of termcap will normally be output. Specifying the -r option will take off this restriction, allowing all capabilities to be output in termcap form. Normally you would use both the -C and -r options. The actual format used incorporates some improvements for escaped characters from terminfo format. For a stricter BSD-compatible translation, use the -K option rather than -C. Note that because padding is collected to the beginning of the capability, not all capabilities are output. Mandatory padding is not supported. Because termcap strings are not as flexible, it is not always possible to convert a terminfo string capability into an equivalent termcap format. A subsequent conversion of the termcap file back into terminfo format will not necessarily reproduce the original terminfo source. Some common terminfo parameter sequences, their termcap equivalents, and some terminal types which commonly have such sequences, are: terminfo termcap Representative Terminals ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ %p1%c %. adm %p1%d %d hp, ANSI standard, vt100 %p1%'x'%+%c %+x concept %i %iq ANSI standard, vt100 %p1%?%'x'%>%t%p1%'y'%+%; %>xy concept %p2 is printed before %p1 %r hp Use= Option [-u] The -u option produces a terminfo source description of the first terminal termname which is relative to the sum of the descriptions given by the entries for the other terminals termnames. It does this by analyzing the differences between the first termname and the other termnames and producing a description with use= fields for the other terminals. In this manner, it is possible to retrofit generic terminfo entries into a terminal's description. Or, if two similar terminals exist, but were coded at different times or by different people so that each description is a full description, using infocmp will show what can be done to change one description to be relative to the other. A capability will get printed with an at-sign (@) if it no longer exists in the first termname, but one of the other termname entries contains a value for it. A capability's value gets printed if the value in the first termname is not found in any of the other termname entries, or if the first of the other termname entries that has this capability gives a different value for the capability than that in the first termname. The order of the other termname entries is significant. Since the terminfo compiler tic does a left-to-right scan of the capabilities, specifying two use= entries that contain differing entries for the same capabilities will produce different results depending on the order that the entries are given in. infocmp will flag any such inconsistencies between the other termname entries as they are found. Alternatively, specifying a capability after a use= entry that contains that capability will cause the second specification to be ignored. Using infocmp to recreate a description can be a useful check to make sure that everything was specified correctly in the original source description. Another error that does not cause incorrect compiled files, but will slow down the compilation time, is specifying extra use= fields that are superfluous. infocmp will flag any other termname use= fields that were not needed. Changing Databases [-A directory] [-B directory] Like other ncurses utilities, infocmp looks for the terminal descriptions in several places. You can use the TERMINFO and TERMINFO_DIRS environment variables to override the compiled-in default list of places to search (see curses(3X) for details). You can also use the options -A and -B to override the list of places to search when comparing terminal descriptions: • The -A option sets the location for the first termname • The -B option sets the location for the other termnames. Using these options, it is possible to compare descriptions for a terminal with the same name located in two different databases. For instance, you can use this feature for comparing descriptions for the same terminal created by different people. Other Options -0 causes the fields to be printed on one line, without wrapping. -1 causes the fields to be printed out one to a line. Otherwise, the fields will be printed several to a line to a maximum width of 60 characters. -a tells infocmp to retain commented-out capabilities rather than discarding them. Capabilities are commented by prefixing them with a period. -D tells infocmp to print the database locations that it knows about, and exit. -E Dump the capabilities of the given terminal as tables, needed in the C initializer for a TERMTYPE structure (the terminal capability structure in the <term.h>). This option is useful for preparing versions of the curses library hardwired for a given terminal type. The tables are all declared static, and are named according to the type and the name of the corresponding terminal entry. Before ncurses 5.0, the split between the -e and -E options was not needed; but support for extended names required making the arrays of terminal capabilities separate from the TERMTYPE structure. -e Dump the capabilities of the given terminal as a C initializer for a TERMTYPE structure (the terminal capability structure in the <term.h>). This option is useful for preparing versions of the curses library hardwired for a given terminal type. -F compare terminfo files. This assumes that two following arguments are filenames. The files are searched for pairwise matches between entries, with two entries considered to match if any of their names do. The report printed to standard output lists entries with no matches in the other file, and entries with more than one match. For entries with exactly one match it includes a difference report. Normally, to reduce the volume of the report, use references are not resolved before looking for differences, but resolution can be forced by also specifying -r. -f Display complex terminfo strings which contain if/then/else/endif expressions indented for readability. -G Display constant literals in decimal form rather than their character equivalents. -g Display constant character literals in quoted form rather than their decimal equivalents. -i Analyze the initialization (is1, is2, is3), and reset (rs1, rs2, rs3), strings in the entry, as well as those used for starting/stopping cursor-positioning mode (smcup, rmcup) as well as starting/stopping keymap mode (smkx, rmkx). For each string, the code tries to analyze it into actions in terms of the other capabilities in the entry, certain X3.64/ISO 6429/ECMA-48 capabilities, and certain DEC VT-series private modes (the set of recognized special sequences has been selected for completeness over the existing terminfo database). Each report line consists of the capability name, followed by a colon and space, followed by a printable expansion of the capability string with sections matching recognized actions translated into {}-bracketed descriptions. Here is a list of the DEC/ANSI special sequences recognized: Action Meaning ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ RIS full reset SC save cursor RC restore cursor LL home-down RSR reset scroll region ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DECSTR soft reset (VT320) S7C1T 7-bit controls (VT220) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ISO DEC G0 enable DEC graphics for G0 ISO UK G0 enable UK chars for G0 ISO US G0 enable US chars for G0 ISO DEC G1 enable DEC graphics for G1 ISO UK G1 enable UK chars for G1 ISO US G1 enable US chars for G1 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DECPAM application keypad mode DECPNM normal keypad mode DECANSI enter ANSI mode ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ ECMA[+-]AM keyboard action mode ECMA[+-]IRM insert replace mode ECMA[+-]SRM send receive mode ECMA[+-]LNM linefeed mode ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ DEC[+-]CKM application cursor keys DEC[+-]ANM set VT52 mode DEC[+-]COLM 132-column mode DEC[+-]SCLM smooth scroll DEC[+-]SCNM reverse video mode DEC[+-]OM origin mode DEC[+-]AWM wraparound mode DEC[+-]ARM auto-repeat mode It also recognizes a SGR action corresponding to ANSI/ISO 6429/ECMA Set Graphics Rendition, with the values NORMAL, BOLD, UNDERLINE, BLINK, and REVERSE. All but NORMAL may be prefixed with `+' (turn on) or `-' (turn off). An SGR0 designates an empty highlight sequence (equivalent to {SGR:NORMAL}). -l Set output format to terminfo. -p Ignore padding specifications when comparing strings. -q Make the comparison listing shorter by omitting subheadings, and using "-" for absent capabilities, "@" for canceled rather than "NULL". -Rsubset Restrict output to a given subset. This option is for use with archaic versions of terminfo like those on SVr1, Ultrix, or HP/UX that do not support the full set of SVR4/XSI Curses terminfo; and variants such as AIX that have their own extensions incompatible with SVr4/XSI. Available terminfo subsets are "SVr1", "Ultrix", "HP", and "AIX"; see terminfo(5) for details. You can also choose the subset "BSD" which selects only capabilities with termcap equivalents recognized by 4.4BSD. -s [d|i|l|c] The -s option sorts the fields within each type according to the argument below: d leave fields in the order that they are stored in the terminfo database. i sort by terminfo name. l sort by the long C variable name. c sort by the termcap name. If the -s option is not given, the fields printed out will be sorted alphabetically by the terminfo name within each type, except in the case of the -C or the -L options, which cause the sorting to be done by the termcap name or the long C variable name, respectively. -T eliminates size-restrictions on the generated text. This is mainly useful for testing and analysis, since the compiled descriptions are limited (e.g., 1023 for termcap, 4096 for terminfo). -t tells tic to discard commented-out capabilities. Normally when translating from terminfo to termcap, untranslatable capabilities are commented-out. -U tells infocmp to not post-process the data after parsing the source file. This feature helps when comparing the actual contents of two source files, since it excludes the inferences that infocmp makes to fill in missing data. -V reports the version of ncurses which was used in this program, and exits. -v n prints out tracing information on standard error as the program runs. Higher values of n induce greater verbosity. -w width changes the output to width characters. -x print information for user-defined capabilities. These are extensions to the terminfo repertoire which can be loaded using the -x option of tic. FILES /usr/share/terminfo Compiled terminal description database. EXTENSIONS The -0, -1, -E, -F, -G, -R, -T, -V, -a, -e, -f, -g, -i, -l, -p, -q and -t options are not supported in SVr4 curses. The -r option's notion of `termcap' capabilities is System V Release 4's. Actual BSD curses versions will have a more restricted set. To see only the 4.4BSD set, use -r -RBSD. BUGS The -F option of infocmp(1M) should be a toe(1M) mode. SEE ALSO captoinfo(1M), infotocap(1M), tic(1M), toe(1M), curses(3X), terminfo(5). http://invisible-island.net/ncurses/tctest.html This describes ncurses version 5.7 (patch 20081102). AUTHOR Eric S. Raymond <esr@snark.thyrsus.com> and Thomas E. Dickey <dickey@invisible-island.net> infocmp(1M)
|
infocmp - compare or print out terminfo descriptions
|
infocmp [-1CDEFGIKLTUVcdegilnpqrtux] [-v n] [-s d| i| l| c] [-R subset] [-w width] [-A directory] [-B directory] [termname...]
| null | null |
eslogger
|
eslogger interfaces with Endpoint Security to log events to standard output or to the unified logging system. Like all Endpoint Security clients, eslogger must be run as super-user and requires the responsible process to have TCC Full Disk Access authorization. See TCC AUTHORIZATION below. To avoid feedback loops when filtering output using shell pipelines, eslogger automatically suppresses events for all processes that are part of its process group. eslogger is not intended to be used by applications. It is not meant provide the same functionality, performance and schema stability as natively interfacing with the Endpoint Security API does. It cannot provide the integrity protection granted to System Extensions. Applications should continue to interface with EndpointSecurity(7) natively. IMPORTANT: eslogger is NOT API in any sense. Do NOT rely on the structure or information emitted for ANY reason. It may change from release to release without warning.
|
eslogger – log Endpoint Security events
|
eslogger [--oslog] [--format format] [--oslog-subsystem subsystem] [--oslog-category category] event [...] eslogger --list-events
|
--format format Log format to use. Default, and the only format currently supported, is json. See FORMATS below. --list-events List supported events on standard output and exit. --oslog Emit event data to the unified logging system instead of to standard output. See log(1) on configuring and using the unified logging system. The default subsystem and category are configured for oversize messages, resulting in a message size limit of 32k. Larger messages will be truncated. --oslog-subsystem subsystem Log subsystem to use with --oslog. Default is com.apple.eslogger. Changing the subsystem will make the default log profile ineffective, resulting in a message size limit of 1k. Configuring subsystem for oversize messages is recommended when using --oslog-subsystem. --oslog-category category Log category to use with --oslog. Default is events. Changing the subsystem will make the default log profile ineffective, resulting in a message size limit of 1k. Configuring category for oversize messages is recommended when using --oslog-category. eslogger uses the main category for operational logging, such as fatal errors. EVENTS Events are specified by their short name, such as exec or exit. Use --list-events to list the currently supported events by their short name. eslogger supports all notify events that EndpointSecurity supports. By design, eslogger does not support any auth events. Some fields available in native Endpoint Security API clients are not available in eslogger. Currently, the only such field is es_token_t state part of es_thread_state_t, which is used only in remote_thread_create events. FORMATS The only supported format for event data is json, which is either JSON Lines, when writing to standard output, or JSON, when writing to the unified logging system. While no formal schema is provided, the data is modelled after es_message_t as provided by EndpointSecurity(7). Semantics, field names and optionality corresponds to the C counterparts as documented in the libEndpointSecurity(3) header documentation in the SDK. A schema_version is provided with every event. No schema stability guarantees are being made across schema_version changes. New events may be added without bumping schema_version. schema_version is specific to the JSON representation of events. schema_version is distinct from the version field, which denotes the message version as emitted by EndpointSecurity(7).
|
Subscribe to process lifecycle events and append event data to a file: % sudo eslogger exec fork exit >>/tmp/proc.log Subscribe to screensharing events and write event data to the unified logging system with the default subsystem and category: % sudo eslogger --oslog screensharing_attach screensharing_detach List available events: % eslogger --list-events Postprocess the output in a shell pipeline with jq: % sudo eslogger exec | jq -r 'select(.process.executable.path == "/bin/zsh")|"\(.process.audit_token.pid): \(.process.executable.path) -> \(.event.exec.target.executable.path)"' TCC AUTHORIZATION eslogger requires the responsible process to have been authorized for Full Disk Access. For running eslogger in an SSH session, enable "Allow full disk access for remote users" in System Preferences > Sharing > Remote Login. Running eslogger from an app, including Terminal.app or a third-party terminal emulator, requires the respective app to be authorized for Full Disk Access in System Preferences > Security & Privacy > Privacy > Full Disk Access. Running eslogger as a launch daemon requires eslogger itself to be authorized for Full Disk Access in System Preferences > Security & Privacy > Privacy > Full Disk Access. MDM servers can grant Full Disk Access authorization using the Privacy Preferences Policy Control payload, identified by payload type com.apple.TCC.configuration-profile-policy, and its service dictionary key SystemPolicyAllFiles. SEE ALSO log(1), mdmclient(1), libEndpointSecurity(3), EndpointSecurity(7). Darwin 22 February, 2022 Darwin
|
apt
| null | null | null | null | null |
trimforce
|
trimforce enables sending TRIM commands to third-party drives attached to an AHCI controller. By default, TRIM commands are not sent to third- party drives. Use extreme caution when enabling TRIM, as some drives may not correctly handle the commands. trimforce must be run by the system administrator. VERBS enable Start sending TRIM commands to AHCI-attached third-party drives. Requires a reboot to take effect. disable Stop sending TRIM commands to AHCI-attached third-party drives. Requires a reboot to take effect. help Display brief usage syntax. ERRORS trimforce will exit with status 0 if successful, or with an appropriate error if it cannot parse input, allocate memory, or is unauthorized to perform its work. HISTORY The trimforce utility first appeared in OS X 10.10.4. OS X 27 April 2015 OS X
|
trimforce – enable TRIM commands on third-party drives
|
trimforce verb
| null | null |
nm
|
As of Xcode 8.0 the default nm(1) tool is llvm-nm(1). For the most part nm(1) and llvm-nm(1) have the same options; notable exceptions include -f, -s, and -L as described below. This document explains options common between the two commands as well as some historically relevant options supported by nm-classic(1). More help on options for llvm-nm(1) is provided when running it with the --help option. nm displays the name list (symbol table of nlist structures) of each object file in the argument list. In some cases, as with an object that has had strip(1) with its -T option used on the object, that can be different than the dyld information. For that information use dyldinfo(1). If an argument is an archive, a listing for each object file in the archive will be produced. File can be of the form libx.a(x.o), in which case only symbols from that member of the object file are listed. (The parentheses have to be quoted to get by the shell.) If no file is given, the symbols in a.out are listed. Each symbol name is preceded by its value (blanks if undefined). Unless the -m option is specified, this value is followed by one of the following characters, representing the symbol type: U (undefined), A (absolute), T (text section symbol), D (data section symbol), B (bss section symbol), C (common symbol), - (for debugger symbol table entries; see -a below), S (symbol in a section other than those above), or I (indirect symbol). If the symbol is local (non-external), the symbol's type is instead represented by the corresponding lowercase letter. A lower case u in a dynamic shared library indicates a undefined reference to a private external in another module in the same library. If the symbol is a Objective-C method, the symbol name is ±[Class_name(category_name) method:name:], where `+' is for class methods, `-' is for instance methods, and (category_name) is present only when the method is in a category. The output is sorted alphabetically by default. Options are: -a Display all symbol table entries, including those inserted for use by debuggers. -g Display only global (external) symbols. -n Sort numerically rather than alphabetically. -o Prepend file or archive element name to each output line, rather than only once. -p Don't sort; display in symbol-table order. -r Sort in reverse order. -u Display only undefined symbols. -U Don't display undefined symbols. -m Display the N_SECT type symbols (Mach-O symbols) as (segment_name, section_name) followed by either external or non-external and then the symbol name. Undefined, common, absolute and indirect symbols get displayed as (undefined), (common), (absolute), and (indirect), respectively. Other symbol details are displayed in a human-friendly manner, such as "[no dead strip]". nm will display the referenced symbol for indirect symbols and will display the name of the library expected to provide an undefined symbol. See nlist(3) and <mach- o/nlist.h> for more information on the nlist structure. -x Display the symbol table entry's fields in hexadecimal, along with the name as a string. -j Just display the symbol names (no value or type). -s segname sectname List only those symbols in the section (segname,sectname). For llvm-nm(1) this option must be last on the command line, and after the files. -l List a pseudo symbol .section_start if no symbol has as its value the starting address of the section. (This is used with the -s option above.) -arch arch_type Specifies the architecture, arch_type, of the file for nm(1) to operate on when the file is a universal file (see arch(3) for the currently known arch_types). The arch_type can be "all" to operate on all architectures in the file. The default is to display the symbols from only the host architecture, if the file contains it; otherwise, symbols for all architectures in the file are displayed. -f format For llvm-nm(1) this specifies the output format. Where format can be bsd, sysv, posix or darwin. -f For nm-classic(1) this displays the symbol table of a dynamic library flat (as one file not separate modules). This is obsolete and not supported with llvm-nm(1). -A Write the pathname or library name of an object on each line. -P Write information in a portable output format. -t format For the -P output, write the numeric value in the specified format. The format shall be dependent on the single character used as the format option-argument: d The value shall be written in decimal (default). o The value shall be written in octal. x The value shall be written in hexadecimal. -L Display the symbols in the bitcode files in the (__LLVM,__bundle) section if present instead of the object's symbol table. For nm-classic(1) this is the default if the object has no symbol table and an (__LLVM,__bundle) section exists. This option is not supported by llvm-nm(1) where displaying llvm bitcode symbols is the default behavior. SEE ALSO ar(1), ar(5), Mach-O(5), stab(5), nlist(3), dyldinfo(1) BUGS Displaying Mach-O symbols with -m is too verbose. Without the -m, symbols in the Objective-C sections get displayed as an `s'. Apple, Inc. December 13, 2018 NM(1)
|
nm - display name list (symbol table)
|
llvm-nm [ -agnoprumxjlPA ] [ - ] [ -t format ] [[ -arch arch_flag ]...] [ file ... ] [ -s segname sectname ] nm-classic [ -agnoprumxjlfPA [ s segname sectname ]] [ - ] [ -t format ] [[ -arch arch_flag ]...] [ file ... ]
| null | null |
flex++
|
Generates programs that perform pattern-matching on text. Table Compression: -Ca, --align trade off larger tables for better memory alignment -Ce, --ecs construct equivalence classes -Cf do not compress tables; use -f representation -CF do not compress tables; use -F representation -Cm, --meta-ecs construct meta-equivalence classes -Cr, --read use read() instead of stdio for scanner input -f, --full generate fast, large scanner. Same as -Cfr -F, --fast use alternate table representation. Same as -CFr -Cem default compression (same as --ecs --meta-ecs) Debugging: -d, --debug enable debug mode in scanner -b, --backup write backing-up information to lex.backup -p, --perf-report write performance report to stderr -s, --nodefault suppress default rule to ECHO unmatched text -T, --trace flex should run in trace mode -w, --nowarn do not generate warnings -v, --verbose write summary of scanner statistics to stdout --hex use hexadecimal numbers instead of octal in debug outputs FILES -o, --outfile=FILE specify output filename -S, --skel=FILE specify skeleton file -t, --stdout write scanner on stdout instead of lex.yy.c --yyclass=NAME name of C++ class --header-file=FILE create a C header file in addition to the scanner --tables-file[=FILE] write tables to FILE Scanner behavior: -7, --7bit generate 7-bit scanner -8, --8bit generate 8-bit scanner -B, --batch generate batch scanner (opposite of -I) -i, --case-insensitive ignore case in patterns -l, --lex-compat maximal compatibility with original lex -X, --posix-compat maximal compatibility with POSIX lex -I, --interactive generate interactive scanner (opposite of -B) --yylineno track line count in yylineno Generated code: -+, --c++ generate C++ scanner class -Dmacro[=defn] #define macro defn (default defn is '1') -L, --noline suppress #line directives in scanner -P, --prefix=STRING use STRING as prefix instead of "yy" -R, --reentrant generate a reentrant C scanner --bison-bridge scanner for bison pure parser. --bison-locations include yylloc support. --stdinit initialize yyin/yyout to stdin/stdout --nounistd do not include <unistd.h> --noFUNCTION do not generate a particular FUNCTION Miscellaneous: -c do-nothing POSIX option -n do-nothing POSIX option -? -h, --help produce this help message -V, --version report flex version SEE ALSO The full documentation for flex is maintained as a Texinfo manual. If the info and flex programs are properly installed at your site, the command info flex should give you access to the complete manual. The Flex Project May 2017 FLEX(1)
|
flex - the fast lexical analyser generator
|
flex [OPTIONS] [FILE]...
| null | null |
osadecompile
|
osadecompile writes the source text of the specified compiled script file to standard output. There are no options; the correct language component is determined from the contents of the script file itself. SEE ALSO osacompile(1), osascript(1), osalang(1) Mac OS X August 15, 2006 Mac OS X
|
osadecompile – display compiled AppleScripts or other OSA language scripts
|
osadecompile file
| null | null |
IOAccelMemory
| null | null | null | null | null |
config_data5.30
|
The "config_data" tool provides a command-line interface to the configuration of Perl modules. By "configuration", we mean something akin to "user preferences" or "local settings". This is a formalization and abstraction of the systems that people like Andreas Koenig ("CPAN::Config"), Jon Swartz ("HTML::Mason::Config"), Andy Wardley ("Template::Config"), and Larry Wall (perl's own Config.pm) have developed independently. The configuration system employed here was developed in the context of "Module::Build". Under this system, configuration information for a module "Foo", for example, is stored in a module called "Foo::ConfigData") (I would have called it "Foo::Config", but that was taken by all those other systems mentioned in the previous paragraph...). These "...::ConfigData" modules contain the configuration data, as well as publicly accessible methods for querying and setting (yes, actually re-writing) the configuration data. The "config_data" script (whose docs you are currently reading) is merely a front-end for those methods. If you wish, you may create alternate front-ends. The two types of data that may be stored are called "config" values and "feature" values. A "config" value may be any perl scalar, including references to complex data structures. It must, however, be serializable using "Data::Dumper". A "feature" is a boolean (1 or 0) value. USAGE This script functions as a basic getter/setter wrapper around the configuration of a single module. On the command line, specify which module's configuration you're interested in, and pass options to get or set "config" or "feature" values. The following options are supported: module Specifies the name of the module to configure (required). feature When passed the name of a "feature", shows its value. The value will be 1 if the feature is enabled, 0 if the feature is not enabled, or empty if the feature is unknown. When no feature name is supplied, the names and values of all known features will be shown. config When passed the name of a "config" entry, shows its value. The value will be displayed using "Data::Dumper" (or similar) as perl code. When no config name is supplied, the names and values of all known config entries will be shown. set_feature Sets the given "feature" to the given boolean value. Specify the value as either 1 or 0. set_config Sets the given "config" entry to the given value. eval If the "--eval" option is used, the values in "set_config" will be evaluated as perl code before being stored. This allows moderately complicated data structures to be stored. For really complicated structures, you probably shouldn't use this command-line interface, just use the Perl API instead. help Prints a help message, including a few examples, and exits. AUTHOR Ken Williams, kwilliams@cpan.org COPYRIGHT Copyright (c) 1999, Ken Williams. All rights reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO Module::Build(3), perl(1). perl v5.30.3 2024-04-13 CONFIG_DATA(1)
|
config_data - Query or change configuration of Perl modules
|
# Get config/feature values config_data --module Foo::Bar --feature bazzable config_data --module Foo::Bar --config magic_number # Set config/feature values config_data --module Foo::Bar --set_feature bazzable=1 config_data --module Foo::Bar --set_config magic_number=42 # Print a usage message config_data --help
| null | null |
automationmodetool
|
automationmodetool can be used to configure a device such that Automation Mode for UI testing can be enabled without user authentication. This is useful for configuring machines in continuous integration (CI) environments as well as those in labs where the active users do not have administrator privileges. Running the tool for this purpose requires an administrator to authenticate in the shell. If no argument is passed, the tool prints the current status of Automation Mode (enabled or disabled), the authentication configuration (required or not), and then exits. Darwin 18 March, 2021 Darwin
|
automationmodetool – Manage UI automation security preferences.
|
automationmodetool enable-automationmode-without-authentication automationmodetool disable-automationmode-without-authentication
| null | null |
ssh-add
|
ssh-add adds private key identities to the authentication agent, ssh-agent(1). When run without arguments, it adds the files ~/.ssh/id_rsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk, and ~/.ssh/id_dsa. After loading a private key, ssh-add will try to load corresponding certificate information from the filename obtained by appending -cert.pub to the name of the private key file. Alternative file names can be given on the command line. If any file requires a passphrase, ssh-add asks for the passphrase from the user. The passphrase is read from the user's tty. ssh-add retries the last passphrase if multiple identity files are given. The authentication agent must be running and the SSH_AUTH_SOCK environment variable must contain the name of its socket for ssh-add to work. The options are as follows: -c Indicates that added identities should be subject to confirmation before being used for authentication. Confirmation is performed by ssh-askpass(1). Successful confirmation is signaled by a zero exit status from ssh-askpass(1), rather than text entered into the requester. -C When loading keys into or deleting keys from the agent, process certificates only and skip plain keys. -D Deletes all identities from the agent. -d Instead of adding identities, removes identities from the agent. If ssh-add has been run without arguments, the keys for the default identities and their corresponding certificates will be removed. Otherwise, the argument list will be interpreted as a list of paths to public key files to specify keys and certificates to be removed from the agent. If no public key is found at a given path, ssh-add will append .pub and retry. If the argument list consists of “-” then ssh-add will read public keys to be removed from standard input. -E fingerprint_hash Specifies the hash algorithm used when displaying key fingerprints. Valid options are: “md5” and “sha256”. The default is “sha256”. -e pkcs11 Remove keys provided by the PKCS#11 shared library pkcs11. -H hostkey_file Specifies a known hosts file to look up hostkeys when using destination-constrained keys via the -h flag. This option may be specified multiple times to allow multiple files to be searched. If no files are specified, ssh-add will use the default ssh_config(5) known hosts files: ~/.ssh/known_hosts, ~/.ssh/known_hosts2, /etc/ssh/ssh_known_hosts, and /etc/ssh/ssh_known_hosts2. -h destination_constraint When adding keys, constrain them to be usable only through specific hosts or to specific destinations. Destination constraints of the form ‘[user@]dest-hostname’ permit use of the key only from the origin host (the one running ssh-agent(1)) to the listed destination host, with optional user name. Constraints of the form ‘src-hostname>[user@]dst-hostname’ allow a key available on a forwarded ssh-agent(1) to be used through a particular host (as specified by ‘src-hostname’) to authenticate to a further host, specified by ‘dst-hostname’. Multiple destination constraints may be added when loading keys. When attempting authentication with a key that has destination constraints, the whole connection path, including ssh-agent(1) forwarding, is tested against those constraints and each hop must be permitted for the attempt to succeed. For example, if key is forwarded to a remote host, ‘host-b’, and is attempting authentication to another host, ‘host-c’, then the operation will be successful only if ‘host-b’ was permitted from the origin host and the subsequent ‘host-b>host-c’ hop is also permitted by destination constraints. Hosts are identified by their host keys, and are looked up from known hosts files by ssh-add. Wildcards patterns may be used for hostnames and certificate host keys are supported. By default, keys added by ssh-add are not destination constrained. Destination constraints were added in OpenSSH release 8.9. Support in both the remote SSH client and server is required when using destination-constrained keys over a forwarded ssh-agent(1) channel. It is also important to note that destination constraints can only be enforced by ssh-agent(1) when a key is used, or when it is forwarded by a cooperating ssh(1). Specifically, it does not prevent an attacker with access to a remote SSH_AUTH_SOCK from forwarding it again and using it on a different host (but only to a permitted destination). -K Load resident keys from a FIDO authenticator. -k When loading keys into or deleting keys from the agent, process plain private keys only and skip certificates. -L Lists public key parameters of all identities currently represented by the agent. -l Lists fingerprints of all identities currently represented by the agent. -q Be quiet after a successful operation. -S provider Specifies a path to a library that will be used when adding FIDO authenticator-hosted keys, overriding the default of using the internal USB HID support. -s pkcs11 Add keys provided by the PKCS#11 shared library pkcs11. Certificate files may optionally be listed as command-line arguments. If these are present, then they will be loaded into the agent using any corresponding private keys loaded from the PKCS#11 token. -T pubkey ... Tests whether the private keys that correspond to the specified pubkey files are usable by performing sign and verify operations on each. -t life Set a maximum lifetime when adding identities to an agent. The lifetime may be specified in seconds or in a time format specified in sshd_config(5). -v Verbose mode. Causes ssh-add to print debugging messages about its progress. This is helpful in debugging problems. Multiple -v options increase the verbosity. The maximum is 3. -X Unlock the agent. -x Lock the agent with a password. --apple-use-keychain When adding identities, each passphrase will also be stored in the user's keychain. When removing identities with -d, each passphrase will be removed from it. --apple-load-keychain Add identities to the agent using any passphrase stored in the user's keychain. ENVIRONMENT DISPLAY, SSH_ASKPASS and SSH_ASKPASS_REQUIRE If ssh-add needs a passphrase, it will read the passphrase from the current terminal if it was run from a terminal. If ssh-add does not have a terminal associated with it but DISPLAY and SSH_ASKPASS are set, it will execute the program specified by SSH_ASKPASS (by default “ssh-askpass”) and open an X11 window to read the passphrase. This is particularly useful when calling ssh-add from a .xsession or related script. SSH_ASKPASS_REQUIRE allows further control over the use of an askpass program. If this variable is set to “never” then ssh-add will never attempt to use one. If it is set to “prefer”, then ssh-add will prefer to use the askpass program instead of the TTY when requesting passwords. Finally, if the variable is set to “force”, then the askpass program will be used for all passphrase input regardless of whether DISPLAY is set. SSH_AUTH_SOCK Identifies the path of a UNIX-domain socket used to communicate with the agent. SSH_SK_PROVIDER Specifies a path to a library that will be used when loading any FIDO authenticator-hosted keys, overriding the default of using the built-in USB HID support. APPLE_SSH_ADD_BEHAVIOR Enables or disables the older processing of the -A and -K options used in earlier macOS releases. These options have been renamed --apple-load-keychain and --apple-use-keychain respectively. However, -A and -K still behave as in earlier releases except in the following circumstances. If a security provider was specified with -S or SSH_SK_PROVIDER, or if APPLE_SSH_ADD_BEHAVIOR is set to the value “openssh”, then ssh-add uses standard OpenSSH behavior: the -A flag is not recognized and the -K flag behaves as documented in the DESCRIPTION section above. Otherwise, ssh-add -A and -K will behave as in earlier macOS releases. A warning will be output to standard error unless APPLE_SSH_ADD_BEHAVIOR is set to the value “macos”. Note: Future releases of macOS will not support neither -A nor -K without setting this environment variable. FILES ~/.ssh/id_dsa ~/.ssh/id_ecdsa ~/.ssh/id_ecdsa_sk ~/.ssh/id_ed25519 ~/.ssh/id_ed25519_sk ~/.ssh/id_rsa Contains the DSA, ECDSA, authenticator-hosted ECDSA, Ed25519, authenticator-hosted Ed25519 or RSA authentication identity of the user. Identity files should not be readable by anyone but the user. Note that ssh-add ignores identity files if they are accessible by others. EXIT STATUS Exit status is 0 on success, 1 if the specified command fails, and 2 if ssh-add is unable to contact the authentication agent. SEE ALSO ssh(1), ssh-agent(1), ssh-askpass(1), ssh-keygen(1), sshd(8) AUTHORS OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. macOS 14.5 December 18, 2023 macOS 14.5
|
ssh-add – adds private key identities to the OpenSSH authentication agent
|
ssh-add [-cCDdKkLlqvXx] [-E fingerprint_hash] [-H hostkey_file] [-h destination_constraint] [-S provider] [-t life] [file ...] ssh-add -s pkcs11 [-vC] [certificate ...] ssh-add -e pkcs11 ssh-add -T pubkey ...
| null | null |
machine
|
The machine command displays the machine type. SEE ALSO arch(1), make(1) macOS 14.5 July 26, 1991 macOS 14.5
|
machine – print machine type
|
machine
| null | null |
encguess5.30
|
The encoding identification is done by checking one encoding type at a time until all but the right type are eliminated. The set of encoding types to try is defined by the -s parameter and defaults to ascii, utf8 and UTF-16/32 with BOM. This can be overridden by passing one or more encoding types via the -s parameter. If you need to pass in multiple suspect encoding types, use a quoted string with the a space separating each value. SEE ALSO Encode::Guess, Encode::Detect LICENSE AND COPYRIGHT Copyright 2015 Michael LaGrasta and Dan Kogai. This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: <http://www.perlfoundation.org/artistic_license_2_0> perl v5.30.3 2024-04-13 ENCGUESS(1)
|
encguess - guess character encodings of files VERSION $Id: encguess,v 0.2 2016/08/04 03:15:58 dankogai Exp $
|
encguess [switches] filename... SWITCHES -h show this message and exit. -s specify a list of "suspect encoding types" to test, seperated by either ":" or "," -S output a list of all acceptable encoding types that can be used with the -s param -u suppress display of unidentified types EXAMPLES: • Guess encoding of a file named "test.txt", using only the default suspect types. encguess test.txt • Guess the encoding type of a file named "test.txt", using the suspect types "euc-jp,shiftjis,7bit-jis". encguess -s euc-jp,shiftjis,7bit-jis test.txt encguess -s euc-jp:shiftjis:7bit-jis test.txt • Guess the encoding type of several files, do not display results for unidentified files. encguess -us euc-jp,shiftjis,7bit-jis test*.txt
| null | null |
libnetcfg5.34
|
The libnetcfg utility can be used to configure the libnet. Starting from perl 5.8 libnet is part of the standard Perl distribution, but the libnetcfg can be used for any libnet installation. USAGE Without arguments libnetcfg displays the current configuration. $ libnetcfg # old config ./libnet.cfg daytime_hosts ntp1.none.such ftp_int_passive 0 ftp_testhost ftp.funet.fi inet_domain none.such nntp_hosts nntp.none.such ph_hosts pop3_hosts pop.none.such smtp_hosts smtp.none.such snpp_hosts test_exist 1 test_hosts 1 time_hosts ntp.none.such # libnetcfg -h for help $ It tells where the old configuration file was found (if found). The "-h" option will show a usage message. To change the configuration you will need to use either the "-c" or the "-d" options. The default name of the old configuration file is by default "libnet.cfg", unless otherwise specified using the -i option, "-i oldfile", and it is searched first from the current directory, and then from your module path. The default name of the new configuration file is "libnet.cfg", and by default it is written to the current directory, unless otherwise specified using the -o option, "-o newfile". SEE ALSO Net::Config, libnetFAQ AUTHORS Graham Barr, the original Configure script of libnet. Jarkko Hietaniemi, conversion into libnetcfg for inclusion into Perl 5.8. perl v5.34.1 2024-04-13 LIBNETCFG(1)
|
libnetcfg - configure libnet
| null | null | null |
wish8.5
|
Wish is a simple program consisting of the Tcl command language, the Tk toolkit, and a main program that reads commands from standard input or from a file. It creates a main window and then processes Tcl commands. If wish is invoked with arguments, then the first few arguments, ?-encoding name? ?fileName? specify the name of a script file, and, optionally, the encoding of the text data stored in that script file. A value for fileName is recognized if the appropriate argument does not start with “-”. If there are no arguments, or the arguments do not specify a fileName, then wish reads Tcl commands interactively from standard input. It will continue processing commands until all windows have been deleted or until end-of-file is reached on standard input. If there exists a file “.wishrc” in the home directory of the user, wish evaluates the file as a Tcl script just before reading the first command from standard input. If arguments to wish do specify a fileName, then fileName is treated as the name of a script file. Wish will evaluate the script in fileName (which presumably creates a user interface), then it will respond to events until all windows have been deleted. Commands will not be read from standard input. There is no automatic evaluation of “.wishrc” when the name of a script file is presented on the wish command line, but the script file can always source it if desired. Note that on Windows, the wishversion.exe program varies from the tclshversion.exe program in an additional important way: it does not connect to a standard Windows console and is instead a windowed program. Because of this, it additionally provides access to its own console command. OPTION PROCESSING Wish automatically processes all of the command-line options described in the OPTIONS summary above. Any other command-line arguments besides these are passed through to the application using the argc and argv variables described later. APPLICATION NAME AND CLASS The name of the application, which is used for purposes such as send commands, is taken from the -name option, if it is specified; otherwise it is taken from fileName, if it is specified, or from the command name by which wish was invoked. In the last two cases, if the name contains a “/” character, then only the characters after the last slash are used as the application name. The class of the application, which is used for purposes such as specifying options with a RESOURCE_MANAGER property or .Xdefaults file, is the same as its name except that the first letter is capitalized. VARIABLES Wish sets the following Tcl variables: argc Contains a count of the number of arg arguments (0 if none), not including the options described above. argv Contains a Tcl list whose elements are the arg arguments that follow a -- option or do not match any of the options described in OPTIONS above, in order, or an empty string if there are no such arguments. argv0 Contains fileName if it was specified. Otherwise, contains the name by which wish was invoked. geometry If the -geometry option is specified, wish copies its value into this variable. If the variable still exists after fileName has been evaluated, wish uses the value of the variable in a wm geometry command to set the main window's geometry. tcl_interactive Contains 1 if wish is reading commands interactively (fileName was not specified and standard input is a terminal-like device), 0 otherwise. SCRIPT FILES If you create a Tcl script in a file whose first line is #!/usr/local/bin/wish then you can invoke the script file directly from your shell if you mark it as executable. This assumes that wish has been installed in the default location in /usr/local/bin; if it is installed somewhere else then you will have to modify the above line to match. Many UNIX systems do not allow the #! line to exceed about 30 characters in length, so be sure that the wish executable can be accessed with a short file name. An even better approach is to start your script files with the following three lines: #!/bin/sh # the next line restarts using wish \ exec wish "$0" "$@" This approach has three advantages over the approach in the previous paragraph. First, the location of the wish binary does not have to be hard-wired into the script: it can be anywhere in your shell search path. Second, it gets around the 30-character file name limit in the previous approach. Third, this approach will work even if wish is itself a shell script (this is done on some systems in order to handle multiple architectures or operating systems: the wish script selects one of several binaries to run). The three lines cause both sh and wish to process the script, but the exec is only executed by sh. sh processes the script first; it treats the second line as a comment and executes the third line. The exec statement cause the shell to stop processing and instead to start up wish to reprocess the entire script. When wish starts up, it treats all three lines as comments, since the backslash at the end of the second line causes the third line to be treated as part of the comment on the second line. The end of a script file may be marked either by the physical end of the medium, or by the character, “\032” (“\u001a”, control-Z). If this character is present in the file, the wish application will read text up to but not including the character. An application that requires this character in the file may encode it as “\032”, “\x1a”, or “\u001a”; or may generate it by use of commands such as format or binary. PROMPTS When wish is invoked interactively it normally prompts for each command with “% ”. You can change the prompt by setting the variables tcl_prompt1 and tcl_prompt2. If variable tcl_prompt1 exists then it must consist of a Tcl script to output a prompt; instead of outputting a prompt wish will evaluate the script in tcl_prompt1. The variable tcl_prompt2 is used in a similar way when a newline is typed but the current command is not yet complete; if tcl_prompt2 is not set then no prompt is output for incomplete commands. KEYWORDS shell, toolkit Tk 8.0 wish(1)
|
wish - Simple windowing shell
|
wish ?-encoding name? ?fileName arg arg ...?
|
-encoding name Specifies the encoding of the text stored in │ fileName. This option is only recognized prior to │ the fileName argument. -colormap new Specifies that the window should have a new private colormap instead of using the default colormap for the screen. -display display Display (and screen) on which to display window. -geometry geometry Initial geometry to use for window. If this option is specified, its value is stored in the geometry global variable of the application's Tcl interpreter. -name name Use name as the title to be displayed in the window, and as the name of the interpreter for send commands. -sync Execute all X server commands synchronously, so that errors are reported immediately. This will result in much slower execution, but it is useful for debugging. -use id Specifies that the main window for the application is to be embedded in the window whose identifier is id, instead of being created as an independent toplevel window. Id must be specified in the same way as the value for the -use option for toplevel widgets (i.e. it has a form like that returned by the winfo id command). Note that on some platforms this will only work correctly if id refers to a Tk frame or toplevel that has its -container option enabled. -visual visual Specifies the visual to use for the window. Visual may have any of the forms supported by the Tk_GetVisual procedure. -- Pass all remaining arguments through to the script's argv variable without interpreting them. This provides a mechanism for passing arguments such as -name to a script instead of having wish interpret them. ______________________________________________________________________________
| null |
screen
|
Screen is a full-screen window manager that multiplexes a physical terminal between several processes (typically interactive shells). Each virtual terminal provides the functions of a DEC VT100 terminal and, in addition, several control functions from the ISO 6429 (ECMA 48, ANSI X3.64) and ISO 2022 standards (e.g. insert/delete line and support for multiple character sets). There is a scrollback history buffer for each virtual terminal and a copy-and-paste mechanism that allows moving text regions between windows. When screen is called, it creates a single window with a shell in it (or the specified command) and then gets out of your way so that you can use the program as you normally would. Then, at any time, you can create new (full-screen) windows with other programs in them (including more shells), kill existing windows, view a list of windows, turn output logging on and off, copy-and-paste text between windows, view the scrollback history, switch between windows in whatever manner you wish, etc. All windows run their programs completely independent of each other. Programs continue to run when their window is currently not visible and even when the whole screen session is detached from the user's terminal. When a program terminates, screen (per default) kills the window that contained it. If this window was in the foreground, the display switches to the previous window; if none are left, screen exits. Everything you type is sent to the program running in the current window. The only exception to this is the one keystroke that is used to initiate a command to the window manager. By default, each command begins with a control-a (abbreviated C-a from now on), and is followed by one other keystroke. The command character and all the key bindings can be fully customized to be anything you like, though they are always two characters in length. Screen does not understand the prefix "C-" to mean control. Please use the caret notation ("^A" instead of "C-a") as arguments to e.g. the escape command or the -e option. Screen will also print out control characters in caret notation. The standard way to create a new window is to type "C-a c". This creates a new window running a shell and switches to that window immediately, regardless of the state of the process running in the current window. Similarly, you can create a new window with a custom command in it by first binding the command to a keystroke (in your .screenrc file or at the "C-a :" command line) and then using it just like the "C-a c" command. In addition, new windows can be created by running a command like: screen emacs prog.c from a shell prompt within a previously created window. This will not run another copy of screen, but will instead supply the command name and its arguments to the window manager (specified in the $STY environment variable) who will use it to create the new window. The above example would start the emacs editor (editing prog.c) and switch to its window. If "/etc/utmp" is writable by screen, an appropriate record will be written to this file for each window, and removed when the window is terminated. This is useful for working with "talk", "script", "shutdown", "rsend", "sccs" and other similar programs that use the utmp file to determine who you are. As long as screen is active on your terminal, the terminal's own record is removed from the utmp file. See also "C-a L". GETTING STARTED Before you begin to use screen you'll need to make sure you have correctly selected your terminal type, just as you would for any other termcap/terminfo program. (You can do this by using tset for example.) If you're impatient and want to get started without doing a lot more reading, you should remember this one command: "C-a ?". Typing these two characters will display a list of the available screen commands and their bindings. Each keystroke is discussed in the section "DEFAULT KEY BINDINGS". The manual section "CUSTOMIZATION" deals with the contents of your .screenrc. If your terminal is a "true" auto-margin terminal (it doesn't allow the last position on the screen to be updated without scrolling the screen) consider using a version of your terminal's termcap that has automatic margins turned off. This will ensure an accurate and optimal update of the screen in all circumstances. Most terminals nowadays have "magic" margins (automatic margins plus usable last column). This is the VT100 style type and perfectly suited for screen. If all you've got is a "true" auto-margin terminal screen will be content to use it, but updating a character put into the last position on the screen may not be possible until the screen scrolls or the character is moved into a safe position in some other way. This delay can be shortened by using a terminal with insert-character capability. COMMAND-LINE OPTIONS Screen has the following command-line options: -a include all capabilities (with some minor exceptions) in each window's termcap, even if screen must redraw parts of the display in order to implement a function. -A Adapt the sizes of all windows to the size of the current terminal. By default, screen tries to restore its old window sizes when attaching to resizable terminals (those with "WS" in its description, e.g. suncmd or some xterm). -c file override the default configuration file from "$HOME/.screenrc" to file. -d|-D [pid.tty.host] does not start screen, but detaches the elsewhere running screen session. It has the same effect as typing "C-a d" from screen's controlling terminal. -D is the equivalent to the power detach key. If no session can be detached, this option is ignored. In combination with the -r/-R option more powerful effects can be achieved: -d -r Reattach a session and if necessary detach it first. -d -R Reattach a session and if necessary detach or even create it first. -d -RR Reattach a session and if necessary detach or create it. Use the first session if more than one session is available. -D -r Reattach a session. If necessary detach and logout remotely first. -D -R Attach here and now. In detail this means: If a session is running, then reattach. If necessary detach and logout remotely first. If it was not running create it and notify the user. This is the author's favorite. -D -RR Attach here and now. Whatever that means, just do it. Note: It is always a good idea to check the status of your sessions by means of "screen -list". -e xy specifies the command character to be x and the character generating a literal command character to y (when typed after the command character). The default is "C-a" and `a', which can be specified as "-e^Aa". When creating a screen session, this option sets the default command character. In a multiuser session all users added will start off with this command character. But when attaching to an already running session, this option changes only the command character of the attaching user. This option is equivalent to either the commands "defescape" or "escape" respectively. -f, -fn, and -fa turns flow-control on, off, or "automatic switching mode". This can also be defined through the "defflow" .screenrc command. -h num Specifies the history scrollback buffer to be num lines high. -i will cause the interrupt key (usually C-c) to interrupt the display immediately when flow-control is on. See the "defflow" .screenrc command for details. The use of this option is discouraged. -l and -ln turns login mode on or off (for /etc/utmp updating). This can also be defined through the "deflogin" .screenrc command. -ls and -list does not start screen, but prints a list of pid.tty.host strings identifying your screen sessions. Sessions marked `detached' can be resumed with "screen -r". Those marked `attached' are running and have a controlling terminal. If the session runs in multiuser mode, it is marked `multi'. Sessions marked as `unreachable' either live on a different host or are `dead'. An unreachable session is considered dead, when its name matches either the name of the local host, or the specified parameter, if any. See the -r flag for a description how to construct matches. Sessions marked as `dead' should be thoroughly checked and removed. Ask your system administrator if you are not sure. Remove sessions with the -wipe option. -L tells screen to turn on automatic output logging for the windows. -m causes screen to ignore the $STY environment variable. With "screen -m" creation of a new session is enforced, regardless whether screen is called from within another screen session or not. This flag has a special meaning in connection with the `-d' option: -d -m Start screen in "detached" mode. This creates a new session but doesn't attach to it. This is useful for system startup scripts. -D -m This also starts screen in "detached" mode, but doesn't fork a new process. The command exits if the session terminates. -O selects a more optimal output mode for your terminal rather than true VT100 emulation (only affects auto-margin terminals without `LP'). This can also be set in your .screenrc by specifying `OP' in a "termcap" command. -p number_or_name Preselect a window. This is usefull when you want to reattach to a specific windor or you want to send a command via the "-X" option to a specific window. As with screen's select commant, "-" selects the blank window. As a special case for reattach, "=" brings up the windowlist on the blank window. -q Suppress printing of error messages. In combination with "-ls" the exit value is as follows: 9 indicates a directory without sessions. 10 indicates a directory with running but not attachable sessions. 11 (or more) indicates 1 (or more) usable sessions. In combination with "-r" the exit value is as follows: 10 indicates that there is no session to resume. 12 (or more) indicates that there are 2 (or more) sessions to resume and you should specify which one to choose. In all other cases "-q" has no effect. -r [pid.tty.host] -r sessionowner/[pid.tty.host] resumes a detached screen session. No other options (except combinations with -d/-D) may be specified, though an optional prefix of [pid.]tty.host may be needed to distinguish between multiple detached screen sessions. The second form is used to connect to another user's screen session which runs in multiuser mode. This indicates that screen should look for sessions in another user's directory. This requires setuid-root. -R attempts to resume the first detached screen session it finds. If successful, all other command-line options are ignored. If no detached session exists, starts a new session using the specified options, just as if -R had not been specified. The option is set by default if screen is run as a login-shell (actually screen uses "-xRR" in that case). For combinations with the -d/-D option see there. -s sets the default shell to the program specified, instead of the value in the environment variable $SHELL (or "/bin/sh" if not defined). This can also be defined through the "shell" .screenrc command. -S sessionname When creating a new session, this option can be used to specify a meaningful name for the session. This name identifies the session for "screen -list" and "screen -r" actions. It substitutes the default [tty.host] suffix. -t name sets the title (a.k.a.) for the default shell or specified program. See also the "shelltitle" .screenrc command. -U Run screen in UTF-8 mode. This option tells screen that your terminal sends and understands UTF-8 encoded characters. It also sets the default encoding for new windows to `utf8'. -v Print version number. -wipe [match] does the same as "screen -ls", but removes destroyed sessions instead of marking them as `dead'. An unreachable session is considered dead, when its name matches either the name of the local host, or the explicitly given parameter, if any. See the -r flag for a description how to construct matches. -x Attach to a not detached screen session. (Multi display mode). -X Send the specified command to a running screen session. You can use the -d or -r option to tell screen to look only for attached or detached screen sessions. Note that this command doesn't work if the session is password protected. DEFAULT KEY BINDINGS As mentioned, each screen command consists of a "C-a" followed by one other character. For your convenience, all commands that are bound to lower-case letters are also bound to their control character counterparts (with the exception of "C-a a"; see below), thus, "C-a c" as well as "C-a C-c" can be used to create a window. See section "CUSTOMIZATION" for a description of the command. The following table shows the default key bindings: C-a ' (select) Prompt for a window name or number to switch to. C-a " (windowlist -b) Present a list of all windows for selection. C-a 0 (select 0) ... ... C-a 9 (select 9) C-a - (select -) Switch to window number 0 - 9, or to the blank window. C-a tab (focus) Switch the input focus to the next region. C-a C-a (other) Toggle to the window displayed previously. Note that this binding defaults to the command character typed twice, unless overridden. For instance, if you use the option "-e]x", this command becomes "]]". C-a a (meta) Send the command character (C-a) to window. See escape command. C-a A (title) Allow the user to enter a name for the current window. C-a b C-a C-b (break) Send a break to window. C-a B (pow_break) Reopen the terminal line and send a break. C-a c C-a C-c (screen) Create a new window with a shell and switch to that window. C-a C (clear) Clear the screen. C-a d C-a C-d (detach) Detach screen from this terminal. C-a D D (pow_detach) Detach and logout. C-a f C-a C-f (flow) Toggle flow on, off or auto. C-a F (fit) Resize the window to the current region size. C-a C-g (vbell) Toggles screen's visual bell mode. C-a h (hardcopy) Write a hardcopy of the current window to the file "hardcopy.n". C-a H (log) Begins/ends logging of the current window to the file "screenlog.n". C-a i C-a C-i (info) Show info about this window. C-a k C-a C-k (kill) Destroy current window. C-a l C-a C-l (redisplay) Fully refresh current window. C-a L (login) Toggle this windows login slot. Available only if screen is configured to update the utmp database. C-a m C-a C-m (lastmsg) Repeat the last message displayed in the message line. C-a M (monitor) Toggles monitoring of the current window. C-a space C-a n C-a C-n (next) Switch to the next window. C-a N (number) Show the number (and title) of the current window. C-a backspace C-a h C-a p C-a C-p (prev) Switch to the previous window (opposite of C- a n). C-a q C-a C-q (xon) Send a control-q to the current window. C-a Q (only) Delete all regions but the current one. C-a r C-a C-r (wrap) Toggle the current window's line-wrap setting (turn the current window's automatic margins on and off). C-a s C-a C-s (xoff) Send a control-s to the current window. C-a S (split) Split the current region into two new ones. C-a t C-a C-t (time) Show system information. C-a v (version) Display the version and compilation date. C-a C-v (digraph) Enter digraph. C-a w C-a C-w (windows) Show a list of window. C-a W (width) Toggle 80/132 columns. C-a x C-a C-x (lockscreen) Lock this terminal. C-a X (remove) Kill the current region. C-a z C-a C-z (suspend) Suspend screen. Your system must support BSD-style job-control. C-a Z (reset) Reset the virtual terminal to its "power-on" values. C-a . (dumptermcap) Write out a ".termcap" file. C-a ? (help) Show key bindings. C-a C-\ (quit) Kill all windows and terminate screen. C-a : (colon) Enter command line mode. C-a [ C-a C-[ C-a esc (copy) Enter copy/scrollback mode. C-a ] (paste .) Write the contents of the paste buffer to the stdin queue of the current window. C-a { C-a } (history) Copy and paste a previous (command) line. C-a > (writebuf) Write paste buffer to a file. C-a < (readbuf) Reads the screen-exchange file into the paste buffer. C-a = (removebuf) Removes the file used by C-a < and C-a >. C-a , (license) Shows where screen comes from, where it went to and why you can use it. C-a _ (silence) Start/stop monitoring the current window for inactivity. C-a * (displays) Show a listing of all currently attached displays. CUSTOMIZATION The "socket directory" defaults either to $HOME/.screen or simply to /tmp/screens or preferably to /usr/local/screens chosen at compile- time. If screen is installed setuid-root, then the administrator should compile screen with an adequate (not NFS mounted) socket directory. If screen is not running setuid-root, the user can specify any mode 700 directory in the environment variable $SCREENDIR. When screen is invoked, it executes initialization commands from the files "/usr/local/etc/screenrc" and ".screenrc" in the user's home directory. These are the "programmer's defaults" that can be overridden in the following ways: for the global screenrc file screen searches for the environment variable $SYSSCREENRC (this override feature may be disabled at compile-time). The user specific screenrc file is searched in $SCREENRC, then $HOME/.screenrc. The command line option -c takes precedence over the above user screenrc files. Commands in these files are used to set options, bind functions to keys, and to automatically establish one or more windows at the beginning of your screen session. Commands are listed one per line, with empty lines being ignored. A command's arguments are separated by tabs or spaces, and may be surrounded by single or double quotes. A `#' turns the rest of the line into a comment, except in quotes. Unintelligible lines are warned about and ignored. Commands may contain references to environment variables. The syntax is the shell- like "$VAR " or "${VAR}". Note that this causes incompatibility with previous screen versions, as now the '$'-character has to be protected with '\' if no variable substitution shall be performed. A string in single-quotes is also protected from variable substitution. Two configuration files are shipped as examples with your screen distribution: "etc/screenrc" and "etc/etcscreenrc". They contain a number of useful examples for various commands. Customization can also be done 'on-line'. To enter the command mode type `C-a :'. Note that commands starting with "def" change default values, while others change current settings. The following commands are available: acladd usernames [crypted-pw] addacl usernames Enable users to fully access this screen session. Usernames can be one user or a comma separated list of users. This command enables to attach to the screen session and performs the equivalent of `aclchg usernames +rwx "#?"'. executed. To add a user with restricted access, use the `aclchg' command below. If an optional second parameter is supplied, it should be a crypted password for the named user(s). `Addacl' is a synonym to `acladd'. Multi user mode only. aclchg usernames permbits list chacl usernames permbits list Change permissions for a comma separated list of users. Permission bits are represented as `r', `w' and `x'. Prefixing `+' grants the permission, `-' removes it. The third parameter is a comma separated list of commands and/or windows (specified either by number or title). The special list `#' refers to all windows, `?' to all commands. if usernames consists of a single `*', all known users are affected. A command can be executed when the user has the `x' bit for it. The user can type input to a window when he has its `w' bit set and no other user obtains a writelock for this window. Other bits are currently ignored. To withdraw the writelock from another user in window 2: `aclchg username -w+w 2'. To allow read-only access to the session: `aclchg username -w "#"'. As soon as a user's name is known to screen he can attach to the session and (per default) has full permissions for all command and windows. Execution permission for the acl commands, `at' and others should also be removed or the user may be able to regain write permission. Rights of the special username nobody cannot be changed (see the "su" command). `Chacl' is a synonym to `aclchg'. Multi user mode only. acldel username Remove a user from screen's access control list. If currently attached, all the user's displays are detached from the session. He cannot attach again. Multi user mode only. aclgrp username [groupname] Creates groups of users that share common access rights. The name of the group is the username of the group leader. Each member of the group inherits the permissions that are granted to the group leader. That means, if a user fails an access check, another check is made for the group leader. A user is removed from all groups the special value "none" is used for groupname. If the second parameter is omitted all groups the user is in are listed. aclumask [[users]+bits |[users]-bits .... ] umask [[users]+bits |[users]-bits .... ] This specifies the access other users have to windows that will be created by the caller of the command. Users may be no, one or a comma separated list of known usernames. If no users are specified, a list of all currently known users is assumed. Bits is any combination of access control bits allowed defined with the "aclchg" command. The special username "?" predefines the access that not yet known users will be granted to any window initially. The special username "??" predefines the access that not yet known users are granted to any command. Rights of the special username nobody cannot be changed (see the "su" command). `Umask' is a synonym to `aclumask'. activity message When any activity occurs in a background window that is being monitored, screen displays a notification in the message line. The notification message can be re-defined by means of the "activity" command. Each occurrence of `%' in message is replaced by the number of the window in which activity has occurred, and each occurrence of `^G' is replaced by the definition for bell in your termcap (usually an audible bell). The default message is 'Activity in window %n' Note that monitoring is off for all windows by default, but can be altered by use of the "monitor" command (C-a M). allpartial on|off If set to on, only the current cursor line is refreshed on window change. This affects all windows and is useful for slow terminal lines. The previous setting of full/partial refresh for each window is restored with "allpartial off". This is a global flag that immediately takes effect on all windows overriding the "partial" settings. It does not change the default redraw behavior of newly created windows. altscreen on|off If set to on, "alternate screen" support is enabled in virtual terminals, just like in xterm. Initial setting is `off'. at [identifier][#|*|%] command [args ... ] Execute a command at other displays or windows as if it had been entered there. "At" changes the context (the `current window' or `current display' setting) of the command. If the first parameter describes a non-unique context, the command will be executed multiple times. If the first parameter is of the form `identifier*' then identifier is matched against user names. The command is executed once for each display of the selected user(s). If the first parameter is of the form `identifier%' identifier is matched against displays. Displays are named after the ttys they attach. The prefix `/dev/' or `/dev/tty' may be omitted from the identifier. If identifier has a `#' or nothing appended it is matched against window numbers and titles. Omitting an identifier in front of the `#', `*' or `%'-character selects all users, displays or windows because a prefix-match is performed. Note that on the affected display(s) a short message will describe what happened. Permission is checked for initiator of the "at" command, not for the owners of the affected display(s). Note that the '#' character works as a comment introducer when it is preceded by whitespace. This can be escaped by prefixing a '\'. Permission is checked for the initiator of the "at" command, not for the owners of the affected display(s). Caveat: When matching against windows, the command is executed at least once per window. Commands that change the internal arrangement of windows (like "other") may be called again. In shared windows the command will be repeated for each attached display. Beware, when issuing toggle commands like "login"! Some commands (e.g. "process") require that a display is associated with the target windows. These commands may not work correctly under "at" looping over windows. attrcolor attrib [attribute/color-modifier] This command can be used to highlight attributes by changing the color of the text. If the attribute attrib is in use, the specified attribute/color modifier is also applied. If no modifier is given, the current one is deleted. See the "STRING ESCAPES" chapter for the syntax of the modifier. Screen understands two pseudo-attributes, "i" stands for high-intensity foreground color and "I" for high-intensity background color. Examples: attrcolor b "R" Change the color to bright red if bold text is to be printed. attrcolor u "-u b" Use blue text instead of underline. attrcolor b ".I" Use bright colors for bold text. Most terminal emulators do this already. attrcolor i "+b" Make bright colored text also bold. autodetach on|off Sets whether screen will automatically detach upon hangup, which saves all your running programs until they are resumed with a screen -r command. When turned off, a hangup signal will terminate screen and all the processes it contains. Autodetach is on by default. autonuke on|off Sets whether a clear screen sequence should nuke all the output that has not been written to the terminal. See also "obuflimit". backtick id lifespan autorefresh cmd args... backtick id Program the backtick command with the numerical id id. The output of such a command is used for substitution of the "%`" string escape. The specified lifespan is the number of seconds the output is considered valid. After this time, the command is run again if a corresponding string escape is encountered. The autorefresh parameter triggers an automatic refresh for caption and hardstatus strings after the specified number of seconds. Only the last line of output is used for substitution. If both the lifespan and the autorefresh parameters are zero, the backtick program is expected to stay in the background and generate output once in a while. In this case, the command is executed right away and screen stores the last line of output. If a new line gets printed screen will automatically refresh the hardstatus or the captions. The second form of the command deletes the backtick command with the numerical id id. bce [on|off] Change background-color-erase setting. If "bce" is set to on, all characters cleared by an erase/insert/scroll/clear operation will be displayed in the current background color. Otherwise the default background color is used. bell_msg [message] When a bell character is sent to a background window, screen displays a notification in the message line. The notification message can be re- defined by this command. Each occurrence of `%' in message is replaced by the number of the window to which a bell has been sent, and each occurrence of `^G' is replaced by the definition for bell in your termcap (usually an audible bell). The default message is 'Bell in window %n' An empty message can be supplied to the "bell_msg" command to suppress output of a message line (bell_msg ""). Without parameter, the current message is shown. bind [-c class] key [command [args]] Bind a command to a key. By default, most of the commands provided by screen are bound to one or more keys as indicated in the "DEFAULT KEY BINDINGS" section, e.g. the command to create a new window is bound to "C-c" and "c". The "bind" command can be used to redefine the key bindings and to define new bindings. The key argument is either a single character, a two-character sequence of the form "^x" (meaning "C-x"), a backslash followed by an octal number (specifying the ASCII code of the character), or a backslash followed by a second character, such as "\^" or "\\". The argument can also be quoted, if you like. If no further argument is given, any previously established binding for this key is removed. The command argument can be any command listed in this section. If a command class is specified via the "-c" option, the key is bound for the specified class. Use the "command" command to activate a class. Command classes can be used to create multiple command keys or multi- character bindings. Some examples: bind ' ' windows bind ^k bind k bind K kill bind ^f screen telnet foobar bind \033 screen -ln -t root -h 1000 9 su would bind the space key to the command that displays a list of windows (so that the command usually invoked by "C-a C-w" would also be available as "C-a space"). The next three lines remove the default kill binding from "C-a C-k" and "C-a k". "C-a K" is then bound to the kill command. Then it binds "C-f" to the command "create a window with a TELNET connection to foobar", and bind "escape" to the command that creates an non-login window with a.k.a. "root" in slot #9, with a superuser shell and a scrollback buffer of 1000 lines. bind -c demo1 0 select 10 bind -c demo1 1 select 11 bind -c demo1 2 select 12 bindkey "^B" command -c demo1 makes "C-b 0" select window 10, "C-b 1" window 11, etc. bind -c demo2 0 select 10 bind -c demo2 1 select 11 bind -c demo2 2 select 12 bind - command -c demo2 makes "C-a - 0" select window 10, "C-a - 1" window 11, etc. bindkey [-d] [-m] [-a] [[-k|-t] string [cmd args]] This command manages screen's input translation tables. Every entry in one of the tables tells screen how to react if a certain sequence of characters is encountered. There are three tables: one that should contain actions programmed by the user, one for the default actions used for terminal emulation and one for screen's copy mode to do cursor movement. See section "INPUT TRANSLATION" for a list of default key bindings. If the -d option is given, bindkey modifies the default table, -m changes the copy mode table and with neither option the user table is selected. The argument string is the sequence of characters to which an action is bound. This can either be a fixed string or a termcap keyboard capability name (selectable with the -k option). Some keys on a VT100 terminal can send a different string if application mode is turned on (e.g the cursor keys). Such keys have two entries in the translation table. You can select the application mode entry by specifying the -a option. The -t option tells screen not to do inter-character timing. One cannot turn off the timing if a termcap capability is used. Cmd can be any of screen's commands with an arbitrary number of args. If cmd is omitted the key-binding is removed from the table. Here are some examples of keyboard bindings: bindkey -d Show all of the default key bindings. The application mode entries are marked with [A]. bindkey -k k1 select 1 Make the "F1" key switch to window one. bindkey -t foo stuff barfoo Make "foo" an abbreviation of the word "barfoo". Timeout is disabled so that users can type slowly. bindkey "\024" mapdefault This key-binding makes "^T" an escape character for key-bindings. If you did the above "stuff barfoo" binding, you can enter the word "foo" by typing "^Tfoo". If you want to insert a "^T" you have to press the key twice (i.e. escape the escape binding). bindkey -k F1 command Make the F11 (not F1!) key an alternative screen escape (besides ^A). break [duration] Send a break signal for duration*0.25 seconds to this window. For non- Posix systems the time interval may be rounded up to full seconds. Most useful if a character device is attached to the window rather than a shell process (See also chapter "WINDOW TYPES"). The maximum duration of a break signal is limited to 15 seconds. blanker Activate the screen blanker. First the screen is cleared. If no blanker program is defined, the cursor is turned off, otherwise, the program is started and it's output is written to the screen. The screen blanker is killed with the first keypress, the read key is discarded. This command is normally used together with the "idle" command. blankerprg [program args] Defines a blanker program. Disables the blanker program if no arguments are given. breaktype [tcsendbreak|TIOCSBRK |TCSBRK] Choose one of the available methods of generating a break signal for terminal devices. This command should affect the current window only. But it still behaves identical to "defbreaktype". This will be changed in the future. Calling "breaktype" with no parameter displays the break method for the current window. bufferfile [exchange-file] Change the filename used for reading and writing with the paste buffer. If the optional argument to the "bufferfile" command is omitted, the default setting ("/tmp/screen-exchange") is reactivated. The following example will paste the system's password file into the screen window (using the paste buffer, where a copy remains): C-a : bufferfile /etc/passwd C-a < C-a ] C-a : bufferfile c1 [on|off] Change c1 code processing. "C1 on" tells screen to treat the input characters between 128 and 159 as control functions. Such an 8-bit code is normally the same as ESC followed by the corresponding 7-bit code. The default setting is to process c1 codes and can be changed with the "defc1" command. Users with fonts that have usable characters in the c1 positions may want to turn this off. caption always|splitonly [string] caption string [string] This command controls the display of the window captions. Normally a caption is only used if more than one window is shown on the display (split screen mode). But if the type is set to always screen shows a caption even if only one window is displayed. The default is splitonly. The second form changes the text used for the caption. You can use all escapes from the "STRING ESCAPES" chapter. Screen uses a default of `%3n %t'. You can mix both forms by providing a string as an additional argument. charset set Change the current character set slot designation and charset mapping. The first four character of set are treated as charset designators while the fifth and sixth character must be in range '0' to '3' and set the GL/GR charset mapping. On every position a '.' may be used to indicate that the corresponding charset/mapping should not be changed (set is padded to six characters internally by appending '.' chars). New windows have "BBBB02" as default charset, unless a "encoding" command is active. The current setting can be viewed with the "info" command. chdir [directory] Change the current directory of screen to the specified directory or, if called without an argument, to your home directory (the value of the environment variable $HOME). All windows that are created by means of the "screen" command from within ".screenrc" or by means of "C-a : screen ..." or "C-a c" use this as their default directory. Without a chdir command, this would be the directory from which screen was invoked. Hardcopy and log files are always written to the window's default directory, not the current directory of the process running in the window. You can use this command multiple times in your .screenrc to start various windows in different default directories, but the last chdir value will affect all the windows you create interactively. clear Clears the current window and saves its image to the scrollback buffer. colon [prefix] Allows you to enter ".screenrc" command lines. Useful for on-the-fly modification of key bindings, specific window creation and changing settings. Note that the "set" keyword no longer exists! Usually commands affect the current window rather than default settings for future windows. Change defaults with commands starting with 'def...'. If you consider this as the `Ex command mode' of screen, you may regard "C-a esc" (copy mode) as its `Vi command mode'. command [-c class] This command has the same effect as typing the screen escape character (^A). It is probably only useful for key bindings. If the "-c" option is given, select the specified command class. See also "bind" and "bindkey". compacthist [on|off] This tells screen whether to suppress trailing blank lines when scrolling up text into the history buffer. console [on|off] Grabs or un-grabs the machines console output to a window. Note: Only the owner of /dev/console can grab the console output. This command is only available if the machine supports the ioctl TIOCCONS. copy Enter copy/scrollback mode. This allows you to copy text from the current window and its history into the paste buffer. In this mode a vi-like `full screen editor' is active: Movement keys: h, j, k, l move the cursor line by line or column by column. 0, ^ and $ move to the leftmost column, to the first or last non- whitespace character on the line. H, M and L move the cursor to the leftmost column of the top, center or bottom line of the window. + and - positions one line up and down. G moves to the specified absolute line (default: end of buffer). | moves to the specified absolute column. w, b, e move the cursor word by word. B, E move the cursor WORD by WORD (as in vi). C-u and C-d scroll the display up/down by the specified amount of lines while preserving the cursor position. (Default: half screen- full). C-b and C-f scroll the display up/down a full screen. g moves to the beginning of the buffer. % jumps to the specified percentage of the buffer. Note: Emacs style movement keys can be customized by a .screenrc command. (E.g. markkeys "h=^B:l=^F:$=^E") There is no simple method for a full emacs-style keymap, as this involves multi-character codes. Marking: The copy range is specified by setting two marks. The text between these marks will be highlighted. Press space to set the first or second mark respectively. Y and y used to mark one whole line or to mark from start of line. W marks exactly one word. Repeat count: Any of these commands can be prefixed with a repeat count number by pressing digits 0..9 which is taken as a repeat count. Example: "C-a C-[ H 10 j 5 Y" will copy lines 11 to 15 into the paste buffer. Searching: / Vi-like search forward. ? Vi-like search backward. C-a s Emacs style incremental search forward. C-r Emacs style reverse i-search. Specials: There are however some keys that act differently than in vi. Vi does not allow one to yank rectangular blocks of text, but screen does. Press c or C to set the left or right margin respectively. If no repeat count is given, both default to the current cursor position. Example: Try this on a rather full text screen: "C-a [ M 20 l SPACE c 10 l 5 j C SPACE". This moves one to the middle line of the screen, moves in 20 columns left, marks the beginning of the paste buffer, sets the left column, moves 5 columns down, sets the right column, and then marks the end of the paste buffer. Now try: "C-a [ M 20 l SPACE 10 l 5 j SPACE" and notice the difference in the amount of text copied. J joins lines. It toggles between 4 modes: lines separated by a newline character (012), lines glued seamless, lines separated by a single whitespace and comma separated lines. Note that you can prepend the newline character with a carriage return character, by issuing a "crlf on". v is for all the vi users with ":set numbers" - it toggles the left margin between column 9 and 1. Press a before the final space key to toggle in append mode. Thus the contents of the paste buffer will not be overwritten, but is appended to. A toggles in append mode and sets a (second) mark. > sets the (second) mark and writes the contents of the paste buffer to the screen-exchange file (/tmp/screen-exchange per default) once copy-mode is finished. This example demonstrates how to dump the whole scrollback buffer to that file: "C-A [ g SPACE G $ >". C-g gives information about the current line and column. x exchanges the first mark and the current cursor position. You can use this to adjust an already placed mark. @ does nothing. Does not even exit copy mode. All keys not described here exit copy mode. copy_reg [key] No longer exists, use "readreg" instead. crlf [on|off] This affects the copying of text regions with the `C-a [' command. If it is set to `on', lines will be separated by the two character sequence `CR' - `LF'. Otherwise (default) only `LF' is used. When no parameter is given, the state is toggled. debug on|off Turns runtime debugging on or off. If screen has been compiled with option -DDEBUG debugging available and is turned on per default. Note that this command only affects debugging output from the main "SCREEN" process correctly. Debug output from attacher processes can only be turned off once and forever. defc1 on|off Same as the c1 command except that the default setting for new windows is changed. Initial setting is `on'. defautonuke on|off Same as the autonuke command except that the default setting for new displays is changed. Initial setting is `off'. Note that you can use the special `AN' terminal capability if you want to have a dependency on the terminal type. defbce on|off Same as the bce command except that the default setting for new windows is changed. Initial setting is `off'. defbreaktype [tcsendbreak|TIOCSBRK |TCSBRK] Choose one of the available methods of generating a break signal for terminal devices. The preferred methods are tcsendbreak and TIOCSBRK. The third, TCSBRK, blocks the complete screen session for the duration of the break, but it may be the only way to generate long breaks. Tcsendbreak and TIOCSBRK may or may not produce long breaks with spikes (e.g. 4 per second). This is not only system dependant, this also differs between serial board drivers. Calling "defbreaktype" with no parameter displays the current setting. defcharset [set] Like the charset command except that the default setting for new windows is changed. Shows current default if called without argument. defescape xy Set the default command characters. This is equivalent to the "escape" except that it is useful multiuser sessions only. In a multiuser session "escape" changes the command character of the calling user, where "defescape" changes the default command characters for users that will be added later. defflow on|off|auto [interrupt] Same as the flow command except that the default setting for new windows is changed. Initial setting is `auto'. Specifying "defflow auto interrupt" is the same as the command-line options -fa and -i. defgr on|off Same as the gr command except that the default setting for new windows is changed. Initial setting is `off'. defhstatus [status] The hardstatus line that all new windows will get is set to status. This command is useful to make the hardstatus of every window display the window number or title or the like. Status may contain the same directives as in the window messages, but the directive escape character is '^E' (octal 005) instead of '%'. This was done to make a misinterpretation of program generated hardstatus lines impossible. If the parameter status is omitted, the current default string is displayed. Per default the hardstatus line of new windows is empty. defencoding enc Same as the encoding command except that the default setting for new windows is changed. Initial setting is the encoding taken from the terminal. deflog on|off Same as the log command except that the default setting for new windows is changed. Initial setting is `off'. deflogin on|off Same as the login command except that the default setting for new windows is changed. This is initialized with `on' as distributed (see config.h.in). defmode mode The mode of each newly allocated pseudo-tty is set to mode. Mode is an octal number. When no "defmode" command is given, mode 0622 is used. defmonitor on|off Same as the monitor command except that the default setting for new windows is changed. Initial setting is `off'. defnonblock on|off|numsecs Same as the nonblock command except that the default setting for displays is changed. Initial setting is `off'. defobuflimit limit Same as the obuflimit command except that the default setting for new displays is changed. Initial setting is 256 bytes. Note that you can use the special 'OL' terminal capability if you want to have a dependency on the terminal type. defscrollback num Same as the scrollback command except that the default setting for new windows is changed. Initial setting is 100. defshell command Synonym to the shell command. See there. defsilence on|off Same as the silence command except that the default setting for new windows is changed. Initial setting is `off'. defslowpaste msec" Same as the slowpaste command except that the default setting for new windows is changed. Initial setting is 0 milliseconds, meaning `off'. defutf8 on|off Same as the utf8 command except that the default setting for new windows is changed. Initial setting is `on' if screen was started with "-U", otherwise `off'. defwrap on|off Same as the wrap command except that the default setting for new windows is changed. Initially line-wrap is on and can be toggled with the "wrap" command ("C-a r") or by means of "C-a : wrap on|off". defwritelock on|off|auto Same as the writelock command except that the default setting for new windows is changed. Initially writelocks will off. defzombie [keys] Synonym to the zombie command. Both currently change the default. See there. detach [-h] Detach the screen session (disconnect it from the terminal and put it into the background). This returns you to the shell where you invoked screen. A detached screen can be resumed by invoking screen with the -r option (see also section "COMMAND-LINE OPTIONS"). The -h option tells screen to immediately close the connection to the terminal ("hangup"). dinfo Show what screen thinks about your terminal. Useful if you want to know why features like color or the alternate charset don't work. displays Shows a tabular listing of all currently connected user front-ends (displays). This is most useful for multiuser sessions. digraph [preset] This command prompts the user for a digraph sequence. The next two characters typed are looked up in a builtin table and the resulting character is inserted in the input stream. For example, if the user enters 'a"', an a-umlaut will be inserted. If the first character entered is a 0 (zero), screen will treat the following characters (up to three) as an octal number instead. The optional argument preset is treated as user input, thus one can create an "umlaut" key. For example the command "bindkey ^K digraph '"'" enables the user to generate an a-umlaut by typing CTRL-K a. dumptermcap Write the termcap entry for the virtual terminal optimized for the currently active window to the file ".termcap" in the user's "$HOME/.screen" directory (or wherever screen stores its sockets. See the "FILES" section below). This termcap entry is identical to the value of the environment variable $TERMCAP that is set up by screen for each window. For terminfo based systems you will need to run a converter like captoinfo and then compile the entry with tic. echo [-n] message The echo command may be used to annoy screen users with a 'message of the day'. Typically installed in a global /local/etc/screenrc. The option "-n" may be used to suppress the line feed. See also "sleep". Echo is also useful for online checking of environment variables. encoding enc [enc] Tell screen how to interpret the input/output. The first argument sets the encoding of the current window. Each window can emulate a different encoding. The optional second parameter overwrites the encoding of the connected terminal. It should never be needed as screen uses the locale setting to detect the encoding. There is also a way to select a terminal encoding depending on the terminal type by using the "KJ" termcap entry. Supported encodings are eucJP, SJIS, eucKR, eucCN, Big5, GBK, KOI8-R, CP1251, UTF-8, ISO8859-2, ISO8859-3, ISO8859-4, ISO8859-5, ISO8859-6, ISO8859-7, ISO8859-8, ISO8859-9, ISO8859-10, ISO8859-15, jis. See also "defencoding", which changes the default setting of a new window. escape xy Set the command character to x and the character generating a literal command character (by triggering the "meta" command) to y (similar to the -e option). Each argument is either a single character, a two- character sequence of the form "^x" (meaning "C-x"), a backslash followed by an octal number (specifying the ASCII code of the character), or a backslash followed by a second character, such as "\^" or "\\". The default is "^Aa". eval command1 [command2 ...] Parses and executes each argument as separate command. exec [[fdpat] newcommand [args ...]] Run a unix subprocess (specified by an executable path newcommand and its optional arguments) in the current window. The flow of data between newcommands stdin/stdout/stderr, the process originally started in the window (let us call it "application-process") and screen itself (window) is controlled by the filedescriptor pattern fdpat. This pattern is basically a three character sequence representing stdin, stdout and stderr of newcommand. A dot (.) connects the file descriptor to screen. An exclamation mark (!) causes the file descriptor to be connected to the application-process. A colon (:) combines both. User input will go to newcommand unless newcommand receives the application- process' output (fdpats first character is `!' or `:') or a pipe symbol (|) is added (as a fourth character) to the end of fdpat. Invoking `exec' without arguments shows name and arguments of the currently running subprocess in this window. Only one subprocess a time can be running in each window. When a subprocess is running the `kill' command will affect it instead of the windows process. Refer to the postscript file `doc/fdpat.ps' for a confusing illustration of all 21 possible combinations. Each drawing shows the digits 2,1,0 representing the three file descriptors of newcommand. The box marked `W' is the usual pty that has the application-process on its replica side. The box marked `P' is the secondary pty that now has screen at its primary side. Abbreviations: Whitespace between the word `exec' and fdpat and the command can be omitted. Trailing dots and a fdpat consisting only of dots can be omitted. A simple `|' is synonymous for the pattern `!..|'; the word exec can be omitted here and can always be replaced by `!'. Examples: exec ... /bin/sh exec /bin/sh !/bin/sh Creates another shell in the same window, while the original shell is still running. Output of both shells is displayed and user input is sent to the new /bin/sh. exec !.. stty 19200 exec ! stty 19200 !!stty 19200 Set the speed of the window's tty. If your stty command operates on stdout, then add another `!'. exec !..| less |less This adds a pager to the window output. The special character `|' is needed to give the user control over the pager although it gets its input from the window's process. This works, because less listens on stderr (a behavior that screen would not expect without the `|') when its stdin is not a tty. Less versions newer than 177 fail miserably here; good old pg still works. !:sed -n s/.*Error.*/\007/p Sends window output to both, the user and the sed command. The sed inserts an additional bell character (oct. 007) to the window output seen by screen. This will cause "Bell in window x" messages, whenever the string "Error" appears in the window. fit Change the window size to the size of the current region. This command is needed because screen doesn't adapt the window size automatically if the window is displayed more than once. flow [on|off|auto] Sets the flow-control mode for this window. Without parameters it cycles the current window's flow-control setting from "automatic" to "on" to "off". See the discussion on "FLOW-CONTROL" later on in this document for full details and note, that this is subject to change in future releases. Default is set by `defflow'. focus [up|down|top|bottom] Move the input focus to the next region. This is done in a cyclic way so that the top region is selected after the bottom one. If no subcommand is given it defaults to `down'. `up' cycles in the opposite order, `top' and `bottom' go to the top and bottom region respectively. Useful bindings are (j and k as in vi) bind j focus down bind k focus up bind t focus top bind b focus bottom gr [on|off] Turn GR charset switching on/off. Whenever screen sees an input character with the 8th bit set, it will use the charset stored in the GR slot and print the character with the 8th bit stripped. The default (see also "defgr") is not to process GR switching because otherwise the ISO88591 charset would not work. hardcopy [-h] [file] Writes out the currently displayed image to the file file, or, if no filename is specified, to hardcopy.n in the default directory, where n is the number of the current window. This either appends or overwrites the file if it exists. See below. If the option -h is specified, dump also the contents of the scrollback buffer. hardcopy_append on|off If set to "on", screen will append to the "hardcopy.n" files created by the command "C-a h", otherwise these files are overwritten each time. Default is `off'. hardcopydir directory Defines a directory where hardcopy files will be placed. If unset, hardcopys are dumped in screen's current working directory. hardstatus [on|off] hardstatus [always]lastline|message|ignore [string] hardstatus string [string] This command configures the use and emulation of the terminal's hardstatus line. The first form toggles whether screen will use the hardware status line to display messages. If the flag is set to `off', these messages are overlaid in reverse video mode at the display line. The default setting is `on'. The second form tells screen what to do if the terminal doesn't have a hardstatus line (i.e. the termcap/terminfo capabilities "hs", "ts", "fs" and "ds" are not set). If the type "lastline" is used, screen will reserve the last line of the display for the hardstatus. "message" uses screen's message mechanism and "ignore" tells screen never to display the hardstatus. If you prepend the word "always" to the type (e.g., "alwayslastline"), screen will use the type even if the terminal supports a hardstatus. The third form specifies the contents of the hardstatus line. '%h' is used as default string, i.e. the stored hardstatus of the current window (settable via "ESC]0;<string>^G" or "ESC_<string>ESC\") is displayed. You can customize this to any string you like including the escapes from the "STRING ESCAPES" chapter. If you leave out the argument string, the current string is displayed. You can mix the second and third form by providing the string as additional argument. height [-w|-d] [lines [cols]] Set the display height to a specified number of lines. When no argument is given it toggles between 24 and 42 lines display. You can also specify a width if you want to change both values. The -w option tells screen to leave the display size unchanged and just set the window size, -d vice versa. help [-c class] Not really a online help, but displays a help screen showing you all the key bindings. The first pages list all the internal commands followed by their current bindings. Subsequent pages will display the custom commands, one command per key. Press space when you're done reading each page, or return to exit early. All other characters are ignored. If the "-c" option is given, display all bound commands for the specified command class. See also "DEFAULT KEY BINDINGS" section. history Usually users work with a shell that allows easy access to previous commands. For example csh has the command "!!" to repeat the last command executed. Screen allows you to have a primitive way of re- calling "the command that started ...": You just type the first letter of that command, then hit `C-a {' and screen tries to find a previous line that matches with the `prompt character' to the left of the cursor. This line is pasted into this window's input queue. Thus you have a crude command history (made up by the visible window and its scrollback buffer). hstatus status Change the window's hardstatus line to the string status. idle [timeout [cmd args]] Sets a command that is run after the specified number of seconds inactivity is reached. This command will normally be the "blanker" command to create a screen blanker, but it can be any screen command. If no command is specified, only the timeout is set. A timeout of zero (ot the special timeout off) disables the timer. If no arguments are given, the current settings are displayed. ignorecase [on|off] Tell screen to ignore the case of characters in searches. Default is `off'. info Uses the message line to display some information about the current window: the cursor position in the form "(column,row)" starting with "(1,1)", the terminal width and height plus the size of the scrollback buffer in lines, like in "(80,24)+50", the current state of window XON/XOFF flow control is shown like this (See also section FLOW CONTROL): +flow automatic flow control, currently on. -flow automatic flow control, currently off. +(+)flow flow control enabled. Agrees with automatic control. -(+)flow flow control disabled. Disagrees with automatic control. +(-)flow flow control enabled. Disagrees with automatic control. -(-)flow flow control disabled. Agrees with automatic control. The current line wrap setting (`+wrap' indicates enabled, `-wrap' not) is also shown. The flags `ins', `org', `app', `log', `mon' or `nored' are displayed when the window is in insert mode, origin mode, application-keypad mode, has output logging, activity monitoring or partial redraw enabled. The currently active character set (G0, G1, G2, or G3) and in square brackets the terminal character sets that are currently designated as G0 through G3 is shown. If the window is in UTF-8 mode, the string "UTF-8" is shown instead. Additional modes depending on the type of the window are displayed at the end of the status line (See also chapter "WINDOW TYPES"). If the state machine of the terminal emulator is in a non-default state, the info line is started with a string identifying the current state. For system information use the "time" command. ins_reg [key] No longer exists, use "paste" instead. kill Kill current window. If there is an `exec' command running then it is killed. Otherwise the process (shell) running in the window receives a HANGUP condition, the window structure is removed and screen (your display) switches to another window. When the last window is destroyed, screen exits. After a kill screen switches to the previously displayed window. Note: Emacs users should keep this command in mind, when killing a line. It is recommended not to use "C-a" as the screen escape key or to rebind kill to "C-a K". lastmsg Redisplay the last contents of the message/status line. Useful if you're typing when a message appears, because the message goes away when you press a key (unless your terminal has a hardware status line). Refer to the commands "msgwait" and "msgminwait" for fine tuning. license Display the disclaimer page. This is done whenever screen is started without options, which should be often enough. See also the "startup_message" command. lockscreen Lock this display. Call a screenlock program (/local/bin/lck or /usr/bin/lock or a builtin if no other is available). Screen does not accept any command keys until this program terminates. Meanwhile processes in the windows may continue, as the windows are in the `detached' state. The screenlock program may be changed through the environment variable $LOCKPRG (which must be set in the shell from which screen is started) and is executed with the user's uid and gid. Warning: When you leave other shells unlocked and you have no password set on screen, the lock is void: One could easily re-attach from an unlocked shell. This feature should rather be called `lockterminal'. log [on|off] Start/stop writing output of the current window to a file "screenlog.n" in the window's default directory, where n is the number of the current window. This filename can be changed with the `logfile' command. If no parameter is given, the state of logging is toggled. The session log is appended to the previous contents of the file if it already exists. The current contents and the contents of the scrollback history are not included in the session log. Default is `off'. logfile filename logfile flush secs Defines the name the logfiles will get. The default is "screenlog.%n". The second form changes the number of seconds screen will wait before flushing the logfile buffer to the file-system. The default value is 10 seconds. login [on|off] Adds or removes the entry in the utmp database file for the current window. This controls if the window is `logged in'. When no parameter is given, the login state of the window is toggled. Additionally to that toggle, it is convenient having a `log in' and a `log out' key. E.g. `bind I login on' and `bind O login off' will map these keys to be C-a I and C-a O. The default setting (in config.h.in) should be "on" for a screen that runs under suid-root. Use the "deflogin" command to change the default login state for new windows. Both commands are only present when screen has been compiled with utmp support. logtstamp [on|off] logtstamp after [secs] logtstamp string [string] This command controls logfile time-stamp mechanism of screen. If time- stamps are turned "on", screen adds a string containing the current time to the logfile after two minutes of inactivity. When output continues and more than another two minutes have passed, a second time- stamp is added to document the restart of the output. You can change this timeout with the second form of the command. The third form is used for customizing the time-stamp string (`-- %n:%t -- time-stamp -- %M/%d/%y %c:%s --\n' by default). mapdefault Tell screen that the next input character should only be looked up in the default bindkey table. See also "bindkey". mapnotnext Like mapdefault, but don't even look in the default bindkey table. maptimeout [timo] Set the inter-character timer for input sequence detection to a timeout of timo ms. The default timeout is 300ms. Maptimeout with no arguments shows the current setting. See also "bindkey". markkeys string This is a method of changing the keymap used for copy/history mode. The string is made up of oldchar=newchar pairs which are separated by `:'. Example: The string "B=^B:F=^F" will change the keys `C-b' and `C- f' to the vi style binding (scroll up/down fill page). This happens to be the default binding for `B' and `F'. The command "markkeys h=^B:l=^F:$=^E" would set the mode for an emacs-style binding. If your terminal sends characters, that cause you to abort copy mode, then this command may help by binding these characters to do nothing. The no-op character is `@' and is used like this: "markkeys @=L=H" if you do not want to use the `H' or `L' commands any longer. As shown in this example, multiple keys can be assigned to one function in a single statement. maxwin num Set the maximum window number screen will create. Doesn't affect already existing windows. The number may only be decreased. meta Insert the command character (C-a) in the current window's input stream. monitor [on|off] Toggles activity monitoring of windows. When monitoring is turned on and an affected window is switched into the background, you will receive the activity notification message in the status line at the first sign of output and the window will also be marked with an `@' in the window-status display. Monitoring is initially off for all windows. msgminwait sec Defines the time screen delays a new message when one message is currently displayed. The default is 1 second. msgwait sec Defines the time a message is displayed if screen is not disturbed by other activity. The default is 5 seconds. multiuser on|off Switch between singleuser and multiuser mode. Standard screen operation is singleuser. In multiuser mode the commands `acladd', `aclchg', `aclgrp' and `acldel' can be used to enable (and disable) other users accessing this screen session. nethack on|off Changes the kind of error messages used by screen. When you are familiar with the game "nethack", you may enjoy the nethack-style messages which will often blur the facts a little, but are much funnier to read. Anyway, standard messages often tend to be unclear as well. This option is only available if screen was compiled with the NETHACK flag defined. The default setting is then determined by the presence of the environment variable $NETHACKOPTIONS. next Switch to the next window. This command can be used repeatedly to cycle through the list of windows. nonblock [on|off|numsecs] Tell screen how to deal with user interfaces (displays) that cease to accept output. This can happen if a user presses ^S or a TCP/modem connection gets cut but no hangup is received. If nonblock is off (this is the default) screen waits until the display restarts to accept the output. If nonblock is on, screen waits until the timeout is reached (on is treated as 1s). If the display still doesn't receive characters, screen will consider it "blocked" and stop sending characters to it. If at some time it restarts to accept characters, screen will unblock the display and redisplay the updated window contents. number [n] Change the current windows number. If the given number n is already used by another window, both windows exchange their numbers. If no argument is specified, the current window number (and title) is shown. obuflimit [limit] If the output buffer contains more bytes than the specified limit, no more data will be read from the windows. The default value is 256. If you have a fast display (like xterm), you can set it to some higher value. If no argument is specified, the current setting is displayed. only Kill all regions but the current one. other Switch to the window displayed previously. If this window does no longer exist, other has the same effect as next. partial on|off Defines whether the display should be refreshed (as with redisplay) after switching to the current window. This command only affects the current window. To immediately affect all windows use the allpartial command. Default is `off', of course. This default is fixed, as there is currently no defpartial command. password [crypted_pw] Present a crypted password in your ".screenrc" file and screen will ask for it, whenever someone attempts to resume a detached. This is useful if you have privileged programs running under screen and you want to protect your session from reattach attempts by another user masquerading as your uid (i.e. any superuser.) If no crypted password is specified, screen prompts twice for typing a password and places its encryption in the paste buffer. Default is `none', this disables password checking. paste [registers [dest_reg]] Write the (concatenated) contents of the specified registers to the stdin queue of the current window. The register '.' is treated as the paste buffer. If no parameter is given the user is prompted for a single register to paste. The paste buffer can be filled with the copy, history and readbuf commands. Other registers can be filled with the register, readreg and paste commands. If paste is called with a second argument, the contents of the specified registers is pasted into the named destination register rather than the window. If '.' is used as the second argument, the displays paste buffer is the destination. Note, that "paste" uses a wide variety of resources: Whenever a second argument is specified no current window is needed. When the source specification only contains registers (not the paste buffer) then there need not be a current display (terminal attached), as the registers are a global resource. The paste buffer exists once for every user. pastefont [on|off] Tell screen to include font information in the paste buffer. The default is not to do so. This command is especially useful for multi character fonts like kanji. pow_break Reopen the window's terminal line and send a break condition. See `break'. pow_detach Power detach. Mainly the same as detach, but also sends a HANGUP signal to the parent process of screen. CAUTION: This will result in a logout, when screen was started from your login shell. pow_detach_msg [message] The message specified here is output whenever a `Power detach' was performed. It may be used as a replacement for a logout message or to reset baud rate, etc. Without parameter, the current message is shown. prev Switch to the window with the next lower number. This command can be used repeatedly to cycle through the list of windows. printcmd [cmd] If cmd is not an empty string, screen will not use the terminal capabilities "po/pf" if it detects an ansi print sequence ESC [ 5 i, but pipe the output into cmd. This should normally be a command like "lpr" or "'cat > /tmp/scrprint'". printcmd without a command displays the current setting. The ansi sequence ESC \ ends printing and closes the pipe. Warning: Be careful with this command! If other user have write access to your terminal, they will be able to fire off print commands. process [key] Stuff the contents of the specified register into screen's input queue. If no argument is given you are prompted for a register name. The text is parsed as if it had been typed in from the user's keyboard. This command can be used to bind multiple actions to a single key. quit Kill all windows and terminate screen. Note that on VT100-style terminals the keys C-4 and C-\ are identical. This makes the default bindings dangerous: Be careful not to type C-a C-4 when selecting window no. 4. Use the empty bind command (as in "bind '^\'") to remove a key binding. readbuf [-e encoding] [filename] Reads the contents of the specified file into the paste buffer. You can tell screen the encoding of the file via the -e option. If no file is specified, the screen-exchange filename is used. See also "bufferfile" command. readreg [-e encoding] [register [filename]] Does one of two things, dependent on number of arguments: with zero or one arguments it it duplicates the paste buffer contents into the register specified or entered at the prompt. With two arguments it reads the contents of the named file into the register, just as readbuf reads the screen-exchange file into the paste buffer. You can tell screen the encoding of the file via the -e option. The following example will paste the system's password file into the screen window (using register p, where a copy remains): C-a : readreg p /etc/passwd C-a : paste p redisplay Redisplay the current window. Needed to get a full redisplay when in partial redraw mode. register [-e encoding] key string Save the specified string to the register key. The encoding of the string can be specified via the -e option. See also the "paste" command. remove Kill the current region. This is a no-op if there is only one region. removebuf Unlinks the screen-exchange file used by the commands "writebuf" and "readbuf". reset Reset the virtual terminal to its "power-on" values. Useful when strange settings (like scroll regions or graphics character set) are left over from an application. resize Resize the current region. The space will be removed from or added to the region below or if there's not enough space from the region above. resize +N increase current region height by N resize -N decrease current region height by N resize N set current region height to N resize = make all windows equally high resize max maximize current region height resize min minimize current region height screen [-opts] [n] [cmd [args]] Establish a new window. The flow-control options (-f, -fn and -fa), title (a.k.a.) option (-t), login options (-l and -ln) , terminal type option (-T <term>), the all-capability-flag (-a) and scrollback option (-h <num>) may be specified with each command. The option (-M) turns monitoring on for this window. The option (-L) turns output logging on for this window. If an optional number n in the range 0..9 is given, the window number n is assigned to the newly created window (or, if this number is already in-use, the next available number). If a command is specified after "screen", this command (with the given arguments) is started in the window; otherwise, a shell is created. Thus, if your ".screenrc" contains the lines # example for .screenrc: screen 1 screen -fn -t foobar -L 2 telnet foobar screen creates a shell window (in window #1) and a window with a TELNET connection to the machine foobar (with no flow-control using the title "foobar" in window #2) and will write a logfile ("screenlog.2") of the telnet session. Note, that unlike previous versions of screen no additional default window is created when "screen" commands are included in your ".screenrc" file. When the initialization is completed, screen switches to the last window specified in your .screenrc file or, if none, opens a default window #0. Screen has built in some functionality of "cu" and "telnet". See also chapter "WINDOW TYPES". scrollback num Set the size of the scrollback buffer for the current windows to num lines. The default scrollback is 100 lines. See also the "defscrollback" command and use "C-a i" to view the current setting. select [WindowID] Switch to the window identified by WindowID. This can be a prefix of a window title (alphanumeric window name) or a window number. The parameter is optional and if omitted, you get prompted for an identifier. When a new window is established, the first available number is assigned to this window. Thus, the first window can be activated by "select 0". The number of windows is limited at compile- time by the MAXWIN configuration parameter. There are two special WindowIDs, "-" selects the internal blank window and "." selects the current window. The latter is useful if used with screen's "-X" option. sessionname [name] Rename the current session. Note, that for "screen -list" the name shows up with the process-id prepended. If the argument "name" is omitted, the name of this session is displayed. Caution: The $STY environment variables still reflects the old name. This may result in confusion. The default is constructed from the tty and host names. setenv [var [string]] Set the environment variable var to value string. If only var is specified, the user will be prompted to enter a value. If no parameters are specified, the user will be prompted for both variable and value. The environment is inherited by all subsequently forked shells. setsid [on|off] Normally screen uses different sessions and process groups for the windows. If setsid is turned off, this is not done anymore and all windows will be in the same process group as the screen backend process. This also breaks job-control, so be careful. The default is on, of course. This command is probably useful only in rare circumstances. shell command Set the command to be used to create a new shell. This overrides the value of the environment variable $SHELL. This is useful if you'd like to run a tty-enhancer which is expecting to execute the program specified in $SHELL. If the command begins with a '-' character, the shell will be started as a login-shell. shelltitle title Set the title for all shells created during startup or by the C-A C-c command. For details about what a title is, see the discussion entitled "TITLES (naming windows)". silence [on|off|sec] Toggles silence monitoring of windows. When silence is turned on and an affected window is switched into the background, you will receive the silence notification message in the status line after a specified period of inactivity (silence). The default timeout can be changed with the `silencewait' command or by specifying a number of seconds instead of `on' or `off'. Silence is initially off for all windows. silencewait sec Define the time that all windows monitored for silence should wait before displaying a message. Default 30 seconds. sleep num This command will pause the execution of a .screenrc file for num seconds. Keyboard activity will end the sleep. It may be used to give users a chance to read the messages output by "echo". slowpaste msec Define the speed at which text is inserted into the current window by the paste ("C-a ]") command. If the slowpaste value is nonzero text is written character by character. screen will make a pause of msec milliseconds after each single character write to allow the application to process its input. Only use slowpaste if your underlying system exposes flow control problems while pasting large amounts of text. source file Read and execute commands from file file. Source commands may be nested to a maximum recursion level of ten. If file is not an absolute path and screen is already processing a source command, the parent directory of the running source command file is used to search for the new command file before screen's current directory. Note that termcap/terminfo/termcapinfo commands only work at startup and reattach time, so they must be reached via the default screenrc files to have an effect. sorendition [attr [color]] Change the way screen does highlighting for text marking and printing messages. See the "STRING ESCAPES" chapter for the syntax of the modifiers. The default is currently "=s dd" (standout, default colors). split Split the current region into two new ones. All regions on the display are resized to make room for the new region. The blank window is displayed on the new region. Use the "remove" or the "only" command to delete regions. startup_message on|off Select whether you want to see the copyright notice during startup. Default is `on', as you probably noticed. stuff string Stuff the string string in the input buffer of the current window. This is like the "paste" command but with much less overhead. You cannot paste large buffers with the "stuff" command. It is most useful for key bindings. See also "bindkey". su [username [password [password2]] Substitute the user of a display. The command prompts for all parameters that are omitted. If passwords are specified as parameters, they have to be specified un-crypted. The first password is matched against the systems passwd database, the second password is matched against the screen password as set with the commands "acladd" or "password". "Su" may be useful for the screen administrator to test multiuser setups. When the identification fails, the user has access to the commands available for user nobody. These are "detach", "license", "version", "help" and "displays". suspend Suspend screen. The windows are in the `detached' state, while screen is suspended. This feature relies on the shell being able to do job control. term term In each window's environment screen opens, the $TERM variable is set to "screen" by default. But when no description for "screen" is installed in the local termcap or terminfo data base, you set $TERM to - say - "vt100". This won't do much harm, as screen is VT100/ANSI compatible. The use of the "term" command is discouraged for non-default purpose. That is, one may want to specify special $TERM settings (e.g. vt100) for the next "screen rlogin othermachine" command. Use the command "screen -T vt100 rlogin othermachine" rather than setting and resetting the default. termcap term terminal-tweaks [window-tweaks] terminfo term terminal-tweaks [window-tweaks] termcapinfo term terminal-tweaks [window-tweaks] Use this command to modify your terminal's termcap entry without going through all the hassles involved in creating a custom termcap entry. Plus, you can optionally customize the termcap generated for the windows. You have to place these commands in one of the screenrc startup files, as they are meaningless once the terminal emulator is booted. If your system works uses the terminfo database rather than termcap, screen will understand the `terminfo' command, which has the same effects as the `termcap' command. Two separate commands are provided, as there are subtle syntactic differences, e.g. when parameter interpolation (using `%') is required. Note that termcap names of the capabilities have to be used with the `terminfo' command. In many cases, where the arguments are valid in both terminfo and termcap syntax, you can use the command `termcapinfo', which is just a shorthand for a pair of `termcap' and `terminfo' commands with identical arguments. The first argument specifies which terminal(s) should be affected by this definition. You can specify multiple terminal names by separating them with `|'s. Use `*' to match all terminals and `vt*' to match all terminals that begin with "vt". Each tweak argument contains one or more termcap defines (separated by `:'s) to be inserted at the start of the appropriate termcap entry, enhancing it or overriding existing values. The first tweak modifies your terminal's termcap, and contains definitions that your terminal uses to perform certain functions. Specify a null string to leave this unchanged (e.g. ''). The second (optional) tweak modifies all the window termcaps, and should contain definitions that screen understands (see the "VIRTUAL TERMINAL" section). Some examples: termcap xterm* LP:hs@ Informs screen that all terminals that begin with `xterm' have firm auto-margins that allow the last position on the screen to be updated (LP), but they don't really have a status line (no 'hs' - append `@' to turn entries off). Note that we assume `LP' for all terminal names that start with "vt", but only if you don't specify a termcap command for that terminal. termcap vt* LP termcap vt102|vt220 Z0=\E[?3h:Z1=\E[?3l Specifies the firm-margined `LP' capability for all terminals that begin with `vt', and the second line will also add the escape-sequences to switch into (Z0) and back out of (Z1) 132-character-per-line mode if this is a VT102 or VT220. (You must specify Z0 and Z1 in your termcap to use the width-changing commands.) termcap vt100 "" l0=PF1:l1=PF2:l2=PF3:l3=PF4 This leaves your vt100 termcap alone and adds the function key labels to each window's termcap entry. termcap h19|z19 am@:im=\E@:ei=\EO dc=\E[P Takes a h19 or z19 termcap and turns off auto-margins (am@) and enables the insert mode (im) and end-insert (ei) capabilities (the `@' in the `im' string is after the `=', so it is part of the string). Having the `im' and `ei' definitions put into your terminal's termcap will cause screen to automatically advertise the character-insert capability in each window's termcap. Each window will also get the delete-character capability (dc) added to its termcap, which screen will translate into a line-update for the terminal (we're pretending it doesn't support character deletion). If you would like to fully specify each window's termcap entry, you should instead set the $SCREENCAP variable prior to running screen. See the discussion on the "VIRTUAL TERMINAL" in this manual, and the termcap(5) man page for more information on termcap definitions. time [string] Uses the message line to display the time of day, the host name, and the load averages over 1, 5, and 15 minutes (if this is available on your system). For window specific information use "info". If a string is specified, it changes the format of the time report like it is described in the "STRING ESCAPES" chapter. Screen uses a default of "%c:%s %M %d %H%? %l%?". title [windowtitle] Set the name of the current window to windowtitle. If no name is specified, screen prompts for one. This command was known as `aka' in previous releases. unsetenv var Unset an environment variable. utf8 [on|off [on|off]] Change the encoding used in the current window. If utf8 is enabled, the strings sent to the window will be UTF-8 encoded and vice versa. Omitting the parameter toggles the setting. If a second parameter is given, the display's encoding is also changed (this should rather be done with screen's "-U" option). See also "defutf8", which changes the default setting of a new window. vbell [on|off] Sets the visual bell setting for this window. Omitting the parameter toggles the setting. If vbell is switched on, but your terminal does not support a visual bell, a `vbell-message' is displayed in the status line when the bell character (^G) is received. Visual bell support of a terminal is defined by the termcap variable `vb' (terminfo: 'flash'). Per default, vbell is off, thus the audible bell is used. See also `bell_msg'. vbell_msg [message] Sets the visual bell message. message is printed to the status line if the window receives a bell character (^G), vbell is set to "on", but the terminal does not support a visual bell. The default message is "Wuff, Wuff!!". Without parameter, the current message is shown. vbellwait sec Define a delay in seconds after each display of screen's visual bell message. The default is 1 second. verbose [on|off] If verbose is switched on, the command name is echoed, whenever a window is created (or resurrected from zombie state). Default is off. Without parameter, the current setting is shown. version Print the current version and the compile date in the status line. wall message Write a message to all displays. The message will appear in the terminal's status line. width [-w|-d] [cols [lines]] Toggle the window width between 80 and 132 columns or set it to cols columns if an argument is specified. This requires a capable terminal and the termcap entries "Z0" and "Z1". See the "termcap" command for more information. You can also specify a new height if you want to change both values. The -w option tells screen to leave the display size unchanged and just set the window size, -d vice versa. windowlist [-b] [-m] windowlist string [string] windowlist title [title] Display all windows in a table for visual window selection. The desired window can be selected via the standard movement keys (see the "copy" command) and activated via the return key. If the -b option is given, screen will switch to the blank window before presenting the list, so that the current window is also selectable. The -m option changes the order of the windows, instead of sorting by window numbers screen uses its internal most-recently-used list. The table format can be changed with the string and title option, the title is displayed as table heading, while the lines are made by using the string setting. The default setting is "Num Name%=Flags" for the title and "%3n %t%=%f" for the lines. See the "STRING ESCAPES" chapter for more codes (e.g. color settings). windows Uses the message line to display a list of all the windows. Each window is listed by number with the name of process that has been started in the window (or its title); the current window is marked with a `*'; the previous window is marked with a `-'; all the windows that are "logged in" are marked with a `$'; a background window that has received a bell is marked with a `!'; a background window that is being monitored and has had activity occur is marked with an `@'; a window which has output logging turned on is marked with `(L)'; windows occupied by other users are marked with `&'; windows in the zombie state are marked with `Z'. If this list is too long to fit on the terminal's status line only the portion around the current window is displayed. wrap [on|off] Sets the line-wrap setting for the current window. When line-wrap is on, the second consecutive printable character output at the last column of a line will wrap to the start of the following line. As an added feature, backspace (^H) will also wrap through the left margin to the previous line. Default is `on'. writebuf [-e encoding] [filename] Writes the contents of the paste buffer to the specified file, or the public accessible screen-exchange file if no filename is given. This is thought of as a primitive means of communication between screen users on the same host. If an encoding is specified the paste buffer is recoded on the fly to match the encoding. The filename can be set with the bufferfile command and defaults to "/tmp/screen-exchange". writelock [on|off|auto] In addition to access control lists, not all users may be able to write to the same window at once. Per default, writelock is in `auto' mode and grants exclusive input permission to the user who is the first to switch to the particular window. When he leaves the window, other users may obtain the writelock (automatically). The writelock of the current window is disabled by the command "writelock off". If the user issues the command "writelock on" he keeps the exclusive write permission while switching to other windows. xoff xon Insert a CTRL-s / CTRL-q character to the stdin queue of the current window. zmodem [off|auto|catch|pass] zmodem sendcmd [string] zmodem recvcmd [string] Define zmodem support for screen. Screen understands two different modes when it detects a zmodem request: "pass" and "catch". If the mode is set to "pass", screen will relay all data to the attacher until the end of the transmission is reached. In "catch" mode screen acts as a zmodem endpoint and starts the corresponding rz/sz commands. If the mode is set to "auto", screen will use "catch" if the window is a tty (e.g. a serial line), otherwise it will use "pass". You can define the templates screen uses in "catch" mode via the second and the third form. Note also that this is an experimental feature. zombie [keys] defzombie [keys] Per default screen windows are removed from the window list as soon as the windows process (e.g. shell) exits. When a string of two keys is specified to the zombie command, `dead' windows will remain in the list. The kill command may be used to remove such a window. Pressing the first key in the dead window has the same effect. When pressing the second key, screen will attempt to resurrect the window. The process that was initially running in the window will be launched again. Calling zombie without parameters will clear the zombie setting, thus making windows disappear when their process exits. As the zombie-setting is manipulated globally for all windows, this command should only be called defzombie. Until we need this as a per window setting, the commands zombie and defzombie are synonymous. THE MESSAGE LINE Screen displays informational messages and other diagnostics in a message line. While this line is distributed to appear at the bottom of the screen, it can be defined to appear at the top of the screen during compilation. If your terminal has a status line defined in its termcap, screen will use this for displaying its messages, otherwise a line of the current screen will be temporarily overwritten and output will be momentarily interrupted. The message line is automatically removed after a few seconds delay, but it can also be removed early (on terminals without a status line) by beginning to type. The message line facility can be used by an application running in the current window by means of the ANSI Privacy message control sequence. For instance, from within the shell, try something like: echo '<esc>^Hello world from window '$WINDOW'<esc>\\' where '<esc>' is an escape, '^' is a literal up-arrow, and '\\' turns into a single backslash. WINDOW TYPES Screen provides three different window types. New windows are created with screen's screen command (see also the entry in chapter "CUSTOMIZATION"). The first parameter to the screen command defines which type of window is created. The different window types are all special cases of the normal type. They have been added in order to allow screen to be used efficiently as a console multiplexer with 100 or more windows. • The normal window contains a shell (default, if no parameter is given) or any other system command that could be executed from a shell (e.g. slogin, etc...) • If a tty (character special device) name (e.g. "/dev/ttya") is specified as the first parameter, then the window is directly connected to this device. This window type is similar to "screen cu -l /dev/ttya". Read and write access is required on the device node, an exclusive open is attempted on the node to mark the connection line as busy. An optional parameter is allowed consisting of a comma separated list of flags in the notation used by stty(1): <baud_rate> Usually 300, 1200, 9600 or 19200. This affects transmission as well as receive speed. cs8 or cs7 Specify the transmission of eight (or seven) bits per byte. ixon or -ixon Enables (or disables) software flow-control (CTRL-S/CTRL-Q) for sending data. ixoff or -ixon Enables (or disables) software flow-control for receiving data. istrip or -istrip Clear (or keep) the eight bit in each received byte. You may want to specify as many of these options as applicable. Unspecified options cause the terminal driver to make up the parameter values of the connection. These values are system dependant and may be in defaults or values saved from a previous connection. For tty windows, the info command shows some of the modem control lines in the status line. These may include `RTS', `CTS', 'DTR', `DSR', `CD' and more. This depends on the available ioctl()'s and system header files as well as the on the physical capabilities of the serial board. Signals that are logical low (inactive) have their name preceded by an exclamation mark (!), otherwise the signal is logical high (active). Signals not supported by the hardware but available to the ioctl() interface are usually shown low. When the CLOCAL status bit is true, the whole set of modem signals is placed inside curly braces ({ and }). When the CRTSCTS or TIOCSOFTCAR bit is set, the signals `CTS' or `CD' are shown in parenthesis, respectively. For tty windows, the command break causes the Data transmission line (TxD) to go low for a specified period of time. This is expected to be interpreted as break signal on the other side. No data is sent and no modem control line is changed when a break is issued. • If the first parameter is "//telnet", the second parameter is expected to be a host name, and an optional third parameter may specify a TCP port number (default decimal 23). Screen will connect to a server listening on the remote host and use the telnet protocol to communicate with that server. For telnet windows, the command info shows details about the connection in square brackets ([ and ]) at the end of the status line. b BINARY. The connection is in binary mode. e ECHO. Local echo is disabled. c SGA. The connection is in `character mode' (default: `line mode'). t TTYPE. The terminal type has been requested by the remote host. Screen sends the name "screen" unless instructed otherwise (see also the command `term'). w NAWS. The remote site is notified about window size changes. f LFLOW. The remote host will send flow control information. (Ignored at the moment.) Additional flags for debugging are x, t and n (XDISPLOC, TSPEED and NEWENV). For telnet windows, the command break sends the telnet code IAC BREAK (decimal 243) to the remote host. This window type is only available if screen was compiled with the BUILTIN_TELNET option defined. STRING ESCAPES Screen provides an escape mechanism to insert information like the current time into messages or file names. The escape character is '%' with one exception: inside of a window's hardstatus '^%' ('^E') is used instead. Here is the full list of supported escapes: % the escape character itself a either 'am' or 'pm' A either 'AM' or 'PM' c current time HH:MM in 24h format C current time HH:MM in 12h format d day number D weekday name f flags of the window F sets %? to true if the window has the focus h hardstatus of the window H hostname of the system l current load of the system m month number M month name n window number s seconds t window title u all other users on this window w all window numbers and names. With '-' quailifier: up to the current window; with '+' qualifier: starting with the window after the current one. W all window numbers and names except the current one y last two digits of the year number Y full year number ? the part to the next '%?' is displayed only if a '%' escape inside the part expands to a non-empty string : else part of '%?' = pad the string to the display's width (like TeX's hfill). If a number is specified, pad to the percentage of the window's width. A '0' qualifier tells screen to treat the number as absolute position. You can specify to pad relative to the last absolute pad position by adding a '+' qualifier or to pad relative to the right margin by using '-'. The padding truncates the string if the specified position lies before the current position. Add the 'L' qualifier to change this. < same as '%=' but just do truncation, do not fill with spaces > mark the current text position for the next truncation. When screen needs to do truncation, it tries to do it in a way that the marked position gets moved to the specified percentage of the output area. (The area starts from the last absolute pad position and ends with the position specified by the truncation operator.) The 'L' qualifier tells screen to mark the truncated parts with '...'. { attribute/color modifier string terminated by the next "}" ` Substitute with the output of a 'backtick' command. The length qualifier is misused to identify one of the commands. The 'c' and 'C' escape may be qualified with a '0' to make screen use zero instead of space as fill character. The '0' qualifier also makes the '=' escape use absolute positions. The 'n' and '=' escapes understand a length qualifier (e.g. '%3n'), 'D' and 'M' can be prefixed with 'L' to generate long names, 'w' and 'W' also show the window flags if 'L' is given. An attribute/color modifier is is used to change the attributes or the color settings. Its format is "[attribute modifier] [color description]". The attribute modifier must be prefixed by a change type indicator if it can be confused with a color desciption. The following change types are known: + add the specified set to the current attributes - remove the set from the current attributes ! invert the set in the current attributes = change the current attributes to the specified set The attribute set can either be specified as a hexadecimal number or a combination of the following letters: d dim u underline b bold r reverse s standout B blinking Colors are coded either as a hexadecimal number or two letters specifying the desired background and foreground color (in that order). The following colors are known: k black r red g green y yellow b blue m magenta c cyan w white d default color . leave color unchanged The capitalized versions of the letter specify bright colors. You can also use the pseudo-color 'i' to set just the brightness and leave the color unchanged. A one digit/letter color description is treated as foreground or background color dependant on the current attributes: if reverse mode is set, the background color is changed instead of the foreground color. If you don't like this, prefix the color with a ".". If you want the same behaviour for two-letter color descriptions, also prefix them with a ".". As a special case, "%{-}" restores the attributes and colors that were set before the last change was made (i.e. pops one level of the color- change stack). Examples: set color to bright green use bold red clear all attributes, write in default color on yellow background. %-Lw%{= BW}%50>%n%f* %t%{-}%+Lw%< The available windows centered at the current window and truncated to the available width. The current window is displayed white on blue. This can be used with "hardstatus alwayslastline". %?%F%{.R.}%?%3n %t%? [%h]%? The window number and title and the window's hardstatus, if one is set. Also use a red background if this is the active focus. Useful for "caption string". FLOW-CONTROL Each window has a flow-control setting that determines how screen deals with the XON and XOFF characters (and perhaps the interrupt character). When flow-control is turned off, screen ignores the XON and XOFF characters, which allows the user to send them to the current program by simply typing them (useful for the emacs editor, for instance). The trade-off is that it will take longer for output from a "normal" program to pause in response to an XOFF. With flow-control turned on, XON and XOFF characters are used to immediately pause the output of the current window. You can still send these characters to the current program, but you must use the appropriate two-character screen commands (typically "C-a q" (xon) and "C-a s" (xoff)). The xon/xoff commands are also useful for typing C-s and C-q past a terminal that intercepts these characters. Each window has an initial flow-control value set with either the -f option or the "defflow" .screenrc command. Per default the windows are set to automatic flow-switching. It can then be toggled between the three states 'fixed on', 'fixed off' and 'automatic' interactively with the "flow" command bound to "C-a f". The automatic flow-switching mode deals with flow control using the TIOCPKT mode (like "rlogin" does). If the tty driver does not support TIOCPKT, screen tries to find out the right mode based on the current setting of the application keypad - when it is enabled, flow-control is turned off and visa versa. Of course, you can still manipulate flow- control manually when needed. If you're running with flow-control enabled and find that pressing the interrupt key (usually C-c) does not interrupt the display until another 6-8 lines have scrolled by, try running screen with the "interrupt" option (add the "interrupt" flag to the "flow" command in your .screenrc, or use the -i command-line option). This causes the output that screen has accumulated from the interrupted program to be flushed. One disadvantage is that the virtual terminal's memory contains the non-flushed version of the output, which in rare cases can cause minor inaccuracies in the output. For example, if you switch screens and return, or update the screen with "C-a l" you would see the version of the output you would have gotten without "interrupt" being on. Also, you might need to turn off flow-control (or use auto-flow mode to turn it off automatically) when running a program that expects you to type the interrupt character as input, as it is possible to interrupt the output of the virtual terminal to your physical terminal when flow-control is enabled. If this happens, a simple refresh of the screen with "C-a l" will restore it. Give each mode a try, and use whichever mode you find more comfortable. TITLES (naming windows) You can customize each window's name in the window display (viewed with the "windows" command (C-a w)) by setting it with one of the title commands. Normally the name displayed is the actual command name of the program created in the window. However, it is sometimes useful to distinguish various programs of the same name or to change the name on- the-fly to reflect the current state of the window. The default name for all shell windows can be set with the "shelltitle" command in the .screenrc file, while all other windows are created with a "screen" command and thus can have their name set with the -t option. Interactively, there is the title-string escape-sequence (<esc>kname<esc>\) and the "title" command (C-a A). The former can be output from an application to control the window's name under software control, and the latter will prompt for a name when typed. You can also bind pre-defined names to keys with the "title" command to set things quickly without prompting. Finally, screen has a shell-specific heuristic that is enabled by setting the window's name to "search|name" and arranging to have a null title escape-sequence output as a part of your prompt. The search portion specifies an end-of-prompt search string, while the name portion specifies the default shell name for the window. If the name ends in a `:' screen will add what it believes to be the current command running in the window to the end of the window's shell name (e.g. "name:cmd"). Otherwise the current command name supersedes the shell name while it is running. Here's how it works: you must modify your shell prompt to output a null title-escape-sequence (<esc>k<esc>\) as a part of your prompt. The last part of your prompt must be the same as the string you specified for the search portion of the title. Once this is set up, screen will use the title-escape-sequence to clear the previous command name and get ready for the next command. Then, when a newline is received from the shell, a search is made for the end of the prompt. If found, it will grab the first word after the matched string and use it as the command name. If the command name begins with either '!', '%', or '^' screen will use the first word on the following line (if found) in preference to the just-found name. This helps csh users get better command names when using job control or history recall commands. Here's some .screenrc examples: screen -t top 2 nice top Adding this line to your .screenrc would start a nice-d version of the "top" command in window 2 named "top" rather than "nice". shelltitle '> |csh' screen 1 These commands would start a shell with the given shelltitle. The title specified is an auto-title that would expect the prompt and the typed command to look something like the following: /usr/joe/src/dir> trn (it looks after the '> ' for the command name). The window status would show the name "trn" while the command was running, and revert to "csh" upon completion. bind R screen -t '% |root:' su Having this command in your .screenrc would bind the key sequence "C-a R" to the "su" command and give it an auto-title name of "root:". For this auto-title to work, the screen could look something like this: % !em emacs file.c Here the user typed the csh history command "!em" which ran the previously entered "emacs" command. The window status would show "root:emacs" during the execution of the command, and revert to simply "root:" at its completion. bind o title bind E title "" bind u title (unknown) The first binding doesn't have any arguments, so it would prompt you for a title. when you type "C-a o". The second binding would clear an auto-title's current setting (C-a E). The third binding would set the current window's title to "(unknown)" (C-a u). One thing to keep in mind when adding a null title-escape-sequence to your prompt is that some shells (like the csh) count all the non- control characters as part of the prompt's length. If these invisible characters aren't a multiple of 8 then backspacing over a tab will result in an incorrect display. One way to get around this is to use a prompt like this: set prompt='^[[0000m^[k^[\% ' The escape-sequence "<esc>[0000m" not only normalizes the character attributes, but all the zeros round the length of the invisible characters up to 8. Bash users will probably want to echo the escape sequence in the PROMPT_COMMAND: PROMPT_COMMAND='echo -n -e "\033k\033\134"' (I used "134" to output a `\' because of a bug in bash v1.04). THE VIRTUAL TERMINAL Each window in a screen session emulates a VT100 terminal, with some extra functions added. The VT100 emulator is hard-coded, no other terminal types can be emulated. Usually screen tries to emulate as much of the VT100/ANSI standard as possible. But if your terminal lacks certain capabilities, the emulation may not be complete. In these cases screen has to tell the applications that some of the features are missing. This is no problem on machines using termcap, because screen can use the $TERMCAP variable to customize the standard screen termcap. But if you do a rlogin on another machine or your machine supports only terminfo this method fails. Because of this, screen offers a way to deal with these cases. Here is how it works: When screen tries to figure out a terminal name for itself, it first looks for an entry named "screen.<term>", where <term> is the contents of your $TERM variable. If no such entry exists, screen tries "screen" (or "screen-w" if the terminal is wide (132 cols or more)). If even this entry cannot be found, "vt100" is used as a substitute. The idea is that if you have a terminal which doesn't support an important feature (e.g. delete char or clear to EOS) you can build a new termcap/terminfo entry for screen (named "screen.<dumbterm>") in which this capability has been disabled. If this entry is installed on your machines you are able to do a rlogin and still keep the correct termcap/terminfo entry. The terminal name is put in the $TERM variable of all new windows. Screen also sets the $TERMCAP variable reflecting the capabilities of the virtual terminal emulated. Notice that, however, on machines using the terminfo database this variable has no effect. Furthermore, the variable $WINDOW is set to the window number of each window. The actual set of capabilities supported by the virtual terminal depends on the capabilities supported by the physical terminal. If, for instance, the physical terminal does not support underscore mode, screen does not put the `us' and `ue' capabilities into the window's $TERMCAP variable, accordingly. However, a minimum number of capabilities must be supported by a terminal in order to run screen; namely scrolling, clear screen, and direct cursor addressing (in addition, screen does not run on hardcopy terminals or on terminals that over-strike). Also, you can customize the $TERMCAP value used by screen by using the "termcap" .screenrc command, or by defining the variable $SCREENCAP prior to startup. When the is latter defined, its value will be copied verbatim into each window's $TERMCAP variable. This can either be the full terminal definition, or a filename where the terminal "screen" (and/or "screen-w") is defined. Note that screen honors the "terminfo" .screenrc command if the system uses the terminfo database rather than termcap. When the boolean `G0' capability is present in the termcap entry for the terminal on which screen has been called, the terminal emulation of screen supports multiple character sets. This allows an application to make use of, for instance, the VT100 graphics character set or national character sets. The following control functions from ISO 2022 are supported: lock shift G0 (SI), lock shift G1 (SO), lock shift G2, lock shift G3, single shift G2, and single shift G3. When a virtual terminal is created or reset, the ASCII character set is designated as G0 through G3. When the `G0' capability is present, screen evaluates the capabilities `S0', `E0', and `C0' if present. `S0' is the sequence the terminal uses to enable and start the graphics character set rather than SI. `E0' is the corresponding replacement for SO. `C0' gives a character by character translation string that is used during semi- graphics mode. This string is built like the `acsc' terminfo capability. When the `po' and `pf' capabilities are present in the terminal's termcap entry, applications running in a screen window can send output to the printer port of the terminal. This allows a user to have an application in one window sending output to a printer connected to the terminal, while all other windows are still active (the printer port is enabled and disabled again for each chunk of output). As a side- effect, programs running in different windows can send output to the printer simultaneously. Data sent to the printer is not displayed in the window. The info command displays a line starting `PRIN' while the printer is active. Screen maintains a hardstatus line for every window. If a window gets selected, the display's hardstatus will be updated to match the window's hardstatus line. If the display has no hardstatus the line will be displayed as a standard screen message. The hardstatus line can be changed with the ANSI Application Program Command (APC): "ESC_<string>ESC\". As a convenience for xterm users the sequence "ESC]0..2;<string>^G" is also accepted. Some capabilities are only put into the $TERMCAP variable of the virtual terminal if they can be efficiently implemented by the physical terminal. For instance, `dl' (delete line) is only put into the $TERMCAP variable if the terminal supports either delete line itself or scrolling regions. Note that this may provoke confusion, when the session is reattached on a different terminal, as the value of $TERMCAP cannot be modified by parent processes. The "alternate screen" capability is not enabled by default. Set the altscreen .screenrc command to enable it. The following is a list of control sequences recognized by screen. "(V)" and "(A)" indicate VT100-specific and ANSI- or ISO-specific functions, respectively. ESC E Next Line ESC D Index ESC M Reverse Index ESC H Horizontal Tab Set ESC Z Send VT100 Identification String ESC 7 (V) Save Cursor and Attributes ESC 8 (V) Restore Cursor and Attributes ESC [s (A) Save Cursor and Attributes ESC [u (A) Restore Cursor and Attributes ESC c Reset to Initial State ESC g Visual Bell ESC Pn p Cursor Visibility (97801) Pn = 6 Invisible 7 Visible ESC = (V) Application Keypad Mode ESC > (V) Numeric Keypad Mode ESC # 8 (V) Fill Screen with E's ESC \ (A) String Terminator ESC ^ (A) Privacy Message String (Message Line) ESC ! Global Message String (Message Line) ESC k A.k.a. Definition String ESC P (A) Device Control String. Outputs a string directly to the host terminal without interpretation. ESC _ (A) Application Program Command (Hardstatus) ESC ] 0 ; string ^G (A) Operating System Command (Hardstatus, xterm title hack) ESC ] 83 ; cmd ^G (A) Execute screen command. This only works if multi-user support is compiled into screen. The pseudo-user ":window:" is used to check the access control list. Use "addacl :window: -rwx #?" to create a user with no rights and allow only the needed commands. Control-N (A) Lock Shift G1 (SO) Control-O (A) Lock Shift G0 (SI) ESC n (A) Lock Shift G2 ESC o (A) Lock Shift G3 ESC N (A) Single Shift G2 ESC O (A) Single Shift G3 ESC ( Pcs (A) Designate character set as G0 ESC ) Pcs (A) Designate character set as G1 ESC * Pcs (A) Designate character set as G2 ESC + Pcs (A) Designate character set as G3 ESC [ Pn ; Pn H Direct Cursor Addressing ESC [ Pn ; Pn f same as above ESC [ Pn J Erase in Display Pn = None or 0 From Cursor to End of Screen 1 From Beginning of Screen to Cursor 2 Entire Screen ESC [ Pn K Erase in Line Pn = None or 0 From Cursor to End of Line 1 From Beginning of Line to Cursor 2 Entire Line ESC [ Pn X Erase character ESC [ Pn A Cursor Up ESC [ Pn B Cursor Down ESC [ Pn C Cursor Right ESC [ Pn D Cursor Left ESC [ Pn E Cursor next line ESC [ Pn F Cursor previous line ESC [ Pn G Cursor horizontal position ESC [ Pn ` same as above ESC [ Pn d Cursor vertical position ESC [ Ps ;...; Ps m Select Graphic Rendition Ps = None or 0 Default Rendition 1 Bold 2 (A) Faint 3 (A) Standout Mode (ANSI: Italicized) 4 Underlined 5 Blinking 7 Negative Image 22 (A) Normal Intensity 23 (A) Standout Mode off (ANSI: Italicized off) 24 (A) Not Underlined 25 (A) Not Blinking 27 (A) Positive Image 30 (A) Foreground Black 31 (A) Foreground Red 32 (A) Foreground Green 33 (A) Foreground Yellow 34 (A) Foreground Blue 35 (A) Foreground Magenta 36 (A) Foreground Cyan 37 (A) Foreground White 39 (A) Foreground Default 40 (A) Background Black ... ... 49 (A) Background Default ESC [ Pn g Tab Clear Pn = None or 0 Clear Tab at Current Position 3 Clear All Tabs ESC [ Pn ; Pn r (V) Set Scrolling Region ESC [ Pn I (A) Horizontal Tab ESC [ Pn Z (A) Backward Tab ESC [ Pn L (A) Insert Line ESC [ Pn M (A) Delete Line ESC [ Pn @ (A) Insert Character ESC [ Pn P (A) Delete Character ESC [ Pn S Scroll Scrolling Region Up ESC [ Pn T Scroll Scrolling Region Down ESC [ Pn ^ same as above ESC [ Ps ;...; Ps h Set Mode ESC [ Ps ;...; Ps l Reset Mode Ps = 4 (A) Insert Mode 20 (A) Automatic Linefeed Mode 34 Normal Cursor Visibility ?1 (V) Application Cursor Keys ?3 (V) Change Terminal Width to 132 columns ?5 (V) Reverse Video ?6 (V) Origin Mode ?7 (V) Wrap Mode ?9 X10 mouse tracking ?25 (V) Visible Cursor ?47 Alternate Screen (old xterm code) ?1000 (V) VT200 mouse tracking ?1047 Alternate Screen (new xterm code) ?1049 Alternate Screen (new xterm code) ESC [ 5 i (A) Start relay to printer (ANSI Media Copy) ESC [ 4 i (A) Stop relay to printer (ANSI Media Copy) ESC [ 8 ; Ph ; Pw t Resize the window to `Ph' lines and `Pw' columns (SunView special) ESC [ c Send VT100 Identification String ESC [ x Send Terminal Parameter Report ESC [ > c Send VT220 Secondary Device Attributes String ESC [ 6 n Send Cursor Position Report INPUT TRANSLATION In order to do a full VT100 emulation screen has to detect that a sequence of characters in the input stream was generated by a keypress on the user's keyboard and insert the VT100 style escape sequence. Screen has a very flexible way of doing this by making it possible to map arbitrary commands on arbitrary sequences of characters. For standard VT100 emulation the command will always insert a string in the input buffer of the window (see also command stuff in the command table). Because the sequences generated by a keypress can change after a reattach from a different terminal type, it is possible to bind commands to the termcap name of the keys. Screen will insert the correct binding after each reattach. See the bindkey command for further details on the syntax and examples. Here is the table of the default key bindings. (A) means that the command is executed if the keyboard is switched into application mode. Key name Termcap name Command ______________________________________________________ Cursor up ku stuff \033[A stuff \033OA (A) Cursor down kd stuff \033[B stuff \033OB (A) Cursor right kr stuff \033[C stuff \033OC (A) Cursor left kl stuff \033[D stuff \033OD (A) Function key 0 k0 stuff \033[10~ Function key 1 k1 stuff \033OP Function key 2 k2 stuff \033OQ Function key 3 k3 stuff \033OR Function key 4 k4 stuff \033OS Function key 5 k5 stuff \033[15~ Function key 6 k6 stuff \033[17~ Function key 7 k7 stuff \033[18~ Function key 8 k8 stuff \033[19~ Function key 9 k9 stuff \033[20~ Function key 10 k; stuff \033[21~ Function key 11 F1 stuff \033[23~ Function key 12 F2 stuff \033[24~ Home kh stuff \033[1~ End kH stuff \033[4~ Insert kI stuff \033[2~ Delete kD stuff \033[3~ Page up kP stuff \033[5~ Page down kN stuff \033[6~ Keypad 0 f0 stuff 0 stuff \033Op (A) Keypad 1 f1 stuff 1 stuff \033Oq (A) Keypad 2 f2 stuff 2 stuff \033Or (A) Keypad 3 f3 stuff 3 stuff \033Os (A) Keypad 4 f4 stuff 4 stuff \033Ot (A) Keypad 5 f5 stuff 5 stuff \033Ou (A) Keypad 6 f6 stuff 6 stuff \033Ov (A) Keypad 7 f7 stuff 7 stuff \033Ow (A) Keypad 8 f8 stuff 8 stuff \033Ox (A) Keypad 9 f9 stuff 9 stuff \033Oy (A) Keypad + f+ stuff + stuff \033Ok (A) Keypad - f- stuff - stuff \033Om (A) Keypad * f* stuff * stuff \033Oj (A) Keypad / f/ stuff / stuff \033Oo (A) Keypad = fq stuff = stuff \033OX (A) Keypad . f. stuff . stuff \033On (A) Keypad , f, stuff , stuff \033Ol (A) Keypad enter fe stuff \015 stuff \033OM (A) SPECIAL TERMINAL CAPABILITIES The following table describes all terminal capabilities that are recognized by screen and are not in the termcap(5) manual. You can place these capabilities in your termcap entries (in `/etc/termcap') or use them with the commands `termcap', `terminfo' and `termcapinfo' in your screenrc files. It is often not possible to place these capabilities in the terminfo database. LP (bool) Terminal has VT100 style margins (`magic margins'). Note that this capability is obsolete because screen uses the standard 'xn' instead. Z0 (str) Change width to 132 columns. Z1 (str) Change width to 80 columns. WS (str) Resize display. This capability has the desired width and height as arguments. SunView(tm) example: '\E[8;%d;%dt'. NF (bool) Terminal doesn't need flow control. Send ^S and ^Q direct to the application. Same as 'flow off'. The opposite of this capability is 'nx'. G0 (bool) Terminal can deal with ISO 2022 font selection sequences. S0 (str) Switch charset 'G0' to the specified charset. Default is '\E(%.'. E0 (str) Switch charset 'G0' back to standard charset. Default is '\E(B'. C0 (str) Use the string as a conversion table for font '0'. See the 'ac' capability for more details. CS (str) Switch cursor-keys to application mode. CE (str) Switch cursor-keys back to normal mode. AN (bool) Turn on autonuke. See the 'autonuke' command for more details. OL (num) Set the output buffer limit. See the 'obuflimit' command for more details. KJ (str) Set the encoding of the terminal. See the 'encoding' command for valid encodings. AF (str) Change character foreground color in an ANSI conform way. This capability will almost always be set to '\E[3%dm' ('\E[3%p1%dm' on terminfo machines). AB (str) Same as 'AF', but change background color. AX (bool) Does understand ANSI set default fg/bg color (\E[39m / \E[49m). XC (str) Describe a translation of characters to strings depending on the current font. More details follow in the next section. XT (bool) Terminal understands special xterm sequences (OSC, mouse tracking). C8 (bool) Terminal needs bold to display high-intensity colors (e.g. Eterm). TF (bool) Add missing capabilities to the termcap/info entry. (Set by default). CHARACTER TRANSLATION Screen has a powerful mechanism to translate characters to arbitrary strings depending on the current font and terminal type. Use this feature if you want to work with a common standard character set (say ISO8851-latin1) even on terminals that scatter the more unusual characters over several national language font pages. Syntax: XC=<charset-mapping>{,,<charset-mapping>} <charset-mapping> := <designator><template>{,<mapping>} <mapping> := <char-to-be-mapped><template-arg> The things in braces may be repeated any number of times. A <charset-mapping> tells screen how to map characters in font <designator> ('B': Ascii, 'A': UK, 'K': german, etc.) to strings. Every <mapping> describes to what string a single character will be translated. A template mechanism is used, as most of the time the codes have a lot in common (for example strings to switch to and from another charset). Each occurrence of '%' in <template> gets substituted with the <template-arg> specified together with the character. If your strings are not similar at all, then use '%' as a template and place the full string in <template-arg>. A quoting mechanism was added to make it possible to use a real '%'. The '\' character quotes the special characters '\', '%', and ','. Here is an example: termcap hp700 'XC=B\E(K%\E(B,\304[,\326\\\\,\334]' This tells screen how to translate ISOlatin1 (charset 'B') upper case umlaut characters on a hp700 terminal that has a german charset. '\304' gets translated to '\E(K[\E(B' and so on. Note that this line gets parsed *three* times before the internal lookup table is built, therefore a lot of quoting is needed to create a single '\'. Another extension was added to allow more emulation: If a mapping translates the unquoted '%' char, it will be sent to the terminal whenever screen switches to the corresponding <designator>. In this special case the template is assumed to be just '%' because the charset switch sequence and the character mappings normally haven't much in common. This example shows one use of the extension: termcap xterm 'XC=K%,%\E(B,[\304,\\\\\326,]\334' Here, a part of the german ('K') charset is emulated on an xterm. If screen has to change to the 'K' charset, '\E(B' will be sent to the terminal, i.e. the ASCII charset is used instead. The template is just '%', so the mapping is straightforward: '[' to '\304', '\' to '\326', and ']' to '\334'. ENVIRONMENT COLUMNS Number of columns on the terminal (overrides termcap entry). HOME Directory in which to look for .screenrc. LINES Number of lines on the terminal (overrides termcap entry). LOCKPRG Screen lock program. NETHACKOPTIONS Turns on nethack option. PATH Used for locating programs to run. SCREENCAP For customizing a terminal's TERMCAP value. SCREENDIR Alternate socket directory. SCREENRC Alternate user screenrc file. SHELL Default shell program for opening windows (default "/bin/sh"). STY Alternate socket name. SYSSCREENRC Alternate system screenrc file. TERM Terminal name. TERMCAP Terminal description. WINDOW Window number of a window (at creation time). FILES .../screen-4.?.??/etc/screenrc .../screen-4.?.??/etc/etcscreenrc Examples in the screen distribution package for private and global initialization files. $SYSSCREENRC /usr/local/etc/screenrc screen initialization commands $SCREENRC $HOME/.screenrc Read in after /usr/local/etc/screenrc $SCREENDIR/S-<login> /local/screens/S-<login> Socket directories (default) /usr/tmp/screens/S-<login> Alternate socket directories. <socket directory>/.termcap Written by the "termcap" output function /usr/tmp/screens/screen-exchange or /tmp/screen-exchange screen `interprocess communication buffer' hardcopy.[0-9] Screen images created by the hardcopy function screenlog.[0-9] Output log files created by the log function /usr/lib/terminfo/?/* or /etc/termcap Terminal capability databases /etc/utmp Login records $LOCKPRG Program that locks a terminal. SEE ALSO termcap(5), utmp(5), vi(1), captoinfo(1), tic(1) AUTHORS Originally created by Oliver Laumann, this latest version was produced by Wayne Davison, Juergen Weigert and Michael Schroeder. COPYLEFT Copyright (C) 1993-2003 Juergen Weigert (jnweiger@immd4.informatik.uni-erlangen.de) Michael Schroeder (mlschroe@immd4.informatik.uni-erlangen.de) Copyright (C) 1987 Oliver Laumann This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program (see the file COPYING); if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA CONTRIBUTORS Ken Beal (kbeal@amber.ssd.csd.harris.com), Rudolf Koenig (rfkoenig@immd4.informatik.uni-erlangen.de), Toerless Eckert (eckert@immd4.informatik.uni-erlangen.de), Wayne Davison (davison@borland.com), Patrick Wolfe (pat@kai.com, kailand!pat), Bart Schaefer (schaefer@cse.ogi.edu), Nathan Glasser (nathan@brokaw.lcs.mit.edu), Larry W. Virden (lvirden@cas.org), Howard Chu (hyc@hanauma.jpl.nasa.gov), Tim MacKenzie (tym@dibbler.cs.monash.edu.au), Markku Jarvinen (mta@{cc,cs,ee}.tut.fi), Marc Boucher (marc@CAM.ORG), Doug Siebert (dsiebert@isca.uiowa.edu), Ken Stillson (stillson@tsfsrv.mitre.org), Ian Frechett (frechett@spot.Colorado.EDU), Brian Koehmstedt (bpk@gnu.ai.mit.edu), Don Smith (djs6015@ultb.isc.rit.edu), Frank van der Linden (vdlinden@fwi.uva.nl), Martin Schweikert (schweik@cpp.ob.open.de), David Vrona (dave@sashimi.lcu.com), E. Tye McQueen (tye%spillman.UUCP@uunet.uu.net), Matthew Green (mrg@eterna.com.au), Christopher Williams (cgw@pobox.com), Matt Mosley (mattm@access.digex.net), Gregory Neil Shapiro (gshapiro@wpi.WPI.EDU), Johannes Zellner (johannes@zellner.org), Pablo Averbuj (pablo@averbuj.com). VERSION This is version 4.0.2. Its roots are a merge of a custom version 2.3PR7 by Wayne Davison and several enhancements to Oliver Laumann's version 2.0. Note that all versions numbered 2.x are copyright by Oliver Laumann. AVAILABILITY The latest official release of screen available via anonymous ftp from gnudist.gnu.org, nic.funet.fi or any other GNU distribution site. The home site of screen is ftp.uni-erlangen.de, in the directory pub/utilities/screen. The subdirectory `private' contains the latest beta testing release. If you want to help, send a note to screen@uni- erlangen.de. BUGS • `dm' (delete mode) and `xs' are not handled correctly (they are ignored). `xn' is treated as a magic-margin indicator. • Screen has no clue about double-high or double-wide characters. But this is the only area where vttest is allowed to fail. • It is not possible to change the environment variable $TERMCAP when reattaching under a different terminal type. • The support of terminfo based systems is very limited. Adding extra capabilities to $TERMCAP may not have any effects. • Screen does not make use of hardware tabs. • Screen must be installed as set-uid with owner root on most systems in order to be able to correctly change the owner of the tty device file for each window. Special permission may also be required to write the file "/etc/utmp". • Entries in "/etc/utmp" are not removed when screen is killed with SIGKILL. This will cause some programs (like "w" or "rwho") to advertise that a user is logged on who really isn't. • Screen may give a strange warning when your tty has no utmp entry. • When the modem line was hung up, screen may not automatically detach (or quit) unless the device driver is configured to send a HANGUP signal. To detach a screen session use the -D or -d command line option. • If a password is set, the command line options -d and -D still detach a session without asking. • Both "breaktype" and "defbreaktype" change the break generating method used by all terminal devices. The first should change a window specific setting, where the latter should change only the default for new windows. • When attaching to a multiuser session, the user's .screenrc file is not sourced. Each user's personal settings have to be included in the .screenrc file from which the session is booted, or have to be changed manually. • A weird imagination is most useful to gain full advantage of all the features. • Send bug-reports, fixes, enhancements, t-shirts, money, beer & pizza to screen@uni-erlangen.de. 4th Berkeley Distribution Aug 2003 SCREEN(1)
|
screen - screen manager with VT100/ANSI terminal emulation
|
screen [ -options ] [ cmd [ args ] ] screen -r [[pid.]tty[.host]] screen -r sessionowner/[[pid.]tty[.host]]
| null | null |
snmpget
|
snmpget is an SNMP application that uses the SNMP GET request to query for information on a network entity. One or more object identifiers (OIDs) may be given as arguments on the command line. Each variable name is given in the format specified in variables(5).
|
snmpget - communicates with a network entity using SNMP GET requests
|
snmpget [COMMON OPTIONS] [-Cf] AGENT OID [OID]...
|
-Cf If -Cf is not specified, some applications (snmpdelta, snmpget, snmpgetnext and snmpstatus) will try to fix errors returned by the agent that you were talking to and resend the request. The only time this is really useful is if you specified a OID that didn't exist in your request and you're using SNMPv1 which requires "all or nothing" kinds of requests. In addition to this option, snmpget takes the common options described in the snmpcmd(1) manual page. Note that snmpget REQUIRES an argument specifying the agent to query and at least one OID argument, as described there.
|
The command: snmpget -c public zeus system.sysDescr.0 will retrieve the variable system.sysDescr.0 from the host zeus using the community string public : system.sysDescr.0 = "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m" If the network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to pinpoint in what way the request was malformed. If there were other variables in the request, the request will be resent without the bad variable. Here is another example. The -c and -v options are defined in the snmpcmd(1) manual page. (Note that system.sysUpTime is an incomplete OID, as it needs the .0 index appended to it): snmpget -v1 -Cf -c public localhost system.sysUpTime system.sysContact.0 This example will return the following: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. This name doesn't exist: system.sysUpTime Similarly, the command: snmpget -v1 -c public localhost system.sysUpTime system.sysContact.0 Will return: Error in packet Reason: (noSuchName) There is no such variable name in this MIB. This name doesn't exist: system.sysUpTime system.sysContact.0 = STRING: root@localhost With the -Cf flag specified the application will not try to fix the PDU for you. SEE ALSO snmpcmd(1), snmpwalk(1), variables(5). V5.6.2.1 18 Jun 2007 SNMPGET(1)
|
piconv5.30
|
piconv is perl version of iconv, a character encoding converter widely available for various Unixen today. This script was primarily a technology demonstrator for Perl 5.8.0, but you can use piconv in the place of iconv for virtually any case. piconv converts the character encoding of either STDIN or files specified in the argument and prints out to STDOUT. Here is the list of options. Some options can be in short format (-f) or long (--from) one. -f,--from from_encoding Specifies the encoding you are converting from. Unlike iconv, this option can be omitted. In such cases, the current locale is used. -t,--to to_encoding Specifies the encoding you are converting to. Unlike iconv, this option can be omitted. In such cases, the current locale is used. Therefore, when both -f and -t are omitted, piconv just acts like cat. -s,--string string uses string instead of file for the source of text. -l,--list Lists all available encodings, one per line, in case-insensitive order. Note that only the canonical names are listed; many aliases exist. For example, the names are case-insensitive, and many standard and common aliases work, such as "latin1" for "ISO-8859-1", or "ibm850" instead of "cp850", or "winlatin1" for "cp1252". See Encode::Supported for a full discussion. -r,--resolve encoding_alias Resolve encoding_alias to Encode canonical encoding name. -C,--check N Check the validity of the stream if N = 1. When N = -1, something interesting happens when it encounters an invalid character. -c Same as "-C 1". -p,--perlqq Transliterate characters missing in encoding to \x{HHHH} where HHHH is the hexadecimal Unicode code point. --htmlcref Transliterate characters missing in encoding to &#NNN; where NNN is the decimal Unicode code point. --xmlcref Transliterate characters missing in encoding to &#xHHHH; where HHHH is the hexadecimal Unicode code point. -h,--help Show usage. -D,--debug Invokes debugging mode. Primarily for Encode hackers. -S,--scheme scheme Selects which scheme is to be used for conversion. Available schemes are as follows: from_to Uses Encode::from_to for conversion. This is the default. decode_encode Input strings are decode()d then encode()d. A straight two- step implementation. perlio The new perlIO layer is used. NI-S' favorite. You should use this option if you are using UTF-16 and others which linefeed is not $/. Like the -D option, this is also for Encode hackers. SEE ALSO iconv(1) locale(3) Encode Encode::Supported Encode::Alias PerlIO perl v5.30.3 2024-04-13 PICONV(1)
|
piconv -- iconv(1), reinvented in perl
|
piconv [-f from_encoding] [-t to_encoding] [-p|--perlqq|--htmlcref|--xmlcref] [-C N|-c] [-D] [-S scheme] [-s string|file...] piconv -l piconv -r encoding_alias piconv -h
| null | null |
pcsctest
| null | null | null | null | null |
codesign
|
The codesign command is used to create, check, and display code signatures, as well as inquire into the dynamic status of signed code in the system. codesign requires exactly one operation option to determine what action is to be performed, as well as any number of other options to modify its behavior. It can act on any number of objects per invocation, but performs the same operation on all of them. codesign accepts single-character (classic) options, as well as GNU-style long options of the form --name and --name=value. Common options have both forms; less frequent and specialized options have only long form. Note that the form --name value (without equal sign) will not work as expected on options with optional values.
|
codesign – Create and manipulate code signatures
|
codesign -s identity [-i identifier] [-r requirements] [-fv] path ... codesign -v [-R requirement] [-v] [path|pid ...] codesign -d [-v] [path|pid ...] codesign -h [-v] [pid ...] codesign --validate-constraint path ...
|
The options are as follows: --all-architectures When verifying a code signature on code that has a universal ("fat") Mach-O binary, separately verify each architecture contained. This is the default unless overridden with the -a (--architecture) option. -a, --architecture architecture When verifying or displaying signatures, explicitly select the Mach-O architecture given. The architecture can be specified either by name (e.g. i386) or by number; if by number, a sub- architecture may be appended separated by a comma. This option applies only to Mach-O binary code and is ignored for other types. If the path uses the Mach-O format and contains no code of the given architecture, the command will fail. The default for verification is --all-architectures, to verify all architectures present. The default for display is to report on the native architecture of the host system. When signing, codesign will always sign all architectures contained in a universal Mach-O file. --bundle-version version-string When handling versioned bundles such as frameworks, explicitly specify the version to operate on. This must be one of the names in the "Versions" directory of the bundle. If not specified, codesign uses the bundle's default version. Note that most frameworks delivered with the system have only one version, and thus this option is irrelevant for them. There is currently no facility for operating on all versions of a bundle at once. --check-notarization When verifying the code at the path(s) given, force an online notarization check to see if a notarization ticket is available. -d, --display Display information about the code at the path(s) given. Increasing levels of verbosity produce more output. The format is designed to be moderately easy to parse by simple scripts while still making sense to human eyes. In addition, the -r, --file-list, --extract-certificates, and --entitlements options can be used to retrieve additional information. -D, --detached filename When signing, designates that a detached signature should be written to the specified file. The code being signed is not modified and need not be writable. When verifying, designates a file containing a detached signature to be used for verification. Any embedded signature in the code is ignored. --deep (DEPRECATED for signing as of macOS 13.0) When signing a bundle, specifies that nested code content such as helpers, frameworks, and plug-ins, should be recursively signed in turn. Beware: • All signing options will be applied, in turn, to all nested content. This is almost never what you want. • Nested code content is a special term that only applies to macOS style bundles with a Contents folder. Only bare Mach-Os and well structured bundles qualify as nested code content. Non-bundle directories in nested code content locations will cause an error when signing. The codesign tool will only discover nested code content in the following directories: • Contents • Contents/Frameworks • Contents/SharedFrameworks • Contents/PlugIns • Contents/Plug-ins • Contents/XPCServices • Contents/Helpers • Contents/MacOS • Contents/Library/Automator • Contents/Library/Spotlight • Contents/Library/LoginItems • If any code (Mach-Os, bundles) are located outside the above listed locations they will not be signed by the --deep option • Using the --deep option on an iOS style bundle without a Contents folder will not cause an error but will only sign the main binary of the bundle. When verifying a bundle, this option specifies that any nested code content will be recursively verified as to its full content. By default, verification of nested content is limited to a shallow investigation that may not detect changes to the nested code. When displaying a signature, this option specifies that a list of directly nested code should be written to the display output. This lists only code directly nested within the subject; anything nested indirectly will require recursive application of the codesign command. --detached-database When signing, specifies that a detached signature should be generated as with the --detached option, but that the resulting signature should be written into a system database, from where it is made automatically available whenever apparently unsigned code is validated on the system. Writing to this system database requires elevated process privileges that are not available to ordinary users. -f, --force When signing, causes codesign to replace any existing signature on the path(s) given. Without this option, existing signatures will not be replaced, and the signing operation fails. --generate-entitlement-der When signing, convert the supplied entitlements XML data to DER and embed the entitlements as both XML and DER in the signature. Embedding DER entitlements is default behavior as of macOS 12.0 when signing for all platforms. This argument was introduced in macOS 10.14 (Mojave). -h, --hosting Constructs and prints the hosting chain of a running program. The pid arguments must denote running code (pids etc.) With verbose options, this also displays the individual dynamic validity status of each element of the hosting chain. -i, --identifier identifier During signing, explicitly specify the unique identifier string that is embedded in code signatures. If this option is omitted, the identifier is derived from either the Info.plist (if present), or the filename of the executable being signed, possibly modified by the --prefix option. It is a very bad idea to sign different programs with the same identifier. -o, --options flag,... During signing, specifies a set of option flags to be embedded in the code signature. The value takes the form of a comma-separated list of names (with no spaces). Alternatively, a numeric value can be used to directly specify the option mask (CodeDirectory flag word). See OPTION FLAGS below. -P, --pagesize pagesize Indicates the granularity of code signing. Pagesize must be a power of two. Chunks of pagesize bytes are separately signed and can thus be independently verified as needed. As a special case, a pagesize of zero indicates that the entire code should be signed and verified as a single, possibly gigantic page. This option only applies to the main executable and has no effect on the sealing of associated data, including resources. --remove-signature Removes the current code signature from the path(s) given. -r, --requirements requirements During signing, indicates that internal requirements should be embedded in the code path(s) as specified. See "specifying requirements" below. Defaults will be applied to requirement types that are not explicitly specified; if you want to defeat such a default, specify "never" for that type. During display, indicates where to write the code's internal requirements. Use -r- to write them to standard output. -R, --test-requirement requirement During verification, indicates that the path(s) given should be verified against the code requirement specified. If this option is omitted, the code is verified only for internal integrity and against its own designated requirement. -s, --sign identity Sign the code at the path(s) given using this identity. See SIGNING IDENTITIES below. -v, --verbose Sets (with a numeric value) or increments the verbosity level of output. Without the verbose option, no output is produced upon success, in the classic UNIX style. If no other options request a different action, the first -v encountered will be interpreted as --verify instead (and does not increase verbosity). -v, --verify Requests verification of code signatures. If other actions (sign, display, etc.) are also requested, -v is interpreted to mean --verbose. --continue Instructs codesign to continue processing path arguments even if processing one fails. If this option is given, exit due to operational errors is deferred until all path arguments have been considered. The exit code will then indicate the most severe failure (or, with equal severity, the first such failure encountered). --dryrun During signing, performs almost all signing operations, but does not actually write the result anywhere. Cryptographic signatures are still generated, actually using the given signing identity and triggering any access control checks normally, though the resulting signature is then discarded. --entitlements path When signing, take the file at the given path and embed its contents in the signature as entitlement data. If the data at path does not already begin with a suitable binary ("blob") header, one is attached automatically. When displaying a signature, extract any entitlement data from the signature and write it to the path given in an abstract representation. If needed --xml or --der may be passed in to output the entitlements in a desired format, if you pass in both then DER will be printed. Use "-" as the path to write to standard output. If the signature has no entitlement data, nothing is written (this is not an error). --enforce-constraint-validity When signing, require that any supplied constraints (e.g. --launch-constraint-* or --library-constraint ) are structurally valid and contain only keys that are known on this version of macOS or properly use the $optional operator. By default, constraints are checked and errors are reported but their validity is not required. This default behavior allows developers to set contraints for newer OS versions on the current OS version. --extract-certificates prefix When displaying a signature, extract the certificates in the embedded certificate chain and write them to individual files. The prefix argument is appended with numbers 0, 1, ... to form the filenames, which can be relative or absolute. Certificate 0 is the leaf (signing) certificate, and as many files are written as there are certificates in the signature. The files are in ASN.1 (DER) form. If prefix is omitted, the default prefix is "codesign" in the current directory. --file-list path When signing or displaying a signature, codesign writes to the given path a list of files that may have been modified as part of the signing process. This is useful for installer or patcher programs that need to know what was changed or what files are needed to make up the "signature" of a program. The file given is appended-to, with one line per absolute path written. An argument of "-" (single dash) denotes standard output. Note that the list may be somewhat pessimistic - all files not listed are guaranteed to be unchanged by the signing process, but some of the listed files may not actually have changed. Also note that changes may have been made to extended attributes of these files. --ignore-resources During static validation, do not validate the contents of the code's resources. In effect, this will pass validation on code whose resources have been corrupted (or inappropriately signed). On large programs, it will also substantially speed up static validation, since all the resources will not be read into memory. Obviously, the outcome of such a validation should be considered on its merits. --keychain filename During signing, only search for the signing identity in the keychain file specified. This can be used to break any matching ties if you have multiple similarly-named identities in several keychains on the user's search list. Note that the standard keychain search path is still consulted while constructing the certificate chain being embedded in the signature. Note that filename will not be searched to resolve the signing identity's certificate chain unless it is also on the user's keychain search list. --prefix string If no explicit unique identifier is specified (using the -i option), and if the implicitly generated identifier does not contain any dot (.) characters, then the given string is prefixed to the identifier before use. If the implicit identifier contains a dot, it is used as-is. Typically, this is used to deal with command tools without Info.plists, whose default identifier is simply the command's filename; the conventional prefix used is com.domain. (note that the final dot needs to be explicit). --preserve-metadata=list When re-signing code that is already signed, reuse some information from the old signature. If new data is specified explicitly, it is preferred. You still need to specify the -f (--force) option to enable overwriting signatures at all. If this option is absent, any old signature has no effect on the signing process. Note: if the linker-signed flag is present on the previous binary, then this option is ignored. This option takes a comma-separated list of names, which you may reasonably abbreviate: identifier Preserve the signing identifier (--identifier) instead of generating a default identifier. entitlements Preserve the entitlement data (--entitlements). requirements Preserve the internal requirements (--requirements option), including any explicit Designated Requirement. Note that all internal requirements are preserved or regenerated as a whole; you cannot pick and choose individual elements with this option. flags Preserve the option flags (-o), see the OPTION FLAGS section below. runtime Preserve the hardened runtime version (-o runtime flag, --runtime-version option) instead of overriding or deriving the version. launch-constraints Preserve any existing launch constraints set on the binary rather than removing them. This option is ignored if any of the --launch-constraint-* options are set. library-constraints Preserve any existing library load constraints set on the binary rather than removing them. This option is ignored if the --library-constraint option is set. For historical reasons, the --preserve-metadata option can be given without a value, which preserves all of these values as presently known. This use is deprecated and will eventually be removed; always specify an explicit list of preserved items. --strict options When validating code, apply additional restrictions beyond the defaults. symlinks Check that symbolic links inside the code bundle point to sealed files inside its bundle. This means that broken symbolic links are rejected, as are links to places outside the bundle and to places that are not, for whatever reason, sealed by the signature. sideband Check that no resource forks, Finder attributes, or similar sideband data is present in the signed code. This is now automatically enforced by signing operations. Options can be specified as a comma-separated list. Use plain --strict or --strict=all to be as strict as possible. Note that --strict=all may include more checking types over time. Not all strictness check make sense in all circumstances, which is why these behaviors are not the defualt. --timestamp [=URL] During signing, requests that a timestamp authority server be contacted to authenticate the time of signing. The server contacted is given by the URL value. If this option is given without a value, a default server provided by Apple is used. Note that this server may not support signatures made with identities not furnished by Apple. If the timestamp authority service cannot be contacted over the Internet, or it malfunctions or refuses service, the signing operation will fail. If this option is not given at all, a system-specific default behavior is invoked. This may result in some but not all code signatures being timestamped. The special value none explicitly disables the use of timestamp services. --runtime-version version During signing, when the runtime OPTION FLAG is set, explicitly specify the hardened runtime version stored in the code signature. If this option is omitted, but the runtime OPTION FLAG is set then the hardened runtime version is omitted for non- Mach-O files and derived from the SDK version of Mach-O files. --launch-constraint-self path When signing, take the file at the given path and embed its contents in the signature as a launch constraint on this executable. The file at path should contain a plist expressing the desired launch constraint conditions. This executable will not launch if its launch constraint is not satisfied. --launch-constraint-parent path When signing, take the file at the given path and embed its contents in the signature as a launch constraint on this executable's parent. The file at path should contain a plist expressing the desired launch constraint conditions. This executable will not launch if its parent does not satisfy this launch constraint. --launch-constraint-responsible path When signing, take the file at the given path and embed its contents in the signature as a launch constraint on this executable's responsible process. The file at path should contain a plist expressing the desired launch constraint conditions. This executable will not launch if its responsible process does not satisfy this launch constraint. --library-constraint path When signing, take the file at the given path and embed its contents in the signature as a constraint on the libraries this process can load. Operating system libraries can not be restricted via this mechanism. The file at path should contain a plist expressing the desired constraint conditions. This executable will not load libraries that do not satisfy the specified conditions. --strip-disallowed-xattrs When signing, strip xattrs (such as com.apple.FinderInfo and com.apple.ResourceFork) that could interfere with code signing. If a disallowed xattr is encountered, codesign will complain about the presence of detritus, and the path and xattr of the offending file will be logged verbosely. --single-threaded-signing When signing, use one thread for building the resource seal. --validate-constraint Validate that the constraint plist(s) indicated by path(s) are structurally valid and contain only keys known on this OS version or keys that are properly wrapped with the $optional operator. An error message is printed if an error occurs. OPERATION In the first synopsis form, codesign attempts to sign the code objects at the path(s) given, using the identity provided. Internal requirements and entitlements are embedded if requested. Internal requirements not specified may be assigned suitable default values. Defaulting applies separately to each type of internal requirement. If an identifier is explicitly given, it is sealed into all path(s). Otherwise, each path derives its identifier independently from its Info.plist or pathname. Code nested within bundle directories must already be signed or the signing operation will fail, unless the --deep option is given, in which case any unsigned nested code will be recursively signed before proceeding, using the same signing options and parameters. If the --force option is given, any existing top-level signature is replaced, subject to any --preserve-metadata options also present. Combining the --force and --deep options results in forcible replacement of all signatures within the target bundle. In the second synopsis form, codesign verifies the code signatures on all the path(s) given. The verification confirms that the code at those path(s) is signed, that the signature is valid, and that all sealed components are unaltered. If a requirement is given, each path is also checked against this requirement (but see DIAGNOSTICS below). If verbose verification is requested, the program is also checked against its own designated requirement, which should never fail for a properly signed program. If a path begins with a decimal digit, it is interpreted as the process id of a running process in the system, and dynamic validation is performed on that process instead. This checks the code's dynamic status and just enough static data to close the nominal security envelope. Add at least one level of verbosity to also perform a full static check. In the third synopsis form, codesign displays the contents of the signatures on the path(s) given. More information is displayed as the verbosity level increases. This form may not completely verify the signatures on the path(s); though it may perform some verification steps in the process of obtaining information about the path(s). If the -r path option is given, internal requirements will be extracted from the path(s) and written to path; specify a dash "-" to write to standard output. If the code does not contain an explicit designated requirement, the implied one will be retrieved and written out as a source comment. If the --entitlements path option is given, embedded entitlement data will be extracted likewise and written to the file specified. In the fourth synopsis form, codesign constructs the hosting path for each pid given and writes it, one host per line, to standard output. The hosting path is the chain of code signing hosts starting with the most specific code known to be running, and ending with the root of trust (the kernel). If the --verbose option is given, the dynamic validity status of each host is also displayed, separated from the path by a tab character. Note that hosting chains can at times be constructed for invalid or even unsigned code, and the output of this form of the codesign command should not be taken as a statement of formal code validity. Only codesign --verify can do that; and in fact, formal verification constructs the hosting chain as part of its operation (but does not display it). In the fifth synopsis form, codesign validates the path(s) supplied. Validation means ensuring that keys and operators are properly structured with appropriate types and that all keys and operators are known or nested in the $optional operator. SIGNING IDENTITIES To be used for code signing, a digital identity must be stored in a keychain that is on the calling user's keychain search list. All keychain sources are supported if properly configured. In particular, it is possible to sign code with an identity stored on a supported smart card. If your signing identity is stored in a different form, you need to make it available in keychain form to sign code with it. If the --keychain argument is used, identity is only looked-for in the specific keychain given. This is meant to help disambiguate references to identities. Even in that case, the full keychain search list is still consulted for additional certificates needed to complete the signature. The identity is first considered as the full name of a keychain identity preference. If such a preference exists, it directly names the identity used. Otherwise, the identity is located by searching all keychains for a certificate whose subject common name (only) contains the identity string given. If there are multiple matches, the operation fails and no signing is performed; however, an exact match is preferred over a partial match. These comparisons are case sensitive. Multiple instances of the exactly same certificate in multiple keychains are tolerated as harmless. If identity consists of exactly forty hexadecimal digits, it is instead interpreted as the SHA-1 hash of the certificate part of the desired identity. In this case, the identity's subject name is not considered. Both identity preferences and certificate hashes can be used to identify a particular signing identity regardless of name. Identity preferences are global settings for each user and provide a layer of indirection. Certificate hashes are very explicit and local. These choices, combined with what is placed into Xcode project and target build variables and/or script settings, allows for very flexible designation of signing identities. If identity is the single letter "-" (dash), ad-hoc signing is performed. Ad-hoc signing does not use an identity at all, and identifies exactly one instance of code. Significant restrictions apply to the use of ad-hoc signed code; consult documentation before using this. codesign will attempt to embed the entire certificate chain documenting the signing identity in the code signature it generates, including any intermediate certificates and the anchor certificate. It looks for those in the keychain search list of the user performing the signing operation. If it cannot generate the entire certificate chain, signing may still succeed, but verification may fail if the verifying code does not have an independent source for the missing certificates (from its keychains). SPECIFYING REQUIREMENTS The requirement(s) arguments (-r and -R) can be given in various forms. A plain text argument is taken to be a path to a file containing the requirement(s). codesign will accept both binary files containing properly compiled requirements code, and source files that are automatically compiled before use. An argument of "-" requests that the requirement(s) are read from standard input. Finally, an argument that begins with an equal sign "=" is taken as a literal requirements source text, and is compiled accordingly for use. OPTION FLAGS When signing, a set of option flags can be specified to change the behavior of the system when using the signed code. The following flags are recognized by codesign; other flags may exist at the API level. Note that you can specify any valid flags by giving a (single) numeric value instead of a list of option names. kill Forces the signed code's kill flag to be set when the code begins execution. Code with the kill flag set will die when it becomes dynamically invalid. It is therefore safe to assume that code marked this way, once validated, will have continue to have a valid identity while alive. hard Forces the signed code's hard flag to be set when the code begins execution. The hard flag is a hint to the system that the code prefers to be denied access to resources if gaining such access would invalidate its identity. host Marks the code as capable of hosting guest code. You must set this option if you want the code to act as a code signing host, controlling subsidiary ("guest") code. This flag is set automatically if you specify an internal guest requirement. expires Forces any validation of the code to consider expiration of the certificates involved. Code signatures generated with this flag will fail to verify once any of the certificates in the chain has expired, regardless of the intentions of the verifier. Note that this flag does not affect any other checks that may cause signature validation to fail, including checks for certificate revocation. library Forces the signed code's library validation flag to be set when the code begins execution. The code will only be able to link against system libraries and frameworks, or libraries, frameworks, and plug-in bundles with the same team identifier embedded in the code directory. Team identifiers are automatically recorded in signatures when signing with suitable Apple-issued signing certificates. Note that the flag is not supported for i386 binaries, and only applies to the main executable. The flag has no effect when set on frameworks and libraries. runtime On macOS versions >= 10.14.0, opts signed processes into a hardened runtime environment which includes runtime code signing enforcement, library validation, hard, kill, and debugging restrictions. These restrictions can be selectively relaxed via entitlements. Note: macOS versions older than 10.14.0 ignore the presence of this flag in the code signature. linker-signed Identifies a signature as signed by the linker. Linker signatures are very similar to adhoc signatures, except: • linker signatures can be replaced without using the --force option. • linker signatures are never preserved regardless of the use of the --preserve-metadata option. • linker signatures will usually not contain any embedded code requirements including a designated requirement. Note that code can set the hard and kill flags on itself at any time. The signing options only affect their initial state. Once set by any means, these flags cannot be cleared for the lifetime of the code. Therefore, specifying such flags as signing options guarantees that they will be set whenever the signed code runs. If the code being signed has an Info.plist that contains a key named CSFlags, the value of that key is taken as the default value for the options. The value of CSFlags can be a string in the same form as the --options option, or an integer number specifying the absolute numeric value. Note however that while you can abbreviate flag names on the command lines, you must spell them out in the Info.plist.
|
To sign application Terminal.app with a signing identity named "authority": codesign --sign authority Terminal.app To sign the command-line tool "helper" with the same identity, overwriting any existing signature, using the signing identifier "com.mycorp.helper", and embedding a custom designated requirement codesign -f --sign authority --prefix=com.mycorp. -r="designated => anchor /tmp/foo" helper To enable the hardened runtime on Terminal.app and sign with the signing identity named "authority": codesign --sign authority --options runtime Terminal.app To verify the signature on Terminal.app and produce some verbose output: codesign --verify --verbose Terminal.app To verify the dynamic validity of process 666: codesign --verify +666 To display all information about Terminal.app's code signature: codesign --display --verbose=4 Terminal.app To extract the internal requirements from Terminal.app to standard output: codesign --display -r- Terminal.app To display the entitlements of a binary or bundle: codesign --display --entitlements - /sbin/launchd codesign --display --entitlements - --der Terminal.app To display the entitlements of process 666: codesign --display --entitlements - +666 To display the XML entitlements of process 1337: codesign --display --entitlements - --xml +1337 To sign Terminal.app with an embedded launch constraint and an embedded library constraint: codesign --sign authority --launch-constraint-self self-constraint.plist --library-constraint library-constraint.plist Terminal.app To validate a set of constraint files before signing: codesign --validate-constraint self-constraint.plist library-constraint.plist TROUBLESHOOTING A common source of confusion when using codesign arises from the ordering of command line options. If codesign is not behaving as expected, consult this manual and check the ordering of your arguments. As a general rule codesign follows a verb noun rule. For example --sign should be placed before --options in the invocation. This is because you are performing a "sign" action with a given set of options. If these are inverted and --options is provided before --sign in the invocation, the value of --options is ignored silently. DIAGNOSTICS codesign exits 0 if all operations succeed. This indicates that all codes were signed, or all codes verified properly as requested. If a signing or verification operation fails, the exit code is 1. Exit code 2 indicates invalid arguments or parameters. Exit code 3 indicates that during verification, all path(s) were properly signed but at least one of them failed to satisfy the requirement specified with the -R option. For verification, all path arguments are always investigated before the program exits. For all other operations, the program exits upon the first error encountered, and any further path arguments are ignored, unless the --continue option was specified, in which case codesign will defer the failure exit until after it has attempted to process all path arguments in turn. SIGNING ATOMICITY When a signing operation fails for a particular code, the code may already have been modified in certain ways by adding requisite signature data. Such information will not change the operation of the code, and the code will not be considered signed even with these pieces in place. You may repeat the signing operation without difficulty. Note however that a previous valid signature may have been effectively destroyed if you specified the -f option. If you require atomicity of signing stricter than provided by codesign, you need to make an explicit copy of your code and sign that. ENVIRONMENT If the CODESIGN_ALLOCATE environment variable is set, it identifies a substitute codesign_allocate tool used to allocate space for code signatures in Mach-O binaries. This is used by Xcode SDK distributions to provide architectural support for non-native platforms such as iPhones. The system will not accept such substitutes unless they are specially signed (by Apple). FILES /var/db/DetachedSignatures System-wide database of detached code signatures for unsigned code. SEE ALSO csreq(1), xcodebuild(1), codesign_allocate(1) HISTORY The codesign command first appeared in Mac OS 10.5.0 (Leopard). BUGS Some options only apply to particular operations, and codesign ignores them (without complaining) if you specify them for an operation for which they have no meaning. The --preserve-metadata option used to take no value, and varied across releases in what exactly it preserved. The ensuing confusion is still with you if you need to make backward-compatible scripts. The dual meaning of the -v option, indicating either verbosity or verification, confuses some people. If you find it confusing, use the unambiguous long forms --verbose and --verify instead. The --verify option can take either a file or a pid. If your file path starts with a number you should prefix it with "./" to force codesign to interpret the argument as a path. For example: codesign --verify 666 would become: codesign --verify ./666 NOTES The Xcode build system invokes codesign automatically if the CODE_SIGN_IDENTITY build variable is set. You can express any combination of codesign options with additional build variables there. codesign is fundamentally a shell around the code signing APIs, and performs nothing of the underlying work. Replacing it with older or newer versions is unlikely to have a useful effect. codesign has several operations and options that are purposely left undocumented in this manual page because they are either experimental (and subject to change at any time), or unadvised to the unwary. The interminably curious are referred to the published source code. macOS 14.5 May 7, 2011 macOS 14.5
|
atos
|
The atos command converts numeric addresses to their symbolic equivalents. If full debug symbol information is available, for example in a .app.dSYM sitting beside a .app, then the output of atos will include file name and source line number information. The input addresses may be given in one of three ways: 1. A list of addresses at the end of the argument list. 2. Using the -f <address-input-file> argument to specify the path of an input file containing whitespace-separated numeric addresses. 3. If no addresses were directly specified, atos enters an interactive mode, reading addresses from stdin. The symbols are found in either a binary image file or in a currently executing process, as specified by: -o <binary-image-file> | <dSYM> The path to a binary image file or dSYM in which to look up symbols. -p <pid> | <partial-executable-name> The process ID or the partial name of a currently executing process in which to look up symbols. Multiple process IDs or paths can be specified if necessary, and the two can be mixed in any order. When working with a Mach-O binary image file, atos considers only addresses and symbols defined in that binary image file, at their default locations (unless the -l or -s option is given). When working with a running process, atos considers addresses and symbols defined in all binary images currently loaded by that process, at their loaded locations. The following additional options are available. -arch architecture The particular architecure of a binary image file in which to look up symbols. -l <load-address> The load address of the binary image. This value is always assumed to be in hex, even without a "0x" prefix. The input addresses are assumed to be in a binary image with that load address. Load addresses for binary images can be found in the Binary Images: section at the bottom of crash, sample, leaks, and malloc_history reports. -s <slide> The slide value of the binary image -- this is the difference between the load address of a binary image, and the address at which the binary image was built. This slide value is subtracted from the input addresses. It is usually easier to directly specify the load address with the -l argument than to manually calculate a slide value. -offset Treat all given addresses as offsets into the binary. Only one of the following options can be used at a time: -s , -l or -offset. -printHeader If a process was specified, the first line of atos output should be a header of the form "Looking up symbols in process <pid> named: <process-name>". This is primarily used when atos is invoked as part of a stackshot(1) run, for verification of the process ID and name. -fullPath Print the full path of the source files. -i Display inlined symbols. -d <delimiter> Delimiter when outputting inline frames. Defaults to newline. EXAMPLE A stripped, optimized version of Sketch was built as an x86_64 position- independent executable (PIE) into /BuildProducts/Release. Full debug symbol information is available in Sketch.app.dSYM, which sits alongside Sketch.app. When Sketch.app was run, the Sketch binary (which was built at 0x100000000) was loaded at 0x10acde000. Running 'sample Sketch' showed 3 addresses that we want to get symbol information for -- 0x10acea1d3, 0x10ace4bea, and 0x10ace4b7a. First notice that the .dSYM is next to the .app: % ls -1 /BuildProducts/Release/ Sketch.app Sketch.app.dSYM Now, to symbolicate, we run atos with the -o flag specifying the path to the actual Sketch executable (not the .app wrapper), the -arch x86_64 flag, and the -l 0x10acde000 flag to specify the load address. % atos -o /BuildProducts/Release/Sketch.app/Contents/MacOS/Sketch -arch x86_64 -l 0x10acde000 0x10acea1d3 0x10ace4bea 0x10ace4b7a -[SKTGraphicView drawRect:] (in Sketch) (SKTGraphicView.m:445) -[SKTGraphic drawHandlesInView:] (in Sketch) (NSGeometry.h:110) -[SKTGraphic drawHandleInView:atPoint:] (in Sketch) (SKTGraphic.m:490) The same goal can be achieved by running atos with the dSYM: % atos -o /BuildProducts/Release/Sketch.app.dSYM -arch x86_64 -l 0x10acde000 0x10acea1d3 0x10ace4bea 0x10ace4b7a -[SKTGraphicView drawRect:] (in Sketch) (SKTGraphicView.m:445) -[SKTGraphic drawHandlesInView:] (in Sketch) (NSGeometry.h:110) -[SKTGraphic drawHandleInView:atPoint:] (in Sketch) (SKTGraphic.m:490) GETTING SYMBOLS FOR A DIFFERENT MACHINE ARCHITECTURE It is possible to get symbols for addresses from a different machine architecture than the system on which atos is running. For example, when running atos on an Intel-based system, one may wish to get the symbol for an address that came from a backtrace of a process running on an ARM device. To do so, use the -arch flag to specify the desired architecture (such as i386 or arm) and pass in a corresponding symbol-rich Mach-O binary image file with a binary image of the corresponding architecture (such as a Universal Binary). macOS 14.5 November 18, 2021 macOS 14.5
|
atos – convert numeric addresses to symbols of binary images or processes
|
atos [-o <binary-image-file> | <dSYM>] [-p <pid> | <partial-executable-name>] [-arch architecture] [-l <load-address>] [-s <slide>] [-offset] [-printHeader] [-fullPath] [-i] [-d <delimiter>] [-f <address-input-file>] [<address> ...]
| null | null |
llvm-gcc
| null | null | null | null | null |
mailq
|
The Postfix sendmail(1) command implements the Postfix to Sendmail compatibility interface. For the sake of compatibility with existing applications, some Sendmail command-line options are recognized but silently ignored. By default, Postfix sendmail(1) reads a message from standard input until EOF or until it reads a line with only a . character, and arranges for delivery. Postfix sendmail(1) relies on the postdrop(1) command to create a queue file in the maildrop directory. Specific command aliases are provided for other common modes of operation: mailq List the mail queue. Each entry shows the queue file ID, message size, arrival time, sender, and the recipients that still need to be delivered. If mail could not be delivered upon the last attempt, the reason for failure is shown. The queue ID string is followed by an optional status character: * The message is in the active queue, i.e. the message is selected for delivery. ! The message is in the hold queue, i.e. no further delivery attempt will be made until the mail is taken off hold. This mode of operation is implemented by executing the postqueue(1) command. newaliases Initialize the alias database. If no input file is specified (with the -oA option, see below), the program processes the file(s) specified with the alias_database configuration parameter. If no alias database type is specified, the program uses the type specified with the default_database_type configuration parameter. This mode of operation is implemented by running the postalias(1) command. Note: it may take a minute or so before an alias database update becomes visible. Use the "postfix reload" command to eliminate this delay. These and other features can be selected by specifying the appropriate combination of command-line options. Some features are controlled by parameters in the main.cf configuration file. The following options are recognized: -Am (ignored) -Ac (ignored) Postfix sendmail uses the same configuration file regardless of whether or not a message is an initial submission. -B body_type The message body MIME type: 7BIT or 8BITMIME. -bd Go into daemon mode. This mode of operation is implemented by executing the "postfix start" command. -bh (ignored) -bH (ignored) Postfix has no persistent host status database. -bi Initialize alias database. See the newaliases command above. -bl Go into daemon mode. To accept only local connections as with Sendmail´s -bl option, specify "inet_interfaces = loopback" in the Postfix main.cf configuration file. -bm Read mail from standard input and arrange for delivery. This is the default mode of operation. -bp List the mail queue. See the mailq command above. -bs Stand-alone SMTP server mode. Read SMTP commands from standard input, and write responses to standard output. In stand-alone SMTP server mode, mail relaying and other access controls are disabled by default. To enable them, run the process as the mail_owner user. This mode of operation is implemented by running the smtpd(8) daemon. -bv Do not collect or deliver a message. Instead, send an email report after verifying each recipient address. This is useful for testing address rewriting and routing configurations. This feature is available in Postfix version 2.1 and later. -C config_file -C config_dir The path name of the Postfix main.cf file, or of its parent directory. This information is ignored with Postfix versions before 2.3. With Postfix version 3.2 and later, a non-default directory must be authorized in the default main.cf file, through the alternate_config_directories or multi_instance_directories parameters. With all Postfix versions, you can specify a directory pathname with the MAIL_CONFIG environment variable to override the location of configuration files. -F full_name Set the sender full name. This overrides the NAME environment variable, and is used only with messages that have no From: message header. -f sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address. -G Gateway (relay) submission, as opposed to initial user submission. Either do not rewrite addresses at all, or update incomplete addresses with the domain information specified with remote_header_rewrite_domain. This option is ignored before Postfix version 2.3. -h hop_count (ignored) Hop count limit. Use the hopcount_limit configuration parameter instead. -I Initialize alias database. See the newaliases command above. -i When reading a message from standard input, don´t treat a line with only a . character as the end of input. -L label (ignored) The logging label. Use the syslog_name configuration parameter instead. -m (ignored) Backwards compatibility. -N dsn (default: 'delay, failure') Delivery status notification control. Specify either a comma-separated list with one or more of failure (send notification when delivery fails), delay (send notification when delivery is delayed), or success (send notification when the message is delivered); or specify never (don't send any notifications at all). This feature is available in Postfix 2.3 and later. -n (ignored) Backwards compatibility. -oAalias_database Non-default alias database. Specify pathname or type:pathname. See postalias(1) for details. -O option=value (ignored) Set the named option to value. Use the equivalent configuration parameter in main.cf instead. -o7 (ignored) -o8 (ignored) To send 8-bit or binary content, use an appropriate MIME encapsulation and specify the appropriate -B command-line option. -oi When reading a message from standard input, don´t treat a line with only a . character as the end of input. -om (ignored) The sender is never eliminated from alias etc. expansions. -o x value (ignored) Set option x to value. Use the equivalent configuration parameter in main.cf instead. -r sender Set the envelope sender address. This is the address where delivery problems are sent to. With Postfix versions before 2.1, the Errors-To: message header overrides the error return address. -R return Delivery status notification control. Specify "hdrs" to return only the header when a message bounces, "full" to return a full copy (the default behavior). The -R option specifies an upper bound; Postfix will return only the header, when a full copy would exceed the bounce_size_limit setting. This option is ignored before Postfix version 2.10. -q Attempt to deliver all queued mail. This is implemented by executing the postqueue(1) command. Warning: flushing undeliverable mail frequently will result in poor delivery performance of all other mail. -qinterval (ignored) The interval between queue runs. Use the queue_run_delay configuration parameter instead. -qIqueueid Schedule immediate delivery of mail with the specified queue ID. This option is implemented by executing the postqueue(1) command, and is available with Postfix version 2.4 and later. -qRsite Schedule immediate delivery of all mail that is queued for the named site. This option accepts only site names that are eligible for the "fast flush" service, and is implemented by executing the postqueue(1) command. See flush(8) for more information about the "fast flush" service. -qSsite This command is not implemented. Use the slower "sendmail -q" command instead. -t Extract recipients from message headers. These are added to any recipients specified on the command line. With Postfix versions prior to 2.1, this option requires that no recipient addresses are specified on the command line. -U (ignored) Initial user submission. -V envid Specify the envelope ID for notification by servers that support DSN. This feature is available in Postfix 2.3 and later. -XV (Postfix 2.2 and earlier: -V) Variable Envelope Return Path. Given an envelope sender address of the form owner-listname@origin, each recipient user@domain receives mail with a personalized envelope sender address. By default, the personalized envelope sender address is owner-listname+user=domain@origin. The default + and = characters are configurable with the default_verp_delimiters configuration parameter. -XVxy (Postfix 2.2 and earlier: -Vxy) As -XV, but uses x and y as the VERP delimiter characters, instead of the characters specified with the default_verp_delimiters configuration parameter. -v Send an email report of the first delivery attempt (Postfix versions 2.1 and later). Mail delivery always happens in the background. When multiple -v options are given, enable verbose logging for debugging purposes. -X log_file (ignored) Log mailer traffic. Use the debug_peer_list and debug_peer_level configuration parameters instead. SECURITY By design, this program is not set-user (or group) id. However, it must handle data from untrusted, possibly remote, users. Thus, the usual precautions need to be taken against malicious inputs. DIAGNOSTICS Problems are logged to syslogd(8) and to the standard error stream. ENVIRONMENT MAIL_CONFIG Directory with Postfix configuration files. MAIL_VERBOSE (value does not matter) Enable verbose logging for debugging purposes. MAIL_DEBUG (value does not matter) Enable debugging with an external command, as specified with the debugger_command configuration parameter. NAME The sender full name. This is used only with messages that have no From: message header. See also the -F option above. CONFIGURATION PARAMETERS The following main.cf parameters are especially relevant to this program. The text below provides only a parameter summary. See postconf(5) for more details including examples. COMPATIBILITY CONTROLS Available with Postfix 2.9 and later: sendmail_fix_line_endings (always) Controls how the Postfix sendmail command converts email message line endings from <CR><LF> into UNIX format (<LF>). TROUBLE SHOOTING CONTROLS The DEBUG_README file gives examples of how to trouble shoot a Postfix system. debugger_command (empty) The external command to execute when a Postfix daemon program is invoked with the -D option. debug_peer_level (2) The increment in verbose logging level when a remote client or server matches a pattern in the debug_peer_list parameter. debug_peer_list (empty) Optional list of remote client or server hostname or network address patterns that cause the verbose logging level to increase by the amount specified in $debug_peer_level. ACCESS CONTROLS Available in Postfix version 2.2 and later: authorized_flush_users (static:anyone) List of users who are authorized to flush the queue. authorized_mailq_users (static:anyone) List of users who are authorized to view the queue. authorized_submit_users (static:anyone) List of users who are authorized to submit mail with the sendmail(1) command (and with the privileged postdrop(1) helper command). RESOURCE AND RATE CONTROLS bounce_size_limit (50000) The maximal amount of original message text that is sent in a non-delivery notification. fork_attempts (5) The maximal number of attempts to fork() a child process. fork_delay (1s) The delay between attempts to fork() a child process. hopcount_limit (50) The maximal number of Received: message headers that is allowed in the primary message headers. queue_run_delay (300s) The time between deferred queue scans by the queue manager; prior to Postfix 2.4 the default value was 1000s. FAST FLUSH CONTROLS The ETRN_README file describes configuration and operation details for the Postfix "fast flush" service. fast_flush_domains ($relay_domains) Optional list of destinations that are eligible for per-destination logfiles with mail that is queued to those destinations. VERP CONTROLS The VERP_README file describes configuration and operation details of Postfix support for variable envelope return path addresses. default_verp_delimiters (+=) The two default VERP delimiter characters. verp_delimiter_filter (-=+) The characters Postfix accepts as VERP delimiter characters on the Postfix sendmail(1) command line and in SMTP commands. MISCELLANEOUS CONTROLS alias_database (see 'postconf -d' output) The alias databases for local(8) delivery that are updated with "newaliases" or with "sendmail -bi". command_directory (see 'postconf -d' output) The location of all postfix administrative commands. config_directory (see 'postconf -d' output) The default location of the Postfix main.cf and master.cf configuration files. daemon_directory (see 'postconf -d' output) The directory with Postfix support programs and daemon programs. default_database_type (see 'postconf -d' output) The default database type for use in newaliases(1), postalias(1) and postmap(1) commands. delay_warning_time (0h) The time after which the sender receives a copy of the message headers of mail that is still queued. import_environment (see 'postconf -d' output) The list of environment parameters that a privileged Postfix process will import from a non-Postfix parent process, or name=value environment overrides. mail_owner (postfix) The UNIX system account that owns the Postfix queue and most Postfix daemon processes. queue_directory (see 'postconf -d' output) The location of the Postfix top-level queue directory. remote_header_rewrite_domain (empty) Don't rewrite message headers from remote clients at all when this parameter is empty; otherwise, rewrite message headers and append the specified domain name to incomplete addresses. syslog_facility (mail) The syslog facility of Postfix logging. syslog_name (see 'postconf -d' output) A prefix that is prepended to the process name in syslog records, so that, for example, "smtpd" becomes "prefix/smtpd". Postfix 3.2 and later: alternate_config_directories (empty) A list of non-default Postfix configuration directories that may be specified with "-c config_directory" on the command line (in the case of sendmail(1), with "-C config_directory"), or via the MAIL_CONFIG environment parameter. multi_instance_directories (empty) An optional list of non-default Postfix configuration directories; these directories belong to additional Postfix instances that share the Postfix executable files and documentation with the default Postfix instance, and that are started, stopped, etc., together with the default Postfix instance. FILES /var/spool/postfix, mail queue /etc/postfix, configuration files SEE ALSO pickup(8), mail pickup daemon qmgr(8), queue manager smtpd(8), SMTP server flush(8), fast flush service postsuper(1), queue maintenance postalias(1), create/update/query alias database postdrop(1), mail posting utility postfix(1), mail system control postqueue(1), mail queue control syslogd(8), system logging README_FILES Use "postconf readme_directory" or "postconf html_directory" to locate this information. DEBUG_README, Postfix debugging howto ETRN_README, Postfix ETRN howto VERP_README, Postfix VERP howto LICENSE The Secure Mailer license must be distributed with this software. AUTHOR(S) Wietse Venema IBM T.J. Watson Research P.O. Box 704 Yorktown Heights, NY 10598, USA Wietse Venema Google, Inc. 111 8th Avenue New York, NY 10011, USA SENDMAIL(1)
|
sendmail - Postfix to Sendmail compatibility interface
|
sendmail [option ...] [recipient ...] mailq sendmail -bp newaliases sendmail -I
| null | null |
arch
|
The arch command with no arguments, displays the machine's architecture type. The other use of the arch command is to run a selected architecture of a universal binary. A universal binary contains code that can run on different architectures. By default, the operating system will select the architecture that most closely matches the processor type. A 64-bit architecture is preferred over a 32-bit architecture on a 64-bit processor, while only 32-bit architectures can run on a 32-bit processor. When the most natural architecture is unavailable, the operating system will try to pick another architecture. On 64-bit processors, a 32-bit architecture is tried. Otherwise, no architecture is run, and an error results. The arch command can be used to alter the operating system's normal selection order. The most common use is to select the 32-bit architecture on a 64-bit processor, even if a 64-bit architecture is available. The arch_name argument must be one of the currently supported architectures: i386 32-bit intel x86_64 64-bit intel x86_64h 64-bit intel (haswell) arm64 64-bit arm arm64e 64-bit arm (Apple Silicon) If the binary does not contain code for arch_name, the arch command may try to select a close match. If arm64 is specified and not found, arm64e will be tried next. If this happens, the order the architectures will be tried is not guaranteed. Either prefix the architecture with a hyphen, or (for compatibility with other commands), use -arch followed by the architecture. If more than one architecture is specified, the operating system will try each one in order, skipping an architecture that is not supported on the current processor, or is unavailable in the universal binary. The other options are: -32 Add the native 32-bit architecture to the list of architectures. -64 Add the native 64-bit architecture to the list of architectures. -c Clears the environment that will be passed to the command to be run. -d envname Deletes the named environment variable from the environment that will be passed to the command to be run. -e envname=value Assigns the given value to the named environment variable in the environment that will be passed to the command to be run. Any existing environment variable with the same name will be replaced. -h Prints a usage message and exits. The prog argument is the command to run, followed by any arguments to pass to the command. It can be a full or partial path, while a lone name will be looked up in the user's command search path. If no architectures are specified on the command line, the arch command takes the basename of the prog argument and searches for the first property list file with that basename and the .plist suffix, in the archSettings sub-directory in each of the standard domains, in the following order: ~/Library/archSettings User settings /Library/archSettings Local settings /Network/Library/archSettings Network settings /System/Library/archSettings System settings This property list contains the architecture order preferences, as well as the full path to the real executable. Please refer to the EXAMPLES section for an example of the property list file format. Making links to the arch command When a link is made to arch command with a different name, that name is used to find the corresponding property list file. Thus, other commands can be wrapped so that they have custom architecture selection order. Because of some internal logic in the code, hard links to the arch command may not work quite right. It is best to avoid using hard links, and only use symbolic links to the arch command. ENVIRONMENT The environment variable ARCHPREFERENCE can be used to provide architecture order preferences. It is checked before looking for the corresponding property list file. The value of the environment variable ARCHPREFERENCE is composed of one or more specifiers, separated by semicolons. A specifier is made up of one, two or three fields, separated by colons. Architectures specified in order, are separated by commas and make up the last (mandatory) field. The first field, if specified, is a name of a program, which selects this specifier if that name matches the program name in question. If the name field is empty or there is no name field, the specifier matches any program name. Thus, ordering of specifiers is important, and the one with no name should be last. When the arch command is called directly, the prog name provides the path information to the executable (possibly via the command search path). When a name is specified in a ARCHPREFERENCE specifier, the path information can alternately be specified as a second field following the name. When the arch command is called indirectly via a link, this path information must be specified. If not specified as a second field in a specifier, the executable path will be looked up in the corresponding property list file.
|
arch – print architecture type or run selected architecture of a universal binary
|
arch arch [-32] [-64] [[-arch_name | -arch arch_name]...] [-c] [-d envname]... [-e envname=value]... [-h] prog [args ...]
| null |
archSettings Property List Format This is an example of a property list file as is expected in one of the archSettings locations mentioned above: <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>ExecutablePath</key> <string>$execpath</string> <key>PreferredOrder</key> <array> <string>x86_64</string> <string>arm64</string> </array> <key>PropertyListVersion</key> <string>1.0</string> </dict> </plist> ARCHPREFERENCE Values i386,x86_64,x86_64h,arm64,arm64e A specifier that matches any name. foo:i386,x86_64,x86_64h,arm64,arm64e A specifier that matches the program named foo (the full executable path is in the foo.plist file). foo:/op/bin/boo:i386,x86_64,x86_64h,arm64,arm64e A specifier with all fields specified. baz:i386;x86_64;x86_64h,arm64,arm64e A specifier for baz and a second specifier that would match any other name. SEE ALSO machine(1) BUGS Running the arch command on an interpreter script may not work if the interpreter is a link to the arch command. macOS 14.5 February 15, 2021 macOS 14.5
|
ssh-keygen
|
ssh-keygen generates, manages and converts authentication keys for ssh(1). ssh-keygen can create keys for use by SSH protocol version 2. The type of key to be generated is specified with the -t option. If invoked without any arguments, ssh-keygen will generate an Ed25519 key. ssh-keygen is also used to generate groups for use in Diffie-Hellman group exchange (DH-GEX). See the MODULI GENERATION section for details. Finally, ssh-keygen can be used to generate and update Key Revocation Lists, and to test whether given keys have been revoked by one. See the KEY REVOCATION LISTS section for details. Normally each user wishing to use SSH with public key authentication runs this once to create the authentication key in ~/.ssh/id_dsa, ~/.ssh/id_ecdsa, ~/.ssh/id_ecdsa_sk, ~/.ssh/id_ed25519, ~/.ssh/id_ed25519_sk or ~/.ssh/id_rsa. Additionally, the system administrator may use this to generate host keys, as seen in /etc/rc. Normally this program generates the key and asks for a file in which to store the private key. The public key is stored in a file with the same name but “.pub” appended. The program also asks for a passphrase. The passphrase may be empty to indicate no passphrase (host keys must have an empty passphrase), or it may be a string of arbitrary length. A passphrase is similar to a password, except it can be a phrase with a series of words, punctuation, numbers, whitespace, or any string of characters you want. Good passphrases are 10-30 characters long, are not simple sentences or otherwise easily guessable (English prose has only 1-2 bits of entropy per character, and provides very bad passphrases), and contain a mix of upper and lowercase letters, numbers, and non- alphanumeric characters. The passphrase can be changed later by using the -p option. There is no way to recover a lost passphrase. If the passphrase is lost or forgotten, a new key must be generated and the corresponding public key copied to other machines. ssh-keygen will by default write keys in an OpenSSH-specific format. This format is preferred as it offers better protection for keys at rest as well as allowing storage of key comments within the private key file itself. The key comment may be useful to help identify the key. The comment is initialized to “user@host” when the key is created, but can be changed using the -c option. It is still possible for ssh-keygen to write the previously-used PEM format private keys using the -m flag. This may be used when generating new keys, and existing new-format keys may be converted using this option in conjunction with the -p (change passphrase) flag. After a key is generated, ssh-keygen will ask where the keys should be placed to be activated. The options are as follows: -A Generate host keys of all default key types (rsa, ecdsa, and ed25519) if they do not already exist. The host keys are generated with the default key file path, an empty passphrase, default bits for the key type, and default comment. If -f has also been specified, its argument is used as a prefix to the default path for the resulting host key files. This is used by /etc/rc to generate new host keys. -a rounds When saving a private key, this option specifies the number of KDF (key derivation function, currently bcrypt_pbkdf(3)) rounds used. Higher numbers result in slower passphrase verification and increased resistance to brute-force password cracking (should the keys be stolen). The default is 16 rounds. -B Show the bubblebabble digest of specified private or public key file. -b bits Specifies the number of bits in the key to create. For RSA keys, the minimum size is 1024 bits and the default is 3072 bits. Generally, 3072 bits is considered sufficient. DSA keys must be exactly 1024 bits as specified by FIPS 186-2. For ECDSA keys, the -b flag determines the key length by selecting from one of three elliptic curve sizes: 256, 384 or 521 bits. Attempting to use bit lengths other than these three values for ECDSA keys will fail. ECDSA-SK, Ed25519 and Ed25519-SK keys have a fixed length and the -b flag will be ignored. -C comment Provides a new comment. -c Requests changing the comment in the private and public key files. The program will prompt for the file containing the private keys, for the passphrase if the key has one, and for the new comment. -D pkcs11 Download the public keys provided by the PKCS#11 shared library pkcs11. When used in combination with -s, this option indicates that a CA key resides in a PKCS#11 token (see the CERTIFICATES section for details). -E fingerprint_hash Specifies the hash algorithm used when displaying key fingerprints. Valid options are: “md5” and “sha256”. The default is “sha256”. -e This option will read a private or public OpenSSH key file and print to stdout a public key in one of the formats specified by the -m option. The default export format is “RFC4716”. This option allows exporting OpenSSH keys for use by other programs, including several commercial SSH implementations. -F hostname | [hostname]:port Search for the specified hostname (with optional port number) in a known_hosts file, listing any occurrences found. This option is useful to find hashed host names or addresses and may also be used in conjunction with the -H option to print found keys in a hashed format. -f filename Specifies the filename of the key file. -g Use generic DNS format when printing fingerprint resource records using the -r command. -H Hash a known_hosts file. This replaces all hostnames and addresses with hashed representations within the specified file; the original content is moved to a file with a .old suffix. These hashes may be used normally by ssh and sshd, but they do not reveal identifying information should the file's contents be disclosed. This option will not modify existing hashed hostnames and is therefore safe to use on files that mix hashed and non- hashed names. -h When signing a key, create a host certificate instead of a user certificate. See the CERTIFICATES section for details. -I certificate_identity Specify the key identity when signing a public key. See the CERTIFICATES section for details. -i This option will read an unencrypted private (or public) key file in the format specified by the -m option and print an OpenSSH compatible private (or public) key to stdout. This option allows importing keys from other software, including several commercial SSH implementations. The default import format is “RFC4716”. -K Download resident keys from a FIDO authenticator. Public and private key files will be written to the current directory for each downloaded key. If multiple FIDO authenticators are attached, keys will be downloaded from the first touched authenticator. See the FIDO AUTHENTICATOR section for more information. -k Generate a KRL file. In this mode, ssh-keygen will generate a KRL file at the location specified via the -f flag that revokes every key or certificate presented on the command line. Keys/certificates to be revoked may be specified by public key file or using the format described in the KEY REVOCATION LISTS section. -L Prints the contents of one or more certificates. -l Show fingerprint of specified public key file. For RSA and DSA keys ssh-keygen tries to find the matching public key file and prints its fingerprint. If combined with -v, a visual ASCII art representation of the key is supplied with the fingerprint. -M generate Generate candidate Diffie-Hellman Group Exchange (DH-GEX) parameters for eventual use by the ‘diffie-hellman-group-exchange-*’ key exchange methods. The numbers generated by this operation must be further screened before use. See the MODULI GENERATION section for more information. -M screen Screen candidate parameters for Diffie-Hellman Group Exchange. This will accept a list of candidate numbers and test that they are safe (Sophie Germain) primes with acceptable group generators. The results of this operation may be added to the /etc/moduli file. See the MODULI GENERATION section for more information. -m key_format Specify a key format for key generation, the -i (import), -e (export) conversion options, and the -p change passphrase operation. The latter may be used to convert between OpenSSH private key and PEM private key formats. The supported key formats are: “RFC4716” (RFC 4716/SSH2 public or private key), “PKCS8” (PKCS8 public or private key) or “PEM” (PEM public key). By default OpenSSH will write newly-generated private keys in its own format, but when converting public keys for export the default format is “RFC4716”. Setting a format of “PEM” when generating or updating a supported private key type will cause the key to be stored in the legacy PEM private key format. -N new_passphrase Provides the new passphrase. -n principals Specify one or more principals (user or host names) to be included in a certificate when signing a key. Multiple principals may be specified, separated by commas. See the CERTIFICATES section for details. -O option Specify a key/value option. These are specific to the operation that ssh-keygen has been requested to perform. When signing certificates, one of the options listed in the CERTIFICATES section may be specified here. When performing moduli generation or screening, one of the options listed in the MODULI GENERATION section may be specified. When generating FIDO authenticator-backed keys, the options listed in the FIDO AUTHENTICATOR section may be specified. When performing signature-related options using the -Y flag, the following options are accepted: hashalg=algorithm Selects the hash algorithm to use for hashing the message to be signed. Valid algorithms are “sha256” and “sha512.” The default is “sha512.” print-pubkey Print the full public key to standard output after signature verification. verify-time=timestamp Specifies a time to use when validating signatures instead of the current time. The time may be specified as a date or time in the YYYYMMDD[Z] or in YYYYMMDDHHMM[SS][Z] formats. Dates and times will be interpreted in the current system time zone unless suffixed with a Z character, which causes them to be interpreted in the UTC time zone. When generating SSHFP DNS records from public keys using the -r flag, the following options are accepted: hashalg=algorithm Selects a hash algorithm to use when printing SSHFP records using the -D flag. Valid algorithms are “sha1” and “sha256”. The default is to print both. The -O option may be specified multiple times. -P passphrase Provides the (old) passphrase. -p Requests changing the passphrase of a private key file instead of creating a new private key. The program will prompt for the file containing the private key, for the old passphrase, and twice for the new passphrase. -Q Test whether keys have been revoked in a KRL. If the -l option is also specified then the contents of the KRL will be printed. -q Silence ssh-keygen. -R hostname | [hostname]:port Removes all keys belonging to the specified hostname (with optional port number) from a known_hosts file. This option is useful to delete hashed hosts (see the -H option above). -r hostname Print the SSHFP fingerprint resource record named hostname for the specified public key file. -s ca_key Certify (sign) a public key using the specified CA key. See the CERTIFICATES section for details. When generating a KRL, -s specifies a path to a CA public key file used to revoke certificates directly by key ID or serial number. See the KEY REVOCATION LISTS section for details. -t dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa Specifies the type of key to create. The possible values are “dsa”, “ecdsa”, “ecdsa-sk”, “ed25519”, “ed25519-sk”, or “rsa”. This flag may also be used to specify the desired signature type when signing certificates using an RSA CA key. The available RSA signature variants are “ssh-rsa” (SHA1 signatures, not recommended), “rsa-sha2-256”, and “rsa-sha2-512” (the default). -U When used in combination with -s or -Y sign, this option indicates that a CA key resides in a ssh-agent(1). See the CERTIFICATES section for more information. -u Update a KRL. When specified with -k, keys listed via the command line are added to the existing KRL rather than a new KRL being created. -V validity_interval Specify a validity interval when signing a certificate. A validity interval may consist of a single time, indicating that the certificate is valid beginning now and expiring at that time, or may consist of two times separated by a colon to indicate an explicit time interval. The start time may be specified as: • The string “always” to indicate the certificate has no specified start time. • A date or time in the system time zone formatted as YYYYMMDD or YYYYMMDDHHMM[SS]. • A date or time in the UTC time zone as YYYYMMDDZ or YYYYMMDDHHMM[SS]Z. • A relative time before the current system time consisting of a minus sign followed by an interval in the format described in the TIME FORMATS section of sshd_config(5). • A raw seconds since epoch (Jan 1 1970 00:00:00 UTC) as a hexadecimal number beginning with “0x”. The end time may be specified similarly to the start time: • The string “forever” to indicate the certificate has no specified end time. • A date or time in the system time zone formatted as YYYYMMDD or YYYYMMDDHHMM[SS]. • A date or time in the UTC time zone as YYYYMMDDZ or YYYYMMDDHHMM[SS]Z. • A relative time after the current system time consisting of a plus sign followed by an interval in the format described in the TIME FORMATS section of sshd_config(5). • A raw seconds since epoch (Jan 1 1970 00:00:00 UTC) as a hexadecimal number beginning with “0x”. For example: +52w1d Valid from now to 52 weeks and one day from now. -4w:+4w Valid from four weeks ago to four weeks from now. 20100101123000:20110101123000 Valid from 12:30 PM, January 1st, 2010 to 12:30 PM, January 1st, 2011. 20100101123000Z:20110101123000Z Similar, but interpreted in the UTC time zone rather than the system time zone. -1d:20110101 Valid from yesterday to midnight, January 1st, 2011. 0x1:0x2000000000 Valid from roughly early 1970 to May 2033. -1m:forever Valid from one minute ago and never expiring. -v Verbose mode. Causes ssh-keygen to print debugging messages about its progress. This is helpful for debugging moduli generation. Multiple -v options increase the verbosity. The maximum is 3. -w provider Specifies a path to a library that will be used when creating FIDO authenticator-hosted keys, overriding the default of using the internal USB HID support. -Y find-principals Find the principal(s) associated with the public key of a signature, provided using the -s flag in an authorized signers file provided using the -f flag. The format of the allowed signers file is documented in the ALLOWED SIGNERS section below. If one or more matching principals are found, they are returned on standard output. -Y match-principals Find principal matching the principal name provided using the -I flag in the authorized signers file specified using the -f flag. If one or more matching principals are found, they are returned on standard output. -Y check-novalidate Checks that a signature generated using ssh-keygen -Y sign has a valid structure. This does not validate if a signature comes from an authorized signer. When testing a signature, ssh-keygen accepts a message on standard input and a signature namespace using -n. A file containing the corresponding signature must also be supplied using the -s flag. Successful testing of the signature is signalled by ssh-keygen returning a zero exit status. -Y sign Cryptographically sign a file or some data using an SSH key. When signing, ssh-keygen accepts zero or more files to sign on the command-line - if no files are specified then ssh-keygen will sign data presented on standard input. Signatures are written to the path of the input file with “.sig” appended, or to standard output if the message to be signed was read from standard input. The key used for signing is specified using the -f option and may refer to either a private key, or a public key with the private half available via ssh-agent(1). An additional signature namespace, used to prevent signature confusion across different domains of use (e.g. file signing vs email signing) must be provided via the -n flag. Namespaces are arbitrary strings, and may include: “file” for file signing, “email” for email signing. For custom uses, it is recommended to use names following a NAMESPACE@YOUR.DOMAIN pattern to generate unambiguous namespaces. -Y verify Request to verify a signature generated using ssh-keygen -Y sign as described above. When verifying a signature, ssh-keygen accepts a message on standard input and a signature namespace using -n. A file containing the corresponding signature must also be supplied using the -s flag, along with the identity of the signer using -I and a list of allowed signers via the -f flag. The format of the allowed signers file is documented in the ALLOWED SIGNERS section below. A file containing revoked keys can be passed using the -r flag. The revocation file may be a KRL or a one-per-line list of public keys. Successful verification by an authorized signer is signalled by ssh-keygen returning a zero exit status. -y This option will read a private OpenSSH format file and print an OpenSSH public key to stdout. -Z cipher Specifies the cipher to use for encryption when writing an OpenSSH-format private key file. The list of available ciphers may be obtained using "ssh -Q cipher". The default is “aes256-ctr”. -z serial_number Specifies a serial number to be embedded in the certificate to distinguish this certificate from others from the same CA. If the serial_number is prefixed with a ‘+’ character, then the serial number will be incremented for each certificate signed on a single command-line. The default serial number is zero. When generating a KRL, the -z flag is used to specify a KRL version number. MODULI GENERATION ssh-keygen may be used to generate groups for the Diffie-Hellman Group Exchange (DH-GEX) protocol. Generating these groups is a two-step process: first, candidate primes are generated using a fast, but memory intensive process. These candidate primes are then tested for suitability (a CPU-intensive process). Generation of primes is performed using the -M generate option. The desired length of the primes may be specified by the -O bits option. For example: # ssh-keygen -M generate -O bits=2048 moduli-2048.candidates By default, the search for primes begins at a random point in the desired length range. This may be overridden using the -O start option, which specifies a different start point (in hex). Once a set of candidates have been generated, they must be screened for suitability. This may be performed using the -M screen option. In this mode ssh-keygen will read candidates from standard input (or a file specified using the -f option). For example: # ssh-keygen -M screen -f moduli-2048.candidates moduli-2048 By default, each candidate will be subjected to 100 primality tests. This may be overridden using the -O prime-tests option. The DH generator value will be chosen automatically for the prime under consideration. If a specific generator is desired, it may be requested using the -O generator option. Valid generator values are 2, 3, and 5. Screened DH groups may be installed in /etc/moduli. It is important that this file contains moduli of a range of bit lengths. A number of options are available for moduli generation and screening via the -O flag: lines=number Exit after screening the specified number of lines while performing DH candidate screening. start-line=line-number Start screening at the specified line number while performing DH candidate screening. checkpoint=filename Write the last line processed to the specified file while performing DH candidate screening. This will be used to skip lines in the input file that have already been processed if the job is restarted. memory=mbytes Specify the amount of memory to use (in megabytes) when generating candidate moduli for DH-GEX. start=hex-value Specify start point (in hex) when generating candidate moduli for DH-GEX. generator=value Specify desired generator (in decimal) when testing candidate moduli for DH-GEX. CERTIFICATES ssh-keygen supports signing of keys to produce certificates that may be used for user or host authentication. Certificates consist of a public key, some identity information, zero or more principal (user or host) names and a set of options that are signed by a Certification Authority (CA) key. Clients or servers may then trust only the CA key and verify its signature on a certificate rather than trusting many user/host keys. Note that OpenSSH certificates are a different, and much simpler, format to the X.509 certificates used in ssl(8). ssh-keygen supports two types of certificates: user and host. User certificates authenticate users to servers, whereas host certificates authenticate server hosts to users. To generate a user certificate: $ ssh-keygen -s /path/to/ca_key -I key_id /path/to/user_key.pub The resultant certificate will be placed in /path/to/user_key-cert.pub. A host certificate requires the -h option: $ ssh-keygen -s /path/to/ca_key -I key_id -h /path/to/host_key.pub The host certificate will be output to /path/to/host_key-cert.pub. It is possible to sign using a CA key stored in a PKCS#11 token by providing the token library using -D and identifying the CA key by providing its public half as an argument to -s: $ ssh-keygen -s ca_key.pub -D libpkcs11.so -I key_id user_key.pub Similarly, it is possible for the CA key to be hosted in a ssh-agent(1). This is indicated by the -U flag and, again, the CA key must be identified by its public half. $ ssh-keygen -Us ca_key.pub -I key_id user_key.pub In all cases, key_id is a "key identifier" that is logged by the server when the certificate is used for authentication. Certificates may be limited to be valid for a set of principal (user/host) names. By default, generated certificates are valid for all users or hosts. To generate a certificate for a specified set of principals: $ ssh-keygen -s ca_key -I key_id -n user1,user2 user_key.pub $ ssh-keygen -s ca_key -I key_id -h -n host.domain host_key.pub Additional limitations on the validity and use of user certificates may be specified through certificate options. A certificate option may disable features of the SSH session, may be valid only when presented from particular source addresses or may force the use of a specific command. The options that are valid for user certificates are: clear Clear all enabled permissions. This is useful for clearing the default set of permissions so permissions may be added individually. critical:name[=contents] extension:name[=contents] Includes an arbitrary certificate critical option or extension. The specified name should include a domain suffix, e.g. “name@example.com”. If contents is specified then it is included as the contents of the extension/option encoded as a string, otherwise the extension/option is created with no contents (usually indicating a flag). Extensions may be ignored by a client or server that does not recognise them, whereas unknown critical options will cause the certificate to be refused. force-command=command Forces the execution of command instead of any shell or command specified by the user when the certificate is used for authentication. no-agent-forwarding Disable ssh-agent(1) forwarding (permitted by default). no-port-forwarding Disable port forwarding (permitted by default). no-pty Disable PTY allocation (permitted by default). no-user-rc Disable execution of ~/.ssh/rc by sshd(8) (permitted by default). no-x11-forwarding Disable X11 forwarding (permitted by default). permit-agent-forwarding Allows ssh-agent(1) forwarding. permit-port-forwarding Allows port forwarding. permit-pty Allows PTY allocation. permit-user-rc Allows execution of ~/.ssh/rc by sshd(8). permit-X11-forwarding Allows X11 forwarding. no-touch-required Do not require signatures made using this key include demonstration of user presence (e.g. by having the user touch the authenticator). This option only makes sense for the FIDO authenticator algorithms ecdsa-sk and ed25519-sk. source-address=address_list Restrict the source addresses from which the certificate is considered valid. The address_list is a comma-separated list of one or more address/netmask pairs in CIDR format. verify-required Require signatures made using this key indicate that the user was first verified. This option only makes sense for the FIDO authenticator algorithms ecdsa-sk and ed25519-sk. Currently PIN authentication is the only supported verification method, but other methods may be supported in the future. At present, no standard options are valid for host keys. Finally, certificates may be defined with a validity lifetime. The -V option allows specification of certificate start and end times. A certificate that is presented at a time outside this range will not be considered valid. By default, certificates are valid from the UNIX Epoch to the distant future. For certificates to be used for user or host authentication, the CA public key must be trusted by sshd(8) or ssh(1). Refer to those manual pages for details. FIDO AUTHENTICATOR ssh-keygen is able to generate FIDO authenticator-backed keys, after which they may be used much like any other key type supported by OpenSSH, so long as the hardware authenticator is attached when the keys are used. FIDO authenticators generally require the user to explicitly authorise operations by touching or tapping them. FIDO keys consist of two parts: a key handle part stored in the private key file on disk, and a per- device private key that is unique to each FIDO authenticator and that cannot be exported from the authenticator hardware. These are combined by the hardware at authentication time to derive the real key that is used to sign authentication challenges. Supported key types are ecdsa-sk and ed25519-sk. The options that are valid for FIDO keys are: application Override the default FIDO application/origin string of “ssh:”. This may be useful when generating host or domain-specific resident keys. The specified application string must begin with “ssh:”. challenge=path Specifies a path to a challenge string that will be passed to the FIDO authenticator during key generation. The challenge string may be used as part of an out-of-band protocol for key enrollment (a random challenge is used by default). device Explicitly specify a fido(4) device to use, rather than letting the authenticator middleware select one. no-touch-required Indicate that the generated private key should not require touch events (user presence) when making signatures. Note that sshd(8) will refuse such signatures by default, unless overridden via an authorized_keys option. resident Indicate that the key handle should be stored on the FIDO authenticator itself. This makes it easier to use the authenticator on multiple computers. Resident keys may be supported on FIDO2 authenticators and typically require that a PIN be set on the authenticator prior to generation. Resident keys may be loaded off the authenticator using ssh-add(1). Storing both parts of a key on a FIDO authenticator increases the likelihood of an attacker being able to use a stolen authenticator device. user A username to be associated with a resident key, overriding the empty default username. Specifying a username may be useful when generating multiple resident keys for the same application name. verify-required Indicate that this private key should require user verification for each signature. Not all FIDO authenticators support this option. Currently PIN authentication is the only supported verification method, but other methods may be supported in the future. write-attestation=path May be used at key generation time to record the attestation data returned from FIDO authenticators during key generation. This information is potentially sensitive. By default, this information is discarded. KEY REVOCATION LISTS ssh-keygen is able to manage OpenSSH format Key Revocation Lists (KRLs). These binary files specify keys or certificates to be revoked using a compact format, taking as little as one bit per certificate if they are being revoked by serial number. KRLs may be generated using the -k flag. This option reads one or more files from the command line and generates a new KRL. The files may either contain a KRL specification (see below) or public keys, listed one per line. Plain public keys are revoked by listing their hash or contents in the KRL and certificates revoked by serial number or key ID (if the serial is zero or not available). Revoking keys using a KRL specification offers explicit control over the types of record used to revoke keys and may be used to directly revoke certificates by serial number or key ID without having the complete original certificate on hand. A KRL specification consists of lines containing one of the following directives followed by a colon and some directive-specific information. serial: serial_number[-serial_number] Revokes a certificate with the specified serial number. Serial numbers are 64-bit values, not including zero and may be expressed in decimal, hex or octal. If two serial numbers are specified separated by a hyphen, then the range of serial numbers including and between each is revoked. The CA key must have been specified on the ssh-keygen command line using the -s option. id: key_id Revokes a certificate with the specified key ID string. The CA key must have been specified on the ssh-keygen command line using the -s option. key: public_key Revokes the specified key. If a certificate is listed, then it is revoked as a plain public key. sha1: public_key Revokes the specified key by including its SHA1 hash in the KRL. sha256: public_key Revokes the specified key by including its SHA256 hash in the KRL. KRLs that revoke keys by SHA256 hash are not supported by OpenSSH versions prior to 7.9. hash: fingerprint Revokes a key using a fingerprint hash, as obtained from a sshd(8) authentication log message or the ssh-keygen -l flag. Only SHA256 fingerprints are supported here and resultant KRLs are not supported by OpenSSH versions prior to 7.9. KRLs may be updated using the -u flag in addition to -k. When this option is specified, keys listed via the command line are merged into the KRL, adding to those already there. It is also possible, given a KRL, to test whether it revokes a particular key (or keys). The -Q flag will query an existing KRL, testing each key specified on the command line. If any key listed on the command line has been revoked (or an error encountered) then ssh-keygen will exit with a non-zero exit status. A zero exit status will only be returned if no key was revoked. ALLOWED SIGNERS When verifying signatures, ssh-keygen uses a simple list of identities and keys to determine whether a signature comes from an authorized source. This "allowed signers" file uses a format patterned after the AUTHORIZED_KEYS FILE FORMAT described in sshd(8). Each line of the file contains the following space-separated fields: principals, options, keytype, base64-encoded key. Empty lines and lines starting with a ‘#’ are ignored as comments. The principals field is a pattern-list (see PATTERNS in ssh_config(5)) consisting of one or more comma-separated USER@DOMAIN identity patterns that are accepted for signing. When verifying, the identity presented via the -I option must match a principals pattern in order for the corresponding key to be considered acceptable for verification. The options (if present) consist of comma-separated option specifications. No spaces are permitted, except within double quotes. The following option specifications are supported (note that option keywords are case-insensitive): cert-authority Indicates that this key is accepted as a certificate authority (CA) and that certificates signed by this CA may be accepted for verification. namespaces=namespace-list Specifies a pattern-list of namespaces that are accepted for this key. If this option is present, the signature namespace embedded in the signature object and presented on the verification command-line must match the specified list before the key will be considered acceptable. valid-after=timestamp Indicates that the key is valid for use at or after the specified timestamp, which may be a date or time in the YYYYMMDD[Z] or YYYYMMDDHHMM[SS][Z] formats. Dates and times will be interpreted in the current system time zone unless suffixed with a Z character, which causes them to be interpreted in the UTC time zone. valid-before=timestamp Indicates that the key is valid for use at or before the specified timestamp. When verifying signatures made by certificates, the expected principal name must match both the principals pattern in the allowed signers file and the principals embedded in the certificate itself. An example allowed signers file: # Comments allowed at start of line user1@example.com,user2@example.com ssh-rsa AAAAX1... # A certificate authority, trusted for all principals in a domain. *@example.com cert-authority ssh-ed25519 AAAB4... # A key that is accepted only for file signing. user2@example.com namespaces="file" ssh-ed25519 AAA41... ENVIRONMENT SSH_SK_PROVIDER Specifies a path to a library that will be used when loading any FIDO authenticator-hosted keys, overriding the default of using the built-in USB HID support. FILES ~/.ssh/id_dsa ~/.ssh/id_ecdsa ~/.ssh/id_ecdsa_sk ~/.ssh/id_ed25519 ~/.ssh/id_ed25519_sk ~/.ssh/id_rsa Contains the DSA, ECDSA, authenticator-hosted ECDSA, Ed25519, authenticator-hosted Ed25519 or RSA authentication identity of the user. This file should not be readable by anyone but the user. It is possible to specify a passphrase when generating the key; that passphrase will be used to encrypt the private part of this file using 128-bit AES. This file is not automatically accessed by ssh-keygen but it is offered as the default file for the private key. ssh(1) will read this file when a login attempt is made. ~/.ssh/id_dsa.pub ~/.ssh/id_ecdsa.pub ~/.ssh/id_ecdsa_sk.pub ~/.ssh/id_ed25519.pub ~/.ssh/id_ed25519_sk.pub ~/.ssh/id_rsa.pub Contains the DSA, ECDSA, authenticator-hosted ECDSA, Ed25519, authenticator-hosted Ed25519 or RSA public key for authentication. The contents of this file should be added to ~/.ssh/authorized_keys on all machines where the user wishes to log in using public key authentication. There is no need to keep the contents of this file secret. /etc/moduli Contains Diffie-Hellman groups used for DH-GEX. The file format is described in moduli(5). SEE ALSO ssh(1), ssh-add(1), ssh-agent(1), moduli(5), sshd(8) The Secure Shell (SSH) Public Key File Format, RFC 4716, 2006. AUTHORS OpenSSH is a derivative of the original and free ssh 1.2.12 release by Tatu Ylonen. Aaron Campbell, Bob Beck, Markus Friedl, Niels Provos, Theo de Raadt and Dug Song removed many bugs, re-added newer features and created OpenSSH. Markus Friedl contributed the support for SSH protocol versions 1.5 and 2.0. macOS 14.5 September 4, 2023 macOS 14.5
|
ssh-keygen – OpenSSH authentication key utility
|
ssh-keygen [-q] [-a rounds] [-b bits] [-C comment] [-f output_keyfile] [-m format] [-N new_passphrase] [-O option] [-t dsa | ecdsa | ecdsa-sk | ed25519 | ed25519-sk | rsa] [-w provider] [-Z cipher] ssh-keygen -p [-a rounds] [-f keyfile] [-m format] [-N new_passphrase] [-P old_passphrase] [-Z cipher] ssh-keygen -i [-f input_keyfile] [-m key_format] ssh-keygen -e [-f input_keyfile] [-m key_format] ssh-keygen -y [-f input_keyfile] ssh-keygen -c [-a rounds] [-C comment] [-f keyfile] [-P passphrase] ssh-keygen -l [-v] [-E fingerprint_hash] [-f input_keyfile] ssh-keygen -B [-f input_keyfile] ssh-keygen -D pkcs11 ssh-keygen -F hostname [-lv] [-f known_hosts_file] ssh-keygen -H [-f known_hosts_file] ssh-keygen -K [-a rounds] [-w provider] ssh-keygen -R hostname [-f known_hosts_file] ssh-keygen -r hostname [-g] [-f input_keyfile] ssh-keygen -M generate [-O option] output_file ssh-keygen -M screen [-f input_file] [-O option] output_file ssh-keygen -I certificate_identity -s ca_key [-hU] [-D pkcs11_provider] [-n principals] [-O option] [-V validity_interval] [-z serial_number] file ... ssh-keygen -L [-f input_keyfile] ssh-keygen -A [-a rounds] [-f prefix_path] ssh-keygen -k -f krl_file [-u] [-s ca_public] [-z version_number] file ... ssh-keygen -Q [-l] -f krl_file file ... ssh-keygen -Y find-principals [-O option] -s signature_file -f allowed_signers_file ssh-keygen -Y match-principals -I signer_identity -f allowed_signers_file ssh-keygen -Y check-novalidate [-O option] -n namespace -s signature_file ssh-keygen -Y sign [-O option] -f key_file -n namespace file ... ssh-keygen -Y verify [-O option] -f allowed_signers_file -I signer_identity -n namespace -s signature_file [-r revocation_file]
| null | null |
snmptable
|
snmptable is an SNMP application that repeatedly uses the SNMP GETNEXT or GETBULK requests to query for information on a network entity. The parameter TABLE-OID must specify an SNMP table. snmptable is an SNMP application that repeatedly uses the SNMP GETNEXT or GETBULK requests to query for information on a network entity. The parameter TABLE-OID must specify an SNMP table. AGENT identifies a target SNMP agent, which is instrumented to monitor the gievn objects. At its simplest, the AGENT specification will consist of a hostname or an IPv4 address. In this situation, the command will attempt communication with the agent, using UDP/IPv4 to port 161 of the given target host. See snmpcmd(1) for a full list of the possible formats for AGENT.
|
snmptable - retrieve an SNMP table and display it in tabular form
|
snmptable [COMMON OPTIONS] [-Cb] [-CB] [-Ch] [-CH] [-Ci] [-Cf STRING] [-Cw WIDTH] AGENT TABLE-OID
|
COMMON OPTIONS Please see snmpcmd(1) for a list of possible values for COMMON OPTIONS as well as their descriptions. -Cb Display only a brief heading. Any common prefix of the table field names will be deleted. -CB Do not use GETBULK requests to retrieve data, only GETNEXT. -Cc CHARS Print table in columns of CHARS characters width. -Cf STRING The string STRING is used to separate table columns. With this option, each table entry will be printed in compact form, just with the string given to separate the columns (useful if you want to import it into a database). Otherwise it is printed in nicely aligned columns. -Ch Display only the column headings. -CH Do not display the column headings. -Ci This option prepends the index of the entry to all printed lines. -Cl Left justify the data in each column. -Cr REPEATERS For GETBULK requests, REPEATERS specifies the max-repeaters value to use. For GETNEXT requests, REPEATERS specifies the number of entries to retrieve at a time. -Cw WIDTH Specifies the width of the lines when the table is printed. If the lines will be longer, the table will be printed in sections of at most WIDTH characters. If WIDTH is less than the length of the contents of a single column, then that single column will still be printed. Note that snmptable REQUIRES an argument specifying the agent to query and exactly one OID argument, as described in the snmpcmd(1) manual page. This OID must be that of a MIB table object.
|
$ snmptable -v 2c -c public localhost at.atTable SNMP table: at.atTable RFC1213-MIB::atTable atIfIndex atPhysAddress atNetAddress 1 8:0:20:20:0:ab 130.225.243.33 $ snmptable -v 2c -c public -Cf + localhost at.atTable SNMP table: at.atTable atIfIndex+atPhysAddress+atNetAddress 1+8:0:20:20:0:ab+130.225.243.33 $ snmptable localhost -Cl -CB -Ci -OX -Cb -Cc 16 -Cw 64 ifTable SNMP table: ifTable Index Descr Type Mtu Speed PhysAddress AdminStatus OperStatus LastChange InOctets InUcastPkts InNUcastPkts InDiscards InErrors InUnknownProtos OutOctets OutUcastPkts OutNUcastPkts OutDiscards OutErrors OutQLen Specific index: [1] 1 lo softwareLoopbac 16436 10000000 up up ? 2837283786 3052466 ? 0 0 ? 2837283786 3052466 ? 0 0 0 zeroDotZero index: [2] 2 eth0 ethernetCsmacd 1500 10000000 0:5:5d:d1:f7:cf up up ? 2052604234 44252973 ? 0 0 ? 149778187 65897282 ? 0 0 0 zeroDotZero BUGS The test for TABLE-OID actually specifying a table is rather heuristic. Note also that the test requires the defining MIB file to be loaded. SEE ALSO snmpcmd(1), variables(5). V5.6.2.1 06 Sep 2003 SNMPTABLE(1)
|
kill.d
|
kill.d is a simple DTrace program to print details of process signals as they are sent, such as the PID source and destination, signal number and result. This program can be used to determine which process is sending signals to which other process. Since this uses DTrace, only users with root privileges can run this command.
|
kill.d - snoop process signals as they occur. Uses DTrace.
|
kill.d
| null |
Default output, print process signals as they are sent. # kill.d FIELDS FROM source PID COMMAND source command name TO destination PID SIG destination signal ("9" for a kill -9) RESULT result of signal (-1 is for failure) DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. EXIT kill.d will run forever until Ctrl-C is hit. AUTHOR Brendan Gregg [Sydney, Australia] SEE ALSO dtrace(1M), truss(1) version 0.90 May 14, 2005 kill.d(1m)
|
ditto
|
In its first form, ditto copies one or more source files or directories to a destination directory. If the destination directory does not exist it will be created before the first source is copied. If the destination directory already exists then the source directories are merged with the previous contents of the destination. In its second form, ditto copies a file to the supplied dst_file pathname. The next two forms reflect ditto's ability to create and extract archives. These archives can be either CPIO format (preferred for unix content) or PKZip (for Windows compatibility). src_archive (and dst_archive) can be the single character '-', causing ditto to read (write) archive data from stdin (or to stdout, respectively). ditto follows symbolic links provided as arguments but does not follow any links as it traverses the source or destination hierarchies. ditto overwrites existing files, symbolic links, and devices in the destination when these are copied from a source. The resulting files, links, and devices will have the same mode, access time, modification time, owner, and group as the source items from which they are copied. Pipes, sockets, and files with names beginning with .nfs or .afpDeleted will be ignored. ditto does not modify the mode, owner, group, extended attributes, or ACLs of existing directories in the destination. Files and symbolic links cannot overwrite directories or vice-versa. ditto can be used to "thin" Universal Mach-O binaries during a copy. ditto can also copy files selectively based on the contents of a BOM ("Bill of Materials") file. ditto preserves file hard links (but not directory hard links) present in the source directories and preserves setuid and setgid modes when run as the superuser. ditto will preserve resource forks and HFS meta-data information when copying unless instructed otherwise using --norsrc . --norsrc will disable copy of resource forks, extended attributes, Access Control Lists (ACLs), as well as quarantine bits. DITTONORSRC can be set in the environment as an alias to --norsrc --noextattr --noacl --noqtn on the command line. However, each option can be individually turned on or off, see the OPTIONS section for more details.
|
ditto – copy directory hierarchies, create and extract archives
|
ditto [-v] [-V] [-X] [<options>] src ... dst_directory ditto [-v] [-V] [<options>] src_file dst_file ditto -c [-z | -j | -k] [-v] [-V] [-X] [<options>] src dst_archive ditto -x [-z | -j | -k] [-v] [-V] [<options>] src_archive ... dst_directory ditto -h | --help
|
-h, --help Print full usage. -v Print a line of output to stderr for each source directory copied. -V Print a line of output to stderr for every file, symbolic link, and device copied. -X When copying one or more source directories, do not descend into directories that have a different device ID. -c Create an archive at the destination path. The default format is CPIO, unless -k is given. CPIO archives should be stored in files with names ending in .cpio. Compressed CPIO archives should be stored in files with names ending in .cpgz. -z Create compressed CPIO archives, using gzip(1) compression. -j Create compressed CPIO archives, using bzip2(1) compression. -x Extract the archives given as source arguments. The format is assumed to be CPIO, unless -k is given. Compressed CPIO is automatically handled. -k Create or extract from a PKZip archive instead of the default CPIO. PKZip archives should be stored in filenames ending in .zip. --keepParent When creating an archive, embed the parent directory name src in dst_archive. --arch arch Thin Universal binaries to the specified architecture. If multiple --arch options are specified then the resulting destination file will contain each of the specified architectures (if they are present in the source file). arch should be specified as "arm64", "x86_64", etc. --bom bom Copy only files, links, devices, and directories that are present in the specified BOM. --rsrc Preserve resource forks and HFS meta-data. ditto will store this data in Carbon-compatible ._ AppleDouble files on filesystems that do not natively support resource forks. As of Mac OS X 10.4, --rsrc is default behavior. --norsrc Do not preserve resource forks and HFS meta-data. If both --norsrc and --rsrc are passed, whichever is passed last will take precedence. Both options override DITTONORSRC. Unless explicitly specified, --norsrc also implies --noextattr and --noacl to match the behavior of Mac OS X 10.4. --extattr Preserve extended attributes (requires --rsrc). As of Mac OS X 10.5, --extattr is the default. --noextattr Do not preserve extended attributes (requires --norsrc). --qtn Preserve quarantine information. As of Mac OS X 10.5, --qtn is the default. --noqtn Do not preserve quarantine information. --acl Preserve Access Control Lists (ACLs). As of Mac OS X 10.5, --acl is the default. --noacl Do not preserve ACLs. --nocache Do not perform copies using the Mac OS X Unified Buffer Cache. Files read and written will not be cached, although if the file is already present in the cache, the cached information will be used. --hfsCompression When copying files or extracting content from an archive, if the destination is an HFS+ or APFS volume that supports filesystem compression, all the content will be compressed if appropriate. This is only supported on Mac OS X 10.6 or later, and is only intended to be used in installation and backup scenarios that involve system files. Since files using filesystem compression are not readable on versions of Mac OS X earlier than 10.6, this flag should not be used when dealing with non-system files or other user-generated content that will be used on a version of Mac OS X earlier than 10.6. --nohfsCompression Do not compress files with filesystem compression when copying or extracting content from an archive unless the content is already compressed with filesystem compression. This flag is only supported on Mac OS X 10.6 or later. --nohfsCompression is the default. --preserveHFSCompression When copying files to an HFS+ or APFS volume that supports filesystem compression, ditto will preserve the compression of any source files that were using filesystem compression. This flag is only supported on Mac OS X 10.6 or later. --preserveHFSCompression is the default. --nopreserveHFSCompression Do not preserve filesystem compression when copying files that are already compressed with filesystem compression. This is only supported on Mac OS X 10.6 or later. --sequesterRsrc When creating a PKZip archive, preserve resource forks and HFS meta-data in the subdirectory __MACOSX. PKZip extraction will automatically find these resources. --zlibCompressionLevel num Sets the compression level to use when creating a PKZip archive. The compression level can be set from 0 to 9, where 0 represents no compression, and 9 represents optimal (slowest) compression. By default, ditto will use the default compression level as defined by zlib. --password When extracting a password-encrypted ZIP archive, you must specify --password to allow ditto to prompt for a password to use to extract the contents of the file. If this option is not provided, and a password-encrypted file is encountered, ditto will emit an error message. --persistRootless If a file being replaced has the SF_RESTRICTED flag or the com.apple.rootless extended attribute set, retain it even if the source file may not have had the same flag or attribute. --nopersistRootless Do not persist the SF_RESTRICTED flag or the com.apple.rootless extended attribute for files being replaced. --nonAtomicCopies Do not perform atomic copies when replacing existing files. By default ditto will atomically swap new files into place when completing a copy. --segmentLargeFiles When copying files to a CPIO archive, segment files larger than 8 gigabytes into multiple entries. --keepBinaries When copying files ditto will set aside the original Mach-O binary when it is being replaced. The file name will be changed to a random number preceeded by the prefix .BC.T_ --keepBinariesList path When ditto keeps binary files it will record the location of the kept file in the file at the specified path. --keepBinariesPattern regex Keep any regular file that matches the specified regular expression. Note that this file must not be a Mach-O binary. --lang lang When copying files with an index bom specified via -b option the user can specify language variants to filter from the index bom. By default ditto will create a new index bom at /tmp/ditto.XXXXX representing the filtered contents. The user can direct the output bom via the -o flag. --outBom bom Specify an explicit path for the output bom. This bom will only be created if the user specified the -o flag or the -l flags. --clone Attempt to clone regular files when copying. --noclone Do not attempt to clone files. --option key=value Specify an arbitrary key value pair to be passed to the copier. The value can be a string, boolean, or integer. Booleans can be specified as 'true', 'false', 'yes', or 'no'.
|
The command: ditto src_directory dst_directory copies the contents of src_directory into dst_directory, creating dst_directory if it does not already exist. The command: ditto src_directory dir/dst_directory copies the contents of src_directory into dir/dst_directory, creating dir and dst_directory if they don't already exist. The command: ditto src-1 ... src-n dst_directory copies the contents of all of the src directories into dst_directory, creating dst_directory if it does not already exist. The command: ditto --arch ppc universal_file thin_file copies the contents of universal_file into thin_file, thinning executable code to ppc-only on the fly. The command: ditto -c --norsrc Scripts -|ssh rhost ditto -x --norsrc - ./Scripts copies Scripts, skipping any resources or meta-data, to rhost. The command: pax -f archive.cpio will list the files in the CPIO archive archive.cpio. The command: pax -zf archive.cpgz will list the files in the compressed CPIO archive archive.cpgz. The command: ditto -c -k --sequesterRsrc --keepParent src_directory archive.zip will create a PKZip archive similarly to the Finder's Compress functionality. The command: unzip -l archive.zip will list the files in the PKZip archive archive.zip. ERRORS ditto returns 0 if everything is copied, otherwise non-zero. ditto almost never gives up, preferring to report errors along the way. Diagnostic messages will be printed to standard error. ENVIRONMENT DITTOABORT If the environment variable DITTOABORT is set, ditto will call abort(3) if it encounters a fatal error. DITTONORSRC If DITTONORSRC is set but --rsrc, --extattr, and --acl are not specified, ditto will not preserve those additional types of metadata. DITTOKEEPBINARIESPATTERN If the environment variable DITTOKEEPBINARIESPATTERN is set, ditto will keep files that match the regular expression. This matches the behavior of --keepBinariesPattern DITTOKEEPBINARIESDIR By default, ditto will keep the original file adjacent to its replacement. If the environment variable DITTOKEEPBINARIESDIR is set, ditto will move kept files into the specified directory path. The files will be renamed to a random UUID and the directory will be kept balanced. DITTO_TEST_OPTIONS If DITTO_TEST_OPTIONS is set to 1 ditto will print the parameters to be passed to BOMCopierCopyWithOptions for each source and destination pair, including the contents of the options dictionary. It will then exit without performing any copy operation. BUGS ditto doesn't copy directories into directories in the same way as cp(1). In particular, ditto foo bar will copy the contents of foo into bar, whereas cp -r foo bar copies foo itself into bar. Though this is not a bug, some may consider this bug-like behavior. --keepParent for non-archive copies will eventually alleviate this problem. SEE ALSO bom(5), lsbom(8), mkbom(8), cpio(1), zip(1), gzip(1), bzip2(1), tar(1). HISTORY ditto first appeared in Mac OS X (10.0) macOS 14.0 March 29, 2023 macOS 14.0
|
getopts
|
Shell builtin commands are commands that can be executed within the running shell's process. Note that, in the case of csh(1) builtin commands, the command is executed in a subshell if it occurs as any component of a pipeline except the last. If a command specified to the shell contains a slash ‘/’, the shell will not execute a builtin command, even if the last component of the specified command matches the name of a builtin command. Thus, while specifying “echo” causes a builtin command to be executed under shells that support the echo builtin command, specifying “/bin/echo” or “./echo” does not. While some builtin commands may exist in more than one shell, their operation may be different under each shell which supports them. Below is a table which lists shell builtin commands, the standard shells that support them and whether they exist as standalone utilities. Only builtin commands for the csh(1) and sh(1) shells are listed here. Consult a shell's manual page for details on the operation of its builtin commands. Beware that the sh(1) manual page, at least, calls some of these commands “built-in commands” and some of them “reserved words”. Users of other shells may need to consult an info(1) page or other sources of documentation. Commands marked “No**” under External do exist externally, but are implemented as scripts using a builtin command of the same name. Command External csh(1) sh(1) ! No No Yes % No Yes No . No No Yes : No Yes Yes @ No Yes Yes [ Yes No Yes { No No Yes } No No Yes alias No** Yes Yes alloc No Yes No bg No** Yes Yes bind No No Yes bindkey No Yes No break No Yes Yes breaksw No Yes No builtin No No Yes builtins No Yes No case No Yes Yes cd No** Yes Yes chdir No Yes Yes command No** No Yes complete No Yes No continue No Yes Yes default No Yes No dirs No Yes No do No No Yes done No No Yes echo Yes Yes Yes echotc No Yes No elif No No Yes else No Yes Yes end No Yes No endif No Yes No endsw No Yes No esac No No Yes eval No Yes Yes exec No Yes Yes exit No Yes Yes export No No Yes false Yes No Yes fc No** No Yes fg No** Yes Yes filetest No Yes No fi No No Yes for No No Yes foreach No Yes No getopts No** No Yes glob No Yes No goto No Yes No hash No** No Yes hashstat No Yes No history No Yes No hup No Yes No if No Yes Yes jobid No No Yes jobs No** Yes Yes kill Yes Yes Yes limit No Yes No local No No Yes log No Yes No login Yes Yes No logout No Yes No ls-F No Yes No nice Yes Yes No nohup Yes Yes No notify No Yes No onintr No Yes No popd No Yes No printenv Yes Yes No printf Yes No Yes pushd No Yes No pwd Yes No Yes read No** No Yes readonly No No Yes rehash No Yes No repeat No Yes No return No No Yes sched No Yes No set No Yes Yes setenv No Yes No settc No Yes No setty No Yes No setvar No No Yes shift No Yes Yes source No Yes No stop No Yes No suspend No Yes No switch No Yes No telltc No Yes No test Yes No Yes then No No Yes time Yes Yes No times No No Yes trap No No Yes true Yes No Yes type No** No Yes ulimit No** No Yes umask No** Yes Yes unalias No** Yes Yes uncomplete No Yes No unhash No Yes No unlimit No Yes No unset No Yes Yes unsetenv No Yes No until No No Yes wait No** Yes Yes where No Yes No which Yes Yes No while No Yes Yes SEE ALSO csh(1), dash(1), echo(1), false(1), info(1), kill(1), login(1), nice(1), nohup(1), printenv(1), printf(1), pwd(1), sh(1), test(1), time(1), true(1), which(1), zsh(1) HISTORY The builtin manual page first appeared in FreeBSD 3.4. AUTHORS This manual page was written by Sheldon Hearn <sheldonh@FreeBSD.org>. macOS 14.5 December 21, 2010 macOS 14.5
|
builtin, !, %, ., :, @, [, {, }, alias, alloc, bg, bind, bindkey, break, breaksw, builtins, case, cd, chdir, command, complete, continue, default, dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval, exec, exit, export, false, fc, fg, filetest, fi, for, foreach, getopts, glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit, local, log, login, logout, ls-F, nice, nohup, notify, onintr, popd, printenv, printf, pushd, pwd, read, readonly, rehash, repeat, return, sched, set, setenv, settc, setty, setvar, shift, source, stop, suspend, switch, telltc, test, then, time, times, trap, true, type, ulimit, umask, unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait, where, which, while – shell built-in commands
|
See the built-in command description in the appropriate shell manual page.
| null | null |
users
|
The users utility lists the login names of the users currently on the system, in sorted order, space separated, on a single line. FILES /var/run/utmpx SEE ALSO finger(1), last(1), who(1), getutxent(3), utmpx(5) HISTORY The users command appeared in 3.0BSD. macOS 14.5 January 21, 2010 macOS 14.5
|
users – list current users
|
users
| null | null |
snmpbulkget
|
snmpbulkget is an SNMP application that uses the SNMP GETBULK request to query a network entity efficiently for information. One or more object identifiers (OIDs) may be given as arguments on the command line. Each variable name is given in the format specified in variables(5). If the network entity has an error processing the request packet, an error packet will be returned and a message will be shown, helping to pinpoint why the request was malformed.
|
snmpbulkget - communicates with a network entity using SNMP GETBULK requests.
|
snmpbulkget [COMMON OPTIONS] [-Cn <num>] [-Cr <NUM>] AGENT OID [OID]...
|
-Cn<NUM> Set the non-repeaters field in the GETBULK PDU. This specifies the number of supplied variables that should not be iterated over. The default is 0. -Cr<NUM> Set the max-repetitions field in the GETBULK PDU. This specifies the maximum number of iterations over the repeating variables. The default is 10. In addition to these options, snmpbulkget takes the common options described in the snmpcmd(1) manual page. Note that snmpbulkget REQUIRES an argument specifying the agent to query and at least one OID argument, as described there. EXAMPLE The command: snmpbulkget -v2c -Cn1 -Cr5 -Os -c public zeus system ifTable will retrieve the variable system.sysDescr.0 (which is the lexicographically next object to system) and the first 5 objects in the ifTable: sysDescr.0 = STRING: "SunOS zeus.net.cmu.edu 4.1.3_U1 1 sun4m" ifIndex.1 = INTEGER: 1 ifIndex.2 = INTEGER: 2 ifDescr.1 = STRING: "lo0" et cetera. NOTE As the name implies, snmpbulkget utilizes the SNMP GETBULK message, which is not available in SNMPv1. SEE ALSO snmpcmd(1), variables(5), RFC 1905. V5.6.2.1 01 May 2002 SNMPBULKGET(1)
| null |
ipcount5.30
| null | null | null | null | null |
sdp
|
sdp transforms a scripting definition (“sdef”) file, or standard input if none is specified, into a variety of other formats for use with a scriptable application. The options are as follows: -f format Specify the output format. The format may be one or more of the following. Use these when you want to control a scriptable application: h Scripting Bridge Objective-C header. You do not need to create a corresponding implementation file; Scripting Bridge will create the class implementations at runtime. Use these when you want to create a scriptable application: a Rez(1) input describing an ‘aete’ resource. s Cocoa Scripting “.scriptSuite” file. t Cocoa Scripting “.scriptTerminology” file. These formats are only necessary when creating a scriptable application that will run on Mac OS X 10.4 (Tiger) or earlier; as of 10.5 (Leopard),an application may use only an sdef. -o directory | file Specify where to write the output. This may be either a directory or a file: directory Write the output to automatically named files in that directory. Depending on the input and formats, sdp may generate several files. file Write all the output to that file. A file name of “-” writes all the output to standard output. If multiple files are generated, all of them will be written to the same file; this is usually not a good idea. The default is ‘-o .’, that is, generate automatically named files in the current directory. -A, --hidden Output definitions even for items the scripting definition marks as hidden. In Objective-C, all such definitions will be flagged as deprecated, since hidden items are usually hidden for a reason. -V version Specify the minimum compatible system version for the output, for example, -V 10.10. The default is to set the compatibility version based on the environment variable SDK_NAME, which Xcode sets based on the “Base SDK” build setting, or if that is not defined, to assume the current system version. 10.10 and earlier: Use non-parameterized array types in Objective-C files. 10.2 and earlier: Modify scriptSuite (-fs) output for certain features unsupported in Cocoa Scripting at that time. -N name, --basename name [Objective-C (-fh) only] Specify the “base” name. This name becomes the base name of the generated header and the prefix attached to all the generated classes. For example, saying --basename iTunes would result in a header file “iTunes.h” defining a iTunesApplication class. -i includefile Include the type and class definitions from the specified sdef. It may be repeated to specify multiple files. This option is obsolete; use an XInclude element in the sdef instead. SEE ALSO sdef(5) BUGS sdp's error reporting leaves much to be desired. It does not provide line numbers for errors, though it will describe the element. It will not warn you of certain types of mistakes, such as using two different names with the same code (or vice versa), and will return a zero status even for erroneous input. Mac OS X July 12, 2007 Mac OS X
|
sdp – scripting definition (sdef) processor
|
sdp -f {ahst} [-o directory | file] [options...] [file]
| null | null |
perlbug5.30
|
This program is designed to help you generate bug reports (and thank- you notes) about perl5 and the modules which ship with it. In most cases, you can just run it interactively from a command line without any special arguments and follow the prompts. If you have found a bug with a non-standard port (one that was not part of the standard distribution), a binary distribution, or a non-core module (such as Tk, DBI, etc), then please see the documentation that came with that distribution to determine the correct place to report bugs. Bug reports should be submitted to the GitHub issue tracker at <https://github.com/Perl/perl5/issues>. The perlbug@perl.org address no longer automatically opens tickets. You can use this tool to compose your report and save it to a file which you can then submit to the issue tracker. In extreme cases, perlbug may not work well enough on your system to guide you through composing a bug report. In those cases, you may be able to use perlbug -d or perl -V to get system configuration information to include in your issue report. When reporting a bug, please run through this checklist: What version of Perl you are running? Type "perl -v" at the command line to find out. Are you running the latest released version of perl? Look at http://www.perl.org/ to find out. If you are not using the latest released version, please try to replicate your bug on the latest stable release. Note that reports about bugs in old versions of Perl, especially those which indicate you haven't also tested the current stable release of Perl, are likely to receive less attention from the volunteers who build and maintain Perl than reports about bugs in the current release. This tool isn't appropriate for reporting bugs in any version prior to Perl 5.0. Are you sure what you have is a bug? A significant number of the bug reports we get turn out to be documented features in Perl. Make sure the issue you've run into isn't intentional by glancing through the documentation that comes with the Perl distribution. Given the sheer volume of Perl documentation, this isn't a trivial undertaking, but if you can point to documentation that suggests the behaviour you're seeing is wrong, your issue is likely to receive more attention. You may want to start with perldoc perltrap for pointers to common traps that new (and experienced) Perl programmers run into. If you're unsure of the meaning of an error message you've run across, perldoc perldiag for an explanation. If the message isn't in perldiag, it probably isn't generated by Perl. You may have luck consulting your operating system documentation instead. If you are on a non-UNIX platform perldoc perlport, as some features may be unimplemented or work differently. You may be able to figure out what's going wrong using the Perl debugger. For information about how to use the debugger perldoc perldebug. Do you have a proper test case? The easier it is to reproduce your bug, the more likely it will be fixed -- if nobody can duplicate your problem, it probably won't be addressed. A good test case has most of these attributes: short, simple code; few dependencies on external commands, modules, or libraries; no platform-dependent code (unless it's a platform-specific bug); clear, simple documentation. A good test case is almost always a good candidate to be included in Perl's test suite. If you have the time, consider writing your test case so that it can be easily included into the standard test suite. Have you included all relevant information? Be sure to include the exact error messages, if any. "Perl gave an error" is not an exact error message. If you get a core dump (or equivalent), you may use a debugger (dbx, gdb, etc) to produce a stack trace to include in the bug report. NOTE: unless your Perl has been compiled with debug info (often -g), the stack trace is likely to be somewhat hard to use because it will most probably contain only the function names and not their arguments. If possible, recompile your Perl with debug info and reproduce the crash and the stack trace. Can you describe the bug in plain English? The easier it is to understand a reproducible bug, the more likely it will be fixed. Any insight you can provide into the problem will help a great deal. In other words, try to analyze the problem (to the extent you can) and report your discoveries. Can you fix the bug yourself? If so, that's great news; bug reports with patches are likely to receive significantly more attention and interest than those without patches. Please submit your patch via the GitHub Pull Request workflow as described in perldoc perlhack. You may also send patches to perl5-porters@perl.org. When sending a patch, create it using "git format-patch" if possible, though a unified diff created with "diff -pu" will do nearly as well. Your patch may be returned with requests for changes, or requests for more detailed explanations about your fix. Here are a few hints for creating high-quality patches: Make sure the patch is not reversed (the first argument to diff is typically the original file, the second argument your changed file). Make sure you test your patch by applying it with "git am" or the "patch" program before you send it on its way. Try to follow the same style as the code you are trying to patch. Make sure your patch really does work ("make test", if the thing you're patching is covered by Perl's test suite). Can you use "perlbug" to submit a thank-you note? Yes, you can do this by either using the "-T" option, or by invoking the program as "perlthanks". Thank-you notes are good. It makes people smile. Please make your issue title informative. "a bug" is not informative. Neither is "perl crashes" nor is "HELP!!!". These don't help. A compact description of what's wrong is fine. Having done your bit, please be prepared to wait, to be told the bug is in your code, or possibly to get no reply at all. The volunteers who maintain Perl are busy folks, so if your problem is an obvious bug in your own code, is difficult to understand or is a duplicate of an existing report, you may not receive a personal reply. If it is important to you that your bug be fixed, do monitor the issue tracker (you will be subscribed to notifications for issues you submit or comment on) and the commit logs to development versions of Perl, and encourage the maintainers with kind words or offers of frosty beverages. (Please do be kind to the maintainers. Harassing or flaming them is likely to have the opposite effect of the one you want.) Feel free to update the ticket about your bug on http://rt.perl.org if a new version of Perl is released and your bug is still present.
|
perlbug - how to submit bug reports on Perl
|
perlbug perlbug [ -v ] [ -a address ] [ -s subject ] [ -b body | -f inputfile ] [ -F outputfile ] [ -r returnaddress ] [ -e editor ] [ -c adminaddress | -C ] [ -S ] [ -t ] [ -d ] [ -A ] [ -h ] [ -T ] perlbug [ -v ] [ -r returnaddress ] [ -A ] [ -ok | -okay | -nok | -nokay ] perlthanks
|
-a Address to send the report to. Defaults to perlbug@perl.org. -A Don't send a bug received acknowledgement to the reply address. Generally it is only a sensible to use this option if you are a perl maintainer actively watching perl porters for your message to arrive. -b Body of the report. If not included on the command line, or in a file with -f, you will get a chance to edit the message. -C Don't send copy to administrator. -c Address to send copy of report to. Defaults to the address of the local perl administrator (recorded when perl was built). -d Data mode (the default if you redirect or pipe output). This prints out your configuration data, without mailing anything. You can use this with -v to get more complete data. -e Editor to use. -f File containing the body of the report. Use this to quickly send a prepared message. -F File to output the results to instead of sending as an email. Useful particularly when running perlbug on a machine with no direct internet connection. -h Prints a brief summary of the options. -ok Report successful build on this system to perl porters. Forces -S and -C. Forces and supplies values for -s and -b. Only prompts for a return address if it cannot guess it (for use with make). Honors return address specified with -r. You can use this with -v to get more complete data. Only makes a report if this system is less than 60 days old. -okay As -ok except it will report on older systems. -nok Report unsuccessful build on this system. Forces -C. Forces and supplies a value for -s, then requires you to edit the report and say what went wrong. Alternatively, a prepared report may be supplied using -f. Only prompts for a return address if it cannot guess it (for use with make). Honors return address specified with -r. You can use this with -v to get more complete data. Only makes a report if this system is less than 60 days old. -nokay As -nok except it will report on older systems. -p The names of one or more patch files or other text attachments to be included with the report. Multiple files must be separated with commas. -r Your return address. The program will ask you to confirm its default if you don't use this option. -S Send without asking for confirmation. -s Subject to include with the message. You will be prompted if you don't supply one on the command line. -t Test mode. The target address defaults to perlbug-test@perl.org. Also makes it possible to command perlbug from a pipe or file, for testing purposes. -T Send a thank-you note instead of a bug report. -v Include verbose configuration data in the report. AUTHORS Kenneth Albanowski (<kjahds@kjahds.com>), subsequently doctored by Gurusamy Sarathy (<gsar@activestate.com>), Tom Christiansen (<tchrist@perl.com>), Nathan Torkington (<gnat@frii.com>), Charles F. Randall (<cfr@pobox.com>), Mike Guy (<mjtg@cam.ac.uk>), Dominic Dunlop (<domo@computer.org>), Hugo van der Sanden (<hv@crypt.org>), Jarkko Hietaniemi (<jhi@iki.fi>), Chris Nandor (<pudge@pobox.com>), Jon Orwant (<orwant@media.mit.edu>, Richard Foley (<richard.foley@rfi.net>), Jesse Vincent (<jesse@bestpractical.com>), and Craig A. Berry (<craigberry@mac.com>). SEE ALSO perl(1), perldebug(1), perldiag(1), perlport(1), perltrap(1), diff(1), patch(1), dbx(1), gdb(1) BUGS None known (guess what must have been used to report them?) perl v5.30.3 2024-04-13 PERLBUG(1)
| null |
cpan5.34
|
This script provides a command interface (not a shell) to CPAN. At the moment it uses CPAN.pm to do the work, but it is not a one-shot command runner for CPAN.pm.
|
cpan - easily interact with CPAN from the command line
|
# with arguments and no switches, installs specified modules cpan module_name [ module_name ... ] # with switches, installs modules with extra behavior cpan [-cfFimtTw] module_name [ module_name ... ] # use local::lib cpan -I module_name [ module_name ... ] # one time mirror override for faster mirrors cpan -p ... # with just the dot, install from the distribution in the # current directory cpan . # without arguments, starts CPAN.pm shell cpan # without arguments, but some switches cpan [-ahpruvACDLOPX]
|
-a Creates a CPAN.pm autobundle with CPAN::Shell->autobundle. -A module [ module ... ] Shows the primary maintainers for the specified modules. -c module Runs a `make clean` in the specified module's directories. -C module [ module ... ] Show the Changes files for the specified modules -D module [ module ... ] Show the module details. This prints one line for each out-of-date module (meaning, modules locally installed but have newer versions on CPAN). Each line has three columns: module name, local version, and CPAN version. -f Force the specified action, when it normally would have failed. Use this to install a module even if its tests fail. When you use this option, -i is not optional for installing a module when you need to force it: % cpan -f -i Module::Foo -F Turn off CPAN.pm's attempts to lock anything. You should be careful with this since you might end up with multiple scripts trying to muck in the same directory. This isn't so much of a concern if you're loading a special config with "-j", and that config sets up its own work directories. -g module [ module ... ] Downloads to the current directory the latest distribution of the module. -G module [ module ... ] UNIMPLEMENTED Download to the current directory the latest distribution of the modules, unpack each distribution, and create a git repository for each distribution. If you want this feature, check out Yanick Champoux's "Git::CPAN::Patch" distribution. -h Print a help message and exit. When you specify "-h", it ignores all of the other options and arguments. -i module [ module ... ] Install the specified modules. With no other switches, this switch is implied. -I Load "local::lib" (think like "-I" for loading lib paths). Too bad "-l" was already taken. -j Config.pm Load the file that has the CPAN configuration data. This should have the same format as the standard CPAN/Config.pm file, which defines $CPAN::Config as an anonymous hash. -J Dump the configuration in the same format that CPAN.pm uses. This is useful for checking the configuration as well as using the dump as a starting point for a new, custom configuration. -l List all installed modules with their versions -L author [ author ... ] List the modules by the specified authors. -m Make the specified modules. -M mirror1,mirror2,... A comma-separated list of mirrors to use for just this run. The "-P" option can find them for you automatically. -n Do a dry run, but don't actually install anything. (unimplemented) -O Show the out-of-date modules. -p Ping the configured mirrors and print a report -P Find the best mirrors you could be using and use them for the current session. -r Recompiles dynamically loaded modules with CPAN::Shell->recompile. -s Drop in the CPAN.pm shell. This command does this automatically if you don't specify any arguments. -t module [ module ... ] Run a `make test` on the specified modules. -T Do not test modules. Simply install them. -u Upgrade all installed modules. Blindly doing this can really break things, so keep a backup. -v Print the script version and CPAN.pm version then exit. -V Print detailed information about the cpan client. -w UNIMPLEMENTED Turn on cpan warnings. This checks various things, like directory permissions, and tells you about problems you might have. -x module [ module ... ] Find close matches to the named modules that you think you might have mistyped. This requires the optional installation of Text::Levenshtein or Text::Levenshtein::Damerau. -X Dump all the namespaces to standard output.
|
# print a help message cpan -h # print the version numbers cpan -v # create an autobundle cpan -a # recompile modules cpan -r # upgrade all installed modules cpan -u # install modules ( sole -i is optional ) cpan -i Netscape::Booksmarks Business::ISBN # force install modules ( must use -i ) cpan -fi CGI::Minimal URI # install modules but without testing them cpan -Ti CGI::Minimal URI Environment variables There are several components in CPAN.pm that use environment variables. The build tools, ExtUtils::MakeMaker and Module::Build use some, while others matter to the levels above them. Some of these are specified by the Perl Toolchain Gang: Lancaster Concensus: <https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/lancaster-consensus.md> Oslo Concensus: <https://github.com/Perl-Toolchain-Gang/toolchain-site/blob/master/oslo-consensus.md> NONINTERACTIVE_TESTING Assume no one is paying attention and skips prompts for distributions that do that correctly. cpan(1) sets this to 1 unless it already has a value (even if that value is false). PERL_MM_USE_DEFAULT Use the default answer for a prompted questions. cpan(1) sets this to 1 unless it already has a value (even if that value is false). CPAN_OPTS As with "PERL5OPT", a string of additional cpan(1) options to add to those you specify on the command line. CPANSCRIPT_LOGLEVEL The log level to use, with either the embedded, minimal logger or Log::Log4perl if it is installed. Possible values are the same as the "Log::Log4perl" levels: "TRACE", "DEBUG", "INFO", "WARN", "ERROR", and "FATAL". The default is "INFO". GIT_COMMAND The path to the "git" binary to use for the Git features. The default is "/usr/local/bin/git". EXIT VALUES The script exits with zero if it thinks that everything worked, or a positive number if it thinks that something failed. Note, however, that in some cases it has to divine a failure by the output of things it does not control. For now, the exit codes are vague: 1 An unknown error 2 The was an external problem 4 There was an internal problem with the script 8 A module failed to install TO DO * one shot configuration values from the command line BUGS * none noted SEE ALSO Most behaviour, including environment variables and configuration, comes directly from CPAN.pm. SOURCE AVAILABILITY This code is in Github in the CPAN.pm repository: https://github.com/andk/cpanpm The source used to be tracked separately in another GitHub repo, but the canonical source is now in the above repo. CREDITS Japheth Cleaver added the bits to allow a forced install (-f). Jim Brandt suggest and provided the initial implementation for the up- to-date and Changes features. Adam Kennedy pointed out that exit() causes problems on Windows where this script ends up with a .bat extension AUTHOR brian d foy, "<bdfoy@cpan.org>" COPYRIGHT Copyright (c) 2001-2015, brian d foy, All Rights Reserved. You may redistribute this under the same terms as Perl itself. perl v5.34.1 2024-04-13 CPAN(1)
|
treereg5.34
|
"Treereg" translates a tree grammar specification file (default extension ".trg" describing a set of tree patterns and the actions to modify them using tree-terms like: TIMES(NUM, $x) and { $NUM->{VAL} == 0) => { $NUM } which says that wherever an abstract syntax tree representing the product of a numeric expression with value 0 times any other kind of expression, the "TIMES" tree can be substituted by its left child. The compiler produces a Perl module containing the subroutines implementing those sets of pattern-actions. EXAMPLE Consider the following "eyapp" grammar (see the "Parse::Eyapp" documentation to know more about "Parse::Eyapp" grammars): ---------------------------------------------------------- nereida:~/LEyapp/examples> cat Rule6.yp %{ use Data::Dumper; %} %right '=' %left '-' '+' %left '*' '/' %left NEG %tree %% line: exp { $_[1] } ; exp: %name NUM NUM | %name VAR VAR | %name ASSIGN VAR '=' exp | %name PLUS exp '+' exp | %name MINUS exp '-' exp | %name TIMES exp '*' exp | %name DIV exp '/' exp | %name UMINUS '-' exp %prec NEG | '(' exp ')' { $_[2] } /* Let us simplify a bit the tree */ ; %% sub _Error { die "Syntax error.\n"; } sub _Lexer { my($parser)=shift; $parser->YYData->{INPUT} or $parser->YYData->{INPUT} = <STDIN> or return('',undef); $parser->YYData->{INPUT}=~s/^\s+//; for ($parser->YYData->{INPUT}) { s/^([0-9]+(?:\.[0-9]+)?)// and return('NUM',$1); s/^([A-Za-z][A-Za-z0-9_]*)// and return('VAR',$1); s/^(.)//s and return($1,$1); } } sub Run { my($self)=shift; $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error ); } ---------------------------------------------------------- Compile it using "eyapp": ---------------------------------------------------------- nereida:~/LEyapp/examples> eyapp Rule6.yp nereida:~/LEyapp/examples> ls -ltr | tail -1 -rw-rw---- 1 pl users 4976 2006-09-15 19:56 Rule6.pm ---------------------------------------------------------- Now consider this tree grammar: ---------------------------------------------------------- nereida:~/LEyapp/examples> cat Transform2.trg %{ my %Op = (PLUS=>'+', MINUS => '-', TIMES=>'*', DIV => '/'); %} fold: 'TIMES|PLUS|DIV|MINUS':bin(NUM($n), NUM($m)) => { my $op = $Op{ref($bin)}; $n->{attr} = eval "$n->{attr} $op $m->{attr}"; $_[0] = $NUM[0]; } zero_times_whatever: TIMES(NUM($x), .) and { $x->{attr} == 0 } => { $_[0] = $NUM } whatever_times_zero: TIMES(., NUM($x)) and { $x->{attr} == 0 } => { $_[0] = $NUM } /* rules related with times */ times_zero = zero_times_whatever whatever_times_zero; ---------------------------------------------------------- Compile it with "treereg": ---------------------------------------------------------- nereida:~/LEyapp/examples> treereg Transform2.trg nereida:~/LEyapp/examples> ls -ltr | tail -1 -rw-rw---- 1 pl users 1948 2006-09-15 19:57 Transform2.pm ---------------------------------------------------------- The following program makes use of both modules "Rule6.pm" and "Transform2.pm": ---------------------------------------------------------- nereida:~/LEyapp/examples> cat foldand0rule6_3.pl #!/usr/bin/perl -w use strict; use Rule6; use Parse::Eyapp::YATW; use Data::Dumper; use Transform2; $Data::Dumper::Indent = 1; my $parser = new Rule6(); my $t = $parser->Run; print "\n***** Before ******\n"; print Dumper($t); $t->s(@Transform2::all); print "\n***** After ******\n"; print Dumper($t); ---------------------------------------------------------- When the program runs with input "b*(2-2)" produces the following output: ---------------------------------------------------------- nereida:~/LEyapp/examples> foldand0rule6_3.pl b*(2-2) ***** Before ****** $VAR1 = bless( { 'children' => [ bless( { 'children' => [ bless( { 'children' => [], 'attr' => 'b', 'token' => 'VAR' }, 'TERMINAL' ) ] }, 'VAR' ), bless( { 'children' => [ bless( { 'children' => [ bless( { 'children' => [], 'attr' => '2', 'token' => 'NUM' }, 'TERMINAL' ) ] }, 'NUM' ), bless( { 'children' => [ bless( { 'children' => [], 'attr' => '2', 'token' => 'NUM' }, 'TERMINAL' ) ] }, 'NUM' ) ] }, 'MINUS' ) ] }, 'TIMES' ); ***** After ****** $VAR1 = bless( { 'children' => [ bless( { 'children' => [], 'attr' => 0, 'token' => 'NUM' }, 'TERMINAL' ) ] }, 'NUM' ); ---------------------------------------------------------- See also the section "Compiling: More Options" in Parse::Eyapp for a more contrived example. SEE ALSO • Parse::Eyapp, • eyapptut • The pdf file in <http://nereida.deioc.ull.es/~pl/perlexamples/Eyapp.pdf> • <http://nereida.deioc.ull.es/~pl/perlexamples/section_eyappts.html> (Spanish), • eyapp, • treereg, • Parse::yapp, • yacc(1), • bison(1), • the classic book "Compilers: Principles, Techniques, and Tools" by Alfred V. Aho, Ravi Sethi and • Jeffrey D. Ullman (Addison-Wesley 1986) • Parse::RecDescent. AUTHOR Casiano Rodriguez-Leon LICENSE AND COPYRIGHT Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012 Casiano Rodriguez- Leon. Copyright © 2017 William N. Braswell, Jr. All Rights Reserved. Parse::Yapp is Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. Parse::Yapp is Copyright © 2017 William N. Braswell, Jr. All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. POD ERRORS Hey! The above document had some coding errors, which are explained below: Around line 416: Non-ASCII character seen before =encoding in '©'. Assuming UTF-8 perl v5.34.0 2017-06-14 TREEREG(1)
|
treereg - Compiler for Tree Regular Expressions
|
treereg [-m packagename] [[no]syntax] [[no]numbers] [-severity 0|1|2|3] \ [-p treeprefix] [-o outputfile] [-lib /path/to/library/] -i filename[.trg] treereg [-m packagename] [[no]syntax] [[no]numbers] [-severity 0|1|2|3] \ [-p treeprefix] [-lib /path/to/library/] [-o outputfile] filename[.trg] treereg -v treereg -h
|
Options can be used both with one dash and double dash. It is not necessary to write the full name of the option. A disambiguation prefix suffices. • "-i[n] filename" Input file. Extension ".trg" is assumed if no extension is provided. • "-o[ut] filename" Output file. By default is the name of the input file (concatenated with .pm) • "-m[od] packagename" Name of the package containing the generated subroutines. By default is the longest prefix of the input file name that conforms to the classic definition of integer "[a-z_A-Z]\w*". • "-l[ib] /path/to/library/" Specifies that "/path/to/library/" will be included in @INC. Useful when the "syntax" option is on. Can be inserted as many times as necessary. • "-p[refix] treeprefix" Tree nodes automatically generated using "Parse::Eyapp" are objects blessed into the name of the production. To avoid crashes the programmer may prefix the class names with a given prefix when calling the parser; for example: $self->YYParse( yylex => \&_Lexer, yyerror => \&_Error, yyprefix => __PACKAGE__."::") The "-prefix treeprefix" option simplifies the process of writing the tree grammar so that instead of writing with the full names CLASS::TIMES(CLASS::NUM, $x) and { $NUM->{VAL} == 0) => { $NUM } it can be written: TIMES(NUM, $x) and { $NUM->{VAL} == 0) => { $NUM } • "-n[umbers]" Produces "#line" directives. • "-non[umbers]" Disable source file line numbering embedded in your parser • "-sy[ntax]" Checks that Perl code is syntactically correct. • "-nosy[ntax]" Does not check the syntax of Perl code • "-se[verity] number" - 0 = Don't check arity (default). Matching does not check the arity. The actual node being visited may have more children. - 1 = Check arity. Matching requires the equality of the number of children and the actual node and the pattern. - 2 = Check arity and give a warning - 3 = Check arity, give a warning and exit • "-v[ersion]" Gives the version • "-u[sage]" Prints the usage info • "-h[elp]" Print this help
| null |
showmount
|
showmount shows status information about the NFS server on host. By default it prints the names of all hosts that have NFS file systems mounted on the host. See NFS: Network File System Protocol Specification, RFC 1094, Appendix A, and NFS: Network File System Version 3 Protocol Specification, Appendix I, for a detailed description of the protocol. -A Search for NFS servers advertised via Bonjour. -a List all mount points in the form: host:dirpath -d List directory paths of mount points instead of hosts. -e Show the host's exports list. -3 Use mount protocol Version 3, compatible with NFS Version 3. -6 Use only IPv6 addresses to contact servers. -p Ping NFS server on the host based on provided version (2,3 or 4) using the NULL procedure. SEE ALSO mount(1), mountd(8), nfsd(8), mDNSResponder(8) BUGS The mount daemon running on the server only has an idea of the actual mounts, since the NFS server is stateless. showmount will only display the information as accurately as the mount daemon reports it. HISTORY The showmount utility first appeared in 4.4BSD. BSD 4 September 26, 2010 BSD 4
|
showmount – show remote NFS mounts on host
|
showmount [-Ae36] [-p -2|3|4] [-a | -d] [host]
| null | null |
taskinfo
|
The taskinfo utility gathers and displays policy information from the kernel. It is not indended to be run directly by users. OS X January 24, 1984 OS X
|
taskinfo – display policy information from kernel
|
taskinfo [--threads] [--dq] [--boosts] [process name | pid]
| null | null |
ar
|
The ar utility creates and maintains groups of files combined into an archive. Once an archive has been created, new files can be added and existing files can be extracted, deleted, or replaced. Files are named in the archive by a single component, i.e., if a file referenced by a path containing a slash (``/'') is archived it will be named by the last component of that path. When matching paths listed on the command line against file names stored in the archive, only the last component of the path will be compared. All informational and error messages use the path listed on the command line, if any was specified, otherwise the name in the archive is used. If multiple files in the archive have the same name, and paths are listed on the command line to ``select'' archive files for an operation, only the first file with a matching name will be selected. The normal use of ar is for the creation and maintenance of libraries suitable for use with the loader (see ld(1)) although it is not restricted to this purpose. The options are as follows: -a A positioning modifier used with the options -r and -m. The files are entered or moved after the archive member position, which must be specified. -b A positioning modifier used with the options -r and -m. The files are entered or moved before the archive member position, which must be specified. -c Whenever an archive is created, an informational message to that effect is written to standard error. If the -c option is specified, ar creates the archive silently. -d Delete the specified archive files. -i Identical to the -b option. -m Move the specified archive files within the archive. If one of the options -a, -b or -i are specified, the files are moved before or after the position file in the archive. If none of those options are specified, the files are moved to the end of the archive. -o Set the access and modification times of extracted files to the modification time of the file when it was entered into the archive. This will fail if the user is not the owner of the extracted file or the super-user. -p Write the contents of the specified archive files to the standard output. If no files are specified, the contents of all the files in the archive are written in the order they appear in the archive. -q (Quickly) append the specified files to the archive. If the archive does not exist a new archive file is created. Much faster than the -r option, when creating a large archive piece- by-piece, as no checking is done to see if the files already exist in the archive. -r Replace or add the specified files to the archive. If the archive does not exist a new archive file is created. Files that replace existing files do not change the order of the files within the archive. New files are appended to the archive unless one of the options -a, -b or -i is specified. -T Select and/or name archive members using only the first fifteen characters of the archive member or command line file name. The historic archive format had sixteen bytes for the name, but some historic archiver and loader implementations were unable to handle names that used the entire space. This means that file names that are not unique in their first fifteen characters can subsequently be confused. A warning message is printed to the standard error output if any file names are truncated. (See ar(5) for more information.) -L Used the extended format to allow long archive member names. This is the default. -s Write an object-file index into the archive, or update an existing one, even if no other change is made to the archive. You may use this modifier flag either with any operation, or alone. Running `ar s' on an archive is equivalent to running `ranlib' on it. -S Do not generate an archive symbol table. This can speed up building a large library in several steps. The resulting archive can not be used with the linker. In order to build a symbol table, you must omit the S modifier on the last execution of ar, or you must run ranlib on the archive. -t List the specified files in the order in which they appear in the archive, each on a separate line. If no files are specified, all files in the archive are listed. -u Update files. When used with the -r option, files in the archive will be replaced only if the disk file has a newer modification time than the file in the archive. When used with the -x option, files in the archive will be extracted only if the archive file has a newer modification time than the file on disk. -v Provide verbose output. When used with the -d, -m, -q or -x options, ar gives a file-by-file description of the archive modification. This description consists of three, white-space separated fields: the option letter, a dash (``-'') and the file name. When used with the -r option, ar displays the description as above, but the initial letter is an ``a'' if the file is added to the archive and an ``r'' if the file replaces a file already in the archive. When used with the -p option, the name of each printed file is written to the standard output before the contents of the file, preceded by a single newline character, and followed by two newline characters, enclosed in less-than (``<'') and greater- than (``>'') characters. When used with the -t option, ar displays an ``ls -l'' style listing of information about the members of the archive. This listing consists of eight, white-space separated fields: the file permissions (see strmode(3) ), the decimal user and group ID's, separated by a single slash (``/''), the file size (in bytes), the file modification time (in the date(1) format ``%b %e %H:%M %Y''), and the name of the file. -x Extract the specified archive members into the files named by the command line arguments. If no members are specified, all the members of the archive are extracted into the current directory. If the file does not exist, it is created; if it does exist, the owner and group will be unchanged. The file access and modification times are the time of the extraction (but see the -o option). The file permissions will be set to those of the file when it was entered into the archive; this will fail if the user is not the owner of the extracted file or the super-user. The ar utility exits 0 on success, and >0 if an error occurs. ENVIRONMENT TMPDIR The pathname of the directory to use when creating temporary files. FILES /tmp default temporary file directory ar.XXXXXX temporary file names COMPATIBILITY By default, ar writes archives that may be incompatible with historic archives, as the format used for storing archive members with names longer than fifteen characters has changed. This implementation of ar is backward compatible with previous versions of ar in that it can read and write (using the -T option) historic archives. The -T option is provided for compatibility only, and will be deleted in a future release. See ar(5) for more information. STANDARDS The ar utility is expected to offer a superset of the IEEE Std 1003.2 (“POSIX.2”) functionality. SEE ALSO ld(1), ranlib(1), strmode(3), ar(5) Darwin July 27, 2005 Darwin
|
ar – create and maintain library archives
|
ar -d [-TLsv] archive file ... ar -m [-TLsv] archive file ... ar -m [-abiTLsv] position archive file ... ar -p [-TLsv] archive [file ...] ar -q [-cTLsv] archive file ... ar -r [-cuTLsv] archive file ... ar -r [-abciuTLsv] position archive file ... ar -t [-TLsv] archive [file ...] ar -x [-ouTLsv] archive [file ...]
| null | null |
who
|
The who utility displays information about currently logged in users. By default, this includes the login name, tty name, date and time of login and remote hostname if not local. The options are as follows: -a Equivalent to -bTu, with the exception that output is not restricted to the time and date of the last system reboot. -b Write the time and date of the last system reboot. -H Write column headings above the output. -m Show information about the terminal attached to standard input only. -q “Quick mode”: List the names and number of logged in users in columns. All other command line options are ignored. -s Show the name, line and time fields only. This is the default. -T Indicate whether each user is accepting messages. One of the following characters is written: + User is accepting messages. - User is not accepting messages. ? An error occurred. -u Show idle time for each user in hours and minutes as hh:mm, ‘.’ if the user has been idle less than a minute, and “old” if the user has been idle more than 24 hours. am I Equivalent to -m. By default, who gathers information from the file /var/run/utmpx. An alternate file may be specified which is usually /var/log/utx.log (or /var/log/utx.log.[0-6] depending on site policy as utx.log can grow quite large and daily versions may or may not be kept around after compression by ac(8)). The utx.log file contains a record of every login, logout, crash, shutdown and date change since utx.log was last truncated or created. If /var/log/utx.log is being used as the file, the user name may be empty or one of the special characters '|', '}' and '~'. Logouts produce an output line without any user name. For more information on the special characters, see getutxent(3). ENVIRONMENT The COLUMNS, LANG, LC_ALL and LC_TIME environment variables affect the execution of who as described in environ(7). FILES /var/run/utmpx EXIT STATUS The who utility exits 0 on success, and >0 if an error occurs.
|
who – display who is on the system
|
who [-abHmqsTu] [am I] [file]
| null |
Show a brief summary of who is logged in: $ who -q fernape root root # users = 3 Show who is logged in along with the line and time fields (without the headers): $ who -s fernape ttyv0 Aug 26 16:23 root ttyv1 Aug 26 16:23 root ttyv2 Aug 26 16:23 Show information about the terminal attached to standard input: $ who am i fernape Aug 26 16:24 Show time and date of the last system reboot, whether the users accept messages and the idle time for each of them: $ who -a - system boot Aug 26 16:23 . fernape - ttyv0 Aug 26 16:23 . root - ttyv1 Aug 26 16:23 . root - ttyv2 Aug 26 16:23 . Same as above but showing headers: $ who -aH NAME S LINE TIME IDLE FROM - system boot Aug 26 16:23 . fernape - ttyv0 Aug 26 16:23 . root - ttyv1 Aug 26 16:23 00:01 root - ttyv2 Aug 26 16:23 00:01 SEE ALSO last(1), users(1), w(1), getutxent(3) STANDARDS The who utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). HISTORY A who command appeared in Version 1 AT&T UNIX. macOS 14.5 August 30, 2020 macOS 14.5
|
mktemp
|
The mktemp utility takes each of the given file name templates and overwrites a portion of it to create a file name. This file name is unique and suitable for use by the application. The template may be any file name with some number of ‘Xs’ appended to it, for example /tmp/temp.XXXX. The trailing ‘Xs’ are replaced with the current process number and/or a unique letter combination. The number of unique file names mktemp can return depends on the number of ‘Xs’ provided; six ‘Xs’ will result in mktemp selecting 1 of 56800235584 (62 ** 6) possible file names. On case-insensitive file systems, the effective number of unique names is significantly less; given six ‘Xs’, mktemp will instead select 1 of 2176782336 (36 ** 6) possible unique file names. If mktemp can successfully generate a unique file name, the file is created with mode 0600 (unless the -u flag is given) and the filename is printed to standard output. If the -t prefix option is given, mktemp will generate a template string based on the prefix and the _CS_DARWIN_USER_TEMP_DIR configuration variable if available. Fallback locations if _CS_DARWIN_USER_TEMP_DIR is not available are TMPDIR, the -p option's tmpdir if set, and /tmp. Care should be taken to ensure that it is appropriate to use an environment variable potentially supplied by the user. If no arguments are passed or if only the -d flag is passed mktemp behaves as if -t tmp was supplied. Any number of temporary files may be created in a single invocation, including one based on the internal template resulting from the -t flag. The mktemp utility is provided to allow shell scripts to safely use temporary files. Traditionally, many shell scripts take the name of the program with the pid as a suffix and use that as a temporary file name. This kind of naming scheme is predictable and the race condition it creates is easy for an attacker to win. A safer, though still inferior, approach is to make a temporary directory using the same naming scheme. While this does allow one to guarantee that a temporary file will not be subverted, it still allows a simple denial of service attack. For these reasons it is suggested that mktemp be used instead.
|
mktemp – make temporary file name (unique)
|
mktemp [-d] [-p tmpdir] [-q] [-t prefix] [-u] template ... mktemp [-d] [-p tmpdir] [-q] [-u] -t prefix
|
The available options are as follows: -d, --directory Make a directory instead of a file. -p tmpdir, --tmpdir[=tmpdir] Use tmpdir for the -t flag if the TMPDIR environment variable is not set. Additionally, any provided template arguments will be interpreted relative to the path specified as tmpdir. If tmpdir is either empty or omitted, then the TMPDIR environment variable will be used. -q, --quiet Fail silently if an error occurs. This is useful if a script does not want error output to go to standard error. -t prefix Generate a template (using the supplied prefix and TMPDIR if set) to create a filename template. -u, --dry-run Operate in “unsafe” mode. The temp file will be unlinked before mktemp exits. This is slightly better than mktemp(3) but still introduces a race condition. Use of this option is not encouraged. EXIT STATUS The mktemp utility exits 0 on success, and >0 if an error occurs.
|
The following sh(1) fragment illustrates a simple use of mktemp where the script should quit if it cannot get a safe temporary file. tempfoo=`basename $0` TMPFILE=`mktemp /tmp/${tempfoo}.XXXXXX` || exit 1 echo "program output" >> $TMPFILE To allow the use of $TMPDIR: tempfoo=`basename $0` TMPFILE=`mktemp -t ${tempfoo}` || exit 1 echo "program output" >> $TMPFILE In this case, we want the script to catch the error itself. tempfoo=`basename $0` TMPFILE=`mktemp -q /tmp/${tempfoo}.XXXXXX` if [ $? -ne 0 ]; then echo "$0: Can't create temp file, exiting..." exit 1 fi SEE ALSO confstr(3), mkdtemp(3), mkstemp(3), mktemp(3), environ(7) HISTORY A mktemp utility appeared in OpenBSD 2.1. This implementation was written independently based on the OpenBSD man page, and first appeared in FreeBSD 2.2.7. This man page is taken from OpenBSD. macOS 14.5 August 4, 2022 macOS 14.5
|
unifdef
|
The unifdef utility selectively processes conditional cpp(1) directives. It removes from a file both the directives and any additional text that they specify should be removed, while otherwise leaving the file alone. The unifdef utility acts on #if, #ifdef, #ifndef, #elif, #else, and #endif lines. A directive is only processed if the symbols specified on the command line are sufficient to allow unifdef to get a definite value for its control expression. If the result is false, the directive and the following lines under its control are removed. If the result is true, only the directive is removed. An #ifdef or #ifndef directive is passed through unchanged if its controlling symbol is not specified on the command line. Any #if or #elif control expression that has an unknown value or that unifdef cannot parse is passed through unchanged. By default, unifdef ignores #if and #elif lines with constant expressions; it can be told to process them by specifying the -k flag on the command line. It understands a commonly-used subset of the expression syntax for #if and #elif lines: integer constants, integer values of symbols defined on the command line, the defined() operator, the operators !, <, >, <=, >=, ==, !=, &&, ||, and parenthesized expressions. A kind of “short circuit” evaluation is used for the && operator: if either operand is definitely false then the result is false, even if the value of the other operand is unknown. Similarly, if either operand of || is definitely true then the result is true. In most cases, the unifdef utility does not distinguish between object- like macros (without arguments) and function-like arguments (with arguments). If a macro is not explicitly defined, or is defined with the -D flag on the command-line, its arguments are ignored. If a macro is explicitly undefined on the command line with the -U flag, it may not have any arguments since this leads to a syntax error. The unifdef utility understands just enough about C to know when one of the directives is inactive because it is inside a comment, or affected by a backslash-continued line. It spots unusually-formatted preprocessor directives and knows when the layout is too odd for it to handle. A script called unifdefall can be used to remove all conditional cpp(1) directives from a file. It uses unifdef -s and cpp -dM to get lists of all the controlling symbols and their definitions (or lack thereof), then invokes unifdef with appropriate arguments to process the file.
|
unifdef, unifdefall – remove preprocessor conditionals from code
|
unifdef [-bBcdeKknsStV] [-Ipath] [-Dsym[=val]] [-Usym] [-iDsym[=val]] [-iUsym] ... [-o outfile] [infile] unifdefall [-Ipath] ... file
|
-Dsym=val Specify that a symbol is defined to a given value which is used when evaluating #if and #elif control expressions. -Dsym Specify that a symbol is defined to the value 1. -Usym Specify that a symbol is undefined. If the same symbol appears in more than one argument, the last occurrence dominates. -b Replace removed lines with blank lines instead of deleting them. Mutually exclusive with the -B option. -B Compress blank lines around a deleted section. Mutually exclusive with the -b option. -c If the -c flag is specified, then the operation of unifdef is complemented, i.e., the lines that would have been removed or blanked are retained and vice versa. -d Turn on printing of debugging messages. -e Because unifdef processes its input one line at a time, it cannot remove preprocessor directives that span more than one line. The most common example of this is a directive with a multi-line comment hanging off its right hand end. By default, if unifdef has to process such a directive, it will complain that the line is too obfuscated. The -e option changes the behaviour so that, where possible, such lines are left unprocessed instead of reporting an error. -K Always treat the result of && and || operators as unknown if either operand is unknown, instead of short-circuiting when unknown operands can't affect the result. This option is for compatibility with older versions of unifdef. -k Process #if and #elif lines with constant expressions. By default, sections controlled by such lines are passed through unchanged because they typically start “#if 0” and are used as a kind of comment to sketch out future or past development. It would be rude to strip them out, just as it would be for normal comments. -n Add #line directives to the output following any deleted lines, so that errors produced when compiling the output file correspond to line numbers in the input file. -o outfile Write output to the file outfile instead of the standard output. If outfile is the same as the input file, the output is written to a temporary file which is renamed into place when unifdef completes successfully. -s Instead of processing the input file as usual, this option causes unifdef to produce a list of symbols that appear in expressions that unifdef understands. It is useful in conjunction with the -dM option of cpp(1) for creating unifdef command lines. -S Like the -s option, but the nesting depth of each symbol is also printed. This is useful for working out the number of possible combinations of interdependent defined/undefined symbols. -t Disables parsing for C comments and line continuations, which is useful for plain text. -iDsym[=val] -iUsym Ignore #ifdefs. If your C code uses #ifdefs to delimit non-C lines, such as comments or code which is under construction, then you must tell unifdef which symbols are used for that purpose so that it will not try to parse comments and line continuations inside those #ifdefs. You can specify ignored symbols with -iDsym[=val] and -iUsym similar to -Dsym[=val] and -Usym above. -Ipath Specifies to unifdefall an additional place to look for #include files. This option is ignored by unifdef for compatibility with cpp(1) and to simplify the implementation of unifdefall. -V Print version details. The unifdef utility copies its output to stdout and will take its input from stdin if no file argument is given. The unifdef utility works nicely with the -Dsym option of diff(1). EXIT STATUS The unifdef utility exits 0 if the output is an exact copy of the input, 1 if not, and 2 if in trouble. DIAGNOSTICS Too many levels of nesting. Inappropriate #elif, #else or #endif. Obfuscated preprocessor control line. Premature EOF (with the line number of the most recent unterminated #if). EOF in comment. SEE ALSO cpp(1), diff(1) HISTORY The unifdef command appeared in 2.9BSD. ANSI C support was added in FreeBSD 4.7. AUTHORS The original implementation was written by Dave Yost ⟨Dave@Yost.com⟩. Tony Finch ⟨dot@dotat.at⟩ rewrote it to support ANSI C. BUGS Expression evaluation is very limited. Preprocessor control lines split across more than one physical line (because of comments or backslash-newline) cannot be handled in every situation. Trigraphs are not recognized. There is no support for symbols with different definitions at different points in the source file. The text-mode and ignore functionality does not correspond to modern cpp(1) behaviour. macOS 14.5 March 11, 2010 macOS 14.5
| null |
yaa
|
aa creates and manipulates Apple Archives COMMANDS archive Archive the contents of the target directory append Archive the contents of the target directory, append to an existing archive file extract Extract the contents of an archive to the target directory list List the contents of an archive convert Convert an archive into another archive manifest Alias for 'archive -manifest' verify Compare the contents of the target directory with a manifest check-and-fix Verify and fix the contents of the target directory using an error correcting manifest
|
aa – Manipulate Apple Archives
|
aa command [options]
|
-v Increase verbosity. Default is silent operation. -h Print usage and exit. -d -dir Target directory for archive/extract. Default is the current directory. -i -input_file Input file. Default is stdin. -o -output_file Output file. Default is stdout. -subdir -subdir Path to archive under dir. subdir will be included in the archived paths, and extracted. Default is empty. -D -dir_and_subdir Set both dir to `dirname dir_and_subdir` and subdir to `basename dir_and_subdir`. -x Do not cross volume boundaries when archiving. -p Generate destination path automatically based on source path. For example 'aa archive -d foo -p' becomes 'aa archive -d foo -o foo.aar'. -a -algorithm Compression algorithm used when creating archives. One of lzfse, lzma, lz4, zlib, raw. Default is lzfse. -b -block_size Block size used when compressing archives, a number with optional b, k, m, g suffix (bytes are assumed if no suffix is specified). Default is 4m for archive and 1m for the other commands. -t -worker_threads Number of worker threads compressing/decompressing data. Default is the number of physical CPU on the running machine. -wt -writer_threads Number of writer threads extracting archive content. Default is to match worker_threads. -enable-dedup -(-no-enable-dedup) If set, and SLC fields (the SLC field identifies a cluster of regular files with identical content) are present in the archive, files with same data will be extracted as clones. Note that to create such an archive, you have to manually add the SLC field, for example `aa archive -o archive.aa -include-field SLC ...`. In this case, aa marks files with identical content as a cluster and shows a summary at the end. There is no way to deduplicate the data in the archive (by storing the data only once) from the command line. To achieve this, use the API and pass the `AA_FLAG_ARCHIVE_DEDUPLICATE_DAT` flag. -enable-holes -(-no-enable-holes) If set, and the filesystem supports it, detect and create holes in files to store 0-filled segments -ignore-eperm -(-no-ignore-eperm) If set, ignore EPERM (operation not permitted) errors when setting files attributes -manifest Alias for the following options: -exclude-field dat -include-field sh2,siz,idx,idz -a lzfse -b 1m -imanifest -input_manifest_file Manifest matching the input archive. Can be used in conjonction with the entry selection options to accelerate processing -omanifest -output_manifest_file Receives a manifest of the output archive -list-format -format Output format for the list command, one of text, json. Default is text ENTRY SELECTION OPTIONS -include-path and -include-path-list options are applied first to select an initial set of entries, then -exclude-path, -exclude-path-list, -exclude-name, -exclude-regex are applied to remove entries from this set. If no -include-path or -include-path-list option is given, all entries are included in the initial set. If a directory is included/excluded, the entire sub-tree is included/excluded. -include-path -path Include entry paths having path as a prefix. This option can be given multiple times. -exclude-path -path Exclude entry paths having path as a prefix. This option can be given multiple times. -include-path-list -path_list_file File containing a list of paths to include, one entry per line. This option can be given multiple times. -exclude-path-list -path_list_file File containing a list of paths to exclude, one entry per line. This option can be given multiple times. -include-regex -expr Include entry paths matching regular expression expr, see re_format(7). This option can be given multiple times. -exclude-regex -expr Exclude entry paths matching regular expression expr, see re_format(7). This option can be given multiple times. -exclude-name -name Exclude entry paths where a single component of the path matches exactly name. This option can be given multiple times. --include-type -<type_spec> Include only entries matching the given types. <type_spec> is a word containing one or more of the entry type characters listed below. -exclude-type -<type_spec> Include only entries not matching the given types. <type_spec> is a word containing one or more of the entry type characters listed below. -include-field -<field_spec> Add the given fields to the set of field keys. This option can be given multiple times. <field_spec> is a comma separated list of entry field keys listed below. -exclude-field -<field_spec> Remove the given fields from the set of field keys. This option can be given multiple times. <field_spec> is a comma separated list of entry field keys listed below. ENCRYPTION OPTIONS When archiving, encryption is selected by one of the -password..., -key..., or -recipient-pub options. The archive will be signed if a private key is specified with -sign-priv. With the currently available profiles, public/private keys are on the Elliptic Curve P-256, and symmetric keys are 256-bit long. -keychain Use Keychain to load/store symmetric keys and passwords -password -file File containing encryption password. When encrypting, and if -password-gen is passed, receives the generated password. Can be - to print the password to standard output. --password-value -password Password. -password-gen When encrypting, generate a new random password. It is recommended to always use this option, in conjonction with -keychain to store the password in the Keychain, or -password to store the password in a file or print it. -key -file File containing encryption symmetric key. When encrypting, and if -key-gen is passed, receives the generated key. -key-value -key Symmetric key, either "hex:<64 hex digits>" or "base64:<32 bytes encoded using base64>". -key-gen When encrypting, generate a new random symmetric key. -recipient-pub -file Recipient public key for encryption. The corresponding private key is required to decrypt the archive. -recipient-priv -file Recipient private key for decryption. The archive must have been encrypted against the corresponding public key. -sign-pub -file Signing public key for decryption. The archive must have been signed with the corresponding private key. -sign-priv -file Signing private key for encryption. The corresponding public key is required to decrypt and authenticate the archive. ENTRY TYPES b block special c character special d directory f regular file l symbolic link m metadata p fifo s socket ENTRY FIELDS typ entry type pat path lnk link path dev device id uid user id gid group id mod access permissions flg flags mtm modification time ctm creation time btm backup time xat extended attributes acl access control list cks CRC32 checksum sh1 SHA1 digest sh2 SHA2-256 digest dat file contents siz file size duz disk usage idx entry index in main archive yec file data error correcting codes yaf Apple Archive fields (in metadata entry) all alias for all fields (exclude only) attr alias for uid,gid,mod,flg,mtm,btm,ctm
|
Archive the contents of directory foo into archive foo.aar, using LZMA compression with 8 MB blocks aa archive -d foo -o foo.aar -a lzma -b 8m Extract the contents of foo.aar in directory dst aa extract -d dst -i foo.aar Create a manifest of the contents of directory foo into foo.manifest, using LZFSE compression with 1 MB blocks aa manifest -d foo -o foo.manifest -a lzfse -b 1m Verify the contents of dst match the manifest foo.manifest aa verify -i foo.manifest -d dst -v Print all entry paths in foo.manifest aa list -i foo.manifest Print all entry paths, uid, gid for regular files in foo.manifest aa list -v -i foo.manifest -include-type f -exclude-field all -include- field uid,gid,pat Create a manifest of the contents of archive foo.aar in foo.manifest aa convert -manifest -v -i foo.aar -o foo.manifest Extract a subset of entries matching prefix Applications/Mail.app from archive foo.aar in directory dst aa extract -i foo.aar -include-path Applications/Mail.app -d dst Archive and encrypt directory foo to archive foo.aea, generating a random password and storing it in the Keychain aa archive -d foo -o foo.aea -keychain -password-gen Decrypt and extract archive foo.aea to directory dst, obtaining the password from the Keychain (requires local authentication) aa extract -o foo.aea -d dst -keychain Archive directory foo to archive foo.aar aa archive -p -d foo Extract archive foo.aar to directory foo aa extract -p -i foo.aar macOS March 9, 2020 macOS
|
cut
|
The cut utility cuts out selected portions of each line (as specified by list) from each file and writes them to the standard output. If no file arguments are specified, or a file argument is a single dash (‘-’), cut reads from the standard input. The items specified by list can be in terms of column position or in terms of fields delimited by a special character. Column and field numbering start from 1. The list option argument is a comma or whitespace separated set of numbers and/or number ranges. Number ranges consist of a number, a dash (‘-’), and a second number and select the columns or fields from the first number to the second, inclusive. Numbers or number ranges may be preceded by a dash, which selects all columns or fields from 1 to the last number. Numbers or number ranges may be followed by a dash, which selects all columns or fields from the last number to the end of the line. Numbers and number ranges may be repeated, overlapping, and in any order. If a field or column is specified multiple times, it will appear only once in the output. It is not an error to select columns or fields not present in the input line. The options are as follows: -b list The list specifies byte positions. -c list The list specifies character positions. -d delim Use delim as the field delimiter character instead of the tab character. -f list The list specifies fields, separated in the input by the field delimiter character (see the -d option). Output fields are separated by a single occurrence of the field delimiter character. -n Do not split multi-byte characters. Characters will only be output if at least one byte is selected, and, after a prefix of zero or more unselected bytes, the rest of the bytes that form the character are selected. -s Suppress lines with no field delimiter characters. Unless specified, lines with no delimiters are passed through unmodified. -w Use whitespace (spaces and tabs) as the delimiter. Consecutive spaces and tabs count as one single field separator. ENVIRONMENT The LANG, LC_ALL and LC_CTYPE environment variables affect the execution of cut as described in environ(7). EXIT STATUS The cut utility exits 0 on success, and >0 if an error occurs.
|
cut – cut out selected portions of each line of a file
|
cut -b list [-n] [file ...] cut -c list [file ...] cut -f list [-w | -d delim] [-s] [file ...]
| null |
Extract users' login names and shells from the system passwd(5) file as “name:shell” pairs: cut -d : -f 1,7 /etc/passwd Show the names and login times of the currently logged in users: who | cut -c 1-16,26-38 SEE ALSO colrm(1), paste(1) STANDARDS The cut utility conforms to IEEE Std 1003.2-1992 (“POSIX.2”). The -w flag is an extension to the specification. HISTORY A cut command appeared in AT&T System III UNIX. macOS 14.5 August 3, 2017 macOS 14.5
|
imptrace
|
The imptrace utility displays a trace of importance donation events. Importance donation is used by adaptive jobs on the system to manage their priority on the system. See xpc_transaction_begin(3) and launchd.plist(5) for more information about the mechanism and its use. The options are as follows: -i Show internal kernel boosts -s Show stacks for internal boosts. -p pid Limit events to the process identified by pid. -d Display raw Dtrace output; do not reformat timestamps and sort output. The traced events are as follows: BOOSTED The specified process has received a boost and transitioned out of the background. UNBOOST The specified process has dropped its last remaining boost and transitioned back into the background. Recv Boost The specified process has received a boost and accepted ownership of that boost in userspace, usually by dequeuing the boosting message. Drop Boost The specified process has dropped a boost. ____ Int Boost Internal boost events are only emitted when tracking of kernel internal boosts is activated with the -i option. Their use and meaning is subject to change and dependent on the implementation details of importance donation.
|
imptrace – report importance donation events in real time
|
imptrace [-i [-s]] [-p pid] [-d]
| null |
The imptrace script will output one line for each event, for example a typical boosting exchange might look as follows: 0000:00:00.000000000 EVENT PROCESS BOOSTS NOTES 0023:15:13.844332886 BOOSTED 22:configd 0023:15:13.844372519 Recv Boost 22:configd 1 from 275:SystemUIServer 0023:15:13.844497860 UNBOOST 22:configd Boosted for 0 ms 0023:15:13.844509452 Drop Boost 22:configd 0 In this case, SystemUIServer (PID 275) has sent a message to configd (PID 22) which caused it to be boosted. configd then dropped the boost causing it to be become unboosted and return to background state. Boosted and unboost events may appear before the triggering recv or drop boost. NOTES imptrace is implemented using Dtrace. For information about the probes used, see comments in the imptrace source. When debugging an adaptive service, it may be helpful to combine these probes with other Dtrace providers; however, they should be considered unstable. OS X May 1, 2013 OS X
|
pack200
| null | null | null | null | null |
ippeveprinter
|
ippeveprinter is a simple Internet Printing Protocol (IPP) server conforming to the IPP Everywhere (PWG 5100.14) specification. It can be used to test client software or act as a very basic print server that runs a command for every job that is printed.
|
ippeveprinter - an ipp everywhere printer application for cups
|
ippeveprinter [ --help ] [ --no-web-forms ] [ --pam-service service ] [ --version ] [ -2 ] [ -A ] [ -D device-uri ] [ -F output-type/subtype ] [ -K keypath ] [ -M manufacturer ] [ -P filename.ppd ] [ -V ipp-version ] [ -a filename.conf ] [ -c command ] [ -d spool-directory ] [ -f type/subtype[,...] ] [ -i iconfile.png ] [ -k ] [ -l location ] [ -m model ] [ -n hostname ] [ -p port ] [ -r subtype[,subtype] ] [ -s speed[,color-speed] ] [ -v[vvv] ] service-name
|
The following options are recognized by ippeveprinter: --help Show program usage. --no-web-forms Disable the web interface forms used to update the media and supply levels. --pam-service service Set the PAM service name. The default service is "cups". --version Show the CUPS version. -2 Report support for two-sided (duplex) printing. -A Enable authentication for the created printer. ippeveprinter uses PAM to authenticate HTTP Basic credentials. -D device-uri Set the device URI for print output. The URI can be a filename, directory, or a network socket URI of the form "socket://ADDRESS[:PORT]" (where the default port number is 9100). When specifying a directory, ippeveprinter will create an output file using the job ID and name. -F output-type/subtype[,...] Specifies the output MIME media type. The default is "application/postscript" when the -P option is specified. -M manufacturer Set the manufacturer of the printer. The default is "Example". -P filename.ppd Load printer attributes from the specified PPD file. This option is typically used in conjunction with the ippeveps(7) printer command ("-c ippeveps"). -V 1.1 -V 2.0 Specifies the maximum IPP version to report. 2.0 is the default. -c command Run the specified command for each document that is printed. If "command" is not an absolute path ("/path/to/command"), ippeveprinter looks for the command in the "command" subdirectory of the CUPS binary directory, typically /usr/lib/cups/command or /usr/libexec/cups/command. The cups-config(1) command can be used to discover the correct binary directory ("cups-config --serverbin"). In addition, the CUPS_SERVERBIN environment variable can be used to override the default location of this directory - see the cups(1) man page for more details. -d spool-directory Specifies the directory that will hold the print files. The default is a directory under the user's current temporary directory. -f type/subtype[,...] Specifies a list of MIME media types that the server will accept. The default depends on the type of printer created. -i iconfile.png Specifies the printer icon file for the server. The file must be a PNG format image. The default is an internally-provided PNG image. -k Keeps the print documents in the spool directory rather than deleting them. -l location Specifies the human-readable location string that is reported by the server. The default is the empty string. -m model Specifies the model name of the printer. The default is "Printer". -n hostname Specifies the hostname that is reported by the server. The default is the name returned by the hostname(1) command. -p port Specifies the port number to listen on. The default is a user- specific number from 8000 to 8999. -r off Turns off DNS-SD service advertisements entirely. -r subtype[,subtype] Specifies the DNS-SD subtype(s) to advertise. Separate multiple subtypes with a comma. The default is "_print". -s speed[,color-speed] Specifies the printer speed in pages per minute. If two numbers are specified and the second number is greater than zero, the server will report support for color printing. The default is "10,0". -v[vvv] Be (very) verbose when logging activity to standard error. EXIT STATUS The ippeveprinter program returns 1 if it is unable to process the command-line arguments or register the IPP service. Otherwise ippeveprinter will run continuously until terminated. CONFORMING TO The ippeveprinter program is unique to CUPS and conforms to the IPP Everywhere (PWG 5100.14) specification. ENVIRONMENT ippeveprinter adds environment variables starting with "IPP_" for all IPP Job attributes in the print request. For example, when executing a command for an IPP Job containing the "media" Job Template attribute, the "IPP_MEDIA" environment variable will be set to the value of that attribute. In addition, all IPP "xxx-default" and "pwg-xxx" Printer Description attributes are added to the environment. For example, the "IPP_MEDIA_DEFAULT" environment variable will be set to the default value for the "media" Job Template attribute. Enumerated values are converted to their keyword equivalents. For example, a "print-quality" Job Template attribute with a enum value of 3 will become the "IPP_PRINT_QUALITY" environment variable with a value of "draft". This string conversion only happens for standard Job Template attributes, currently "finishings", "orientation-requested", and "print-quality". Finally, the "CONTENT_TYPE" environment variable contains the MIME media type of the document being printed, the "DEVICE_URI" environment variable contains the device URI as specified with the "-D" option, the "OUTPUT_FORMAT" environment variable contains the output MIME media type, and the "PPD" environment variable contains the PPD filename as specified with the "-P" option. COMMAND OUTPUT Unless they communicate directly with a printer, print commands send printer-ready data to the standard output. Print commands can send messages back to ippeveprinter on the standard error with one of the following prefixes: ATTR: attribute=value[ attribute=value] Sets the named attribute(s) to the given values. Currently only the "job-impressions" and "job-impressions-completed" Job Status attributes and the "marker-xxx", "printer-alert", "printer-alert- description", "printer-supply", and "printer-supply-description" Printer Status attributes can be set. DEBUG: Debugging message Logs a debugging message if at least two -v's have been specified. ERROR: Error message Logs an error message and copies the message to the "job-state- message" attribute. INFO: Informational message Logs an informational/progress message if -v has been specified and copies the message to the "job-state-message" attribute unless an error has been reported. STATE: keyword[,keyword,...] Sets the printer's "printer-state-reasons" attribute to the listed keywords. STATE: -keyword[,keyword,...] Removes the listed keywords from the printer's "printer-state- reasons" attribute. STATE: +keyword[,keyword,...] Adds the listed keywords to the printer's "printer-state-reasons" attribute.
|
Run ippeveprinter with a service name of My Cool Printer: ippeveprinter "My Cool Printer" Run the file(1) command whenever a job is sent to the server: ippeveprinter -c /usr/bin/file "My Cool Printer" SEE ALSO ippevepcl(7), ippeveps(7), PWG Internet Printing Protocol Workgroup (http://www.pwg.org/ipp) COPYRIGHT Copyright © 2007-2019 by Apple Inc. 2 December 2019 CUPS ippeveprinter(1)
|
hdid
|
Historically, hdid was both the tool used to attach a disk image and the user process used to load and decompress disk image data for the hard disk image (HDI) driver in Mac OS X. hdid exists only for backwards compatibility. As of Mac OS X 10.4, hdid invokes hdiutil attach -agent hdid which causes hdiutil(1) to behave like the historical hdid. For example, some of hdiutil attach's more modern behaviors (such as verifying images which haven't been verified before) are disabled. hdiutil(1) should be used instead of hdid. SEE ALSO hdiutil(1) macOS 16 Aug 2013 macOS
|
hdid – historical mechanism for attaching disk images
|
hdid [options] image
| null | null |
dc
|
dc(1) is an arbitrary-precision calculator. It uses a stack (reverse Polish notation) to store numbers and results of computations. Arithmetic operations pop arguments off of the stack and push the results. If no files are given on the command-line, then dc(1) reads from stdin (see the STDIN section). Otherwise, those files are processed, and dc(1) will then exit. If a user wants to set up a standard environment, they can use DC_ENV_ARGS (see the ENVIRONMENT VARIABLES section). For example, if a user wants the scale always set to 10, they can set DC_ENV_ARGS to -e 10k, and this dc(1) will always start with a scale of 10.
|
dc - arbitrary-precision decimal reverse-Polish notation calculator
|
dc [-cChiPRvVx] [--version] [--help] [--digit-clamp] [--no-digit-clamp] [--interactive] [--no-prompt] [--no-read-prompt] [--extended-register] [-e expr] [--expression=expr...] [-f file...] [--file=file...] [file...] [-I ibase] [--ibase=ibase] [-O obase] [--obase=obase] [-S scale] [--scale=scale] [-E seed] [--seed=seed]
|
The following are the options that dc(1) accepts. -C, --no-digit-clamp Disables clamping of digits greater than or equal to the current ibase when parsing numbers. This means that the value added to a number from a digit is always that digit’s value multiplied by the value of ibase raised to the power of the digit’s position, which starts from 0 at the least significant digit. If this and/or the -c or --digit-clamp options are given multiple times, the last one given is used. This option overrides the DC_DIGIT_CLAMP environment variable (see the ENVIRONMENT VARIABLES section) and the default, which can be queried with the -h or --help options. This is a non-portable extension. -c, --digit-clamp Enables clamping of digits greater than or equal to the current ibase when parsing numbers. This means that digits that the value added to a number from a digit that is greater than or equal to the ibase is the value of ibase minus 1 all multiplied by the value of ibase raised to the power of the digit’s position, which starts from 0 at the least significant digit. If this and/or the -C or --no-digit-clamp options are given multiple times, the last one given is used. This option overrides the DC_DIGIT_CLAMP environment variable (see the ENVIRONMENT VARIABLES section) and the default, which can be queried with the -h or --help options. This is a non-portable extension. -E seed, --seed=seed Sets the builtin variable seed to the value seed assuming that seed is in base 10. It is a fatal error if seed is not a valid number. If multiple instances of this option are given, the last is used. This is a non-portable extension. -e expr, --expression=expr Evaluates expr. If multiple expressions are given, they are evaluated in order. If files are given as well (see below), the expressions and files are evaluated in the order given. This means that if a file is given before an expression, the file is read in and evaluated first. If this option is given on the command-line (i.e., not in DC_ENV_ARGS, see the ENVIRONMENT VARIABLES section), then after processing all expressions and files, dc(1) will exit, unless - (stdin) was given as an argument at least once to -f or --file, whether on the command-line or in DC_ENV_ARGS. However, if any other -e, --expression, -f, or --file arguments are given after -f- or equivalent is given, dc(1) will give a fatal error and exit. This is a non-portable extension. -f file, --file=file Reads in file and evaluates it, line by line, as though it were read through stdin. If expressions are also given (see above), the expressions are evaluated in the order given. If this option is given on the command-line (i.e., not in DC_ENV_ARGS, see the ENVIRONMENT VARIABLES section), then after processing all expressions and files, dc(1) will exit, unless - (stdin) was given as an argument at least once to -f or --file. However, if any other -e, --expression, -f, or --file arguments are given after -f- or equivalent is given, dc(1) will give a fatal error and exit. This is a non-portable extension. -h, --help Prints a usage message and exits. -I ibase, --ibase=ibase Sets the builtin variable ibase to the value ibase assuming that ibase is in base 10. It is a fatal error if ibase is not a valid number. If multiple instances of this option are given, the last is used. This is a non-portable extension. -i, --interactive Forces interactive mode. (See the INTERACTIVE MODE section.) This is a non-portable extension. -L, --no-line-length Disables line length checking and prints numbers without backslashes and newlines. In other words, this option sets BC_LINE_LENGTH to 0 (see the ENVIRONMENT VARIABLES section). This is a non-portable extension. -O obase, --obase=obase Sets the builtin variable obase to the value obase assuming that obase is in base 10. It is a fatal error if obase is not a valid number. If multiple instances of this option are given, the last is used. This is a non-portable extension. -P, --no-prompt Disables the prompt in TTY mode. (The prompt is only enabled in TTY mode. See the TTY MODE section.) This is mostly for those users that do not want a prompt or are not used to having them in dc(1). Most of those users would want to put this option in DC_ENV_ARGS. These options override the DC_PROMPT and DC_TTY_MODE environment variables (see the ENVIRONMENT VARIABLES section). This is a non-portable extension. -R, --no-read-prompt Disables the read prompt in TTY mode. (The read prompt is only enabled in TTY mode. See the TTY MODE section.) This is mostly for those users that do not want a read prompt or are not used to having them in dc(1). Most of those users would want to put this option in BC_ENV_ARGS (see the ENVIRONMENT VARIABLES section). This option is also useful in hash bang lines of dc(1) scripts that prompt for user input. This option does not disable the regular prompt because the read prompt is only used when the ? command is used. These options do override the DC_PROMPT and DC_TTY_MODE environment variables (see the ENVIRONMENT VARIABLES section), but only for the read prompt. This is a non-portable extension. -S scale, --scale=scale Sets the builtin variable scale to the value scale assuming that scale is in base 10. It is a fatal error if scale is not a valid number. If multiple instances of this option are given, the last is used. This is a non-portable extension. -v, -V, --version Print the version information (copyright header) and exits. -x --extended-register Enables extended register mode. See the Extended Register Mode subsection of the REGISTERS section for more information. This is a non-portable extension. -z, --leading-zeroes Makes dc(1) print all numbers greater than -1 and less than 1, and not equal to 0, with a leading zero. This is a non-portable extension. All long options are non-portable extensions. STDIN If no files are given on the command-line and no files or expressions are given by the -f, --file, -e, or --expression options, then dc(1) reads from stdin. However, there is a caveat to this. First, stdin is evaluated a line at a time. The only exception to this is if a string has been finished, but not ended. This means that, except for escaped brackets, all brackets must be balanced before dc(1) parses and executes. STDOUT Any non-error output is written to stdout. In addition, if history (see the HISTORY section) and the prompt (see the TTY MODE section) are enabled, both are output to stdout. Note: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the EXIT STATUS section) if it cannot write to stdout, so if stdout is closed, as in dc >&-, it will quit with an error. This is done so that dc(1) can report problems when stdout is redirected to a file. If there are scripts that depend on the behavior of other dc(1) implementations, it is recommended that those scripts be changed to redirect stdout to /dev/null. STDERR Any error output is written to stderr. Note: Unlike other dc(1) implementations, this dc(1) will issue a fatal error (see the EXIT STATUS section) if it cannot write to stderr, so if stderr is closed, as in dc 2>&-, it will quit with an error. This is done so that dc(1) can exit with an error code when stderr is redirected to a file. If there are scripts that depend on the behavior of other dc(1) implementations, it is recommended that those scripts be changed to redirect stderr to /dev/null. SYNTAX Each item in the input source code, either a number (see the NUMBERS section) or a command (see the COMMANDS section), is processed and executed, in order. Input is processed immediately when entered. ibase is a register (see the REGISTERS section) that determines how to interpret constant numbers. It is the “input” base, or the number base used for interpreting input numbers. ibase is initially 10. The max allowable value for ibase is 16. The min allowable value for ibase is 2. The max allowable value for ibase can be queried in dc(1) programs with the T command. obase is a register (see the REGISTERS section) that determines how to output results. It is the “output” base, or the number base used for outputting numbers. obase is initially 10. The max allowable value for obase is DC_BASE_MAX and can be queried with the U command. The min allowable value for obase is 0. If obase is 0, values are output in scientific notation, and if obase is 1, values are output in engineering notation. Otherwise, values are output in the specified base. Outputting in scientific and engineering notations are non-portable extensions. The scale of an expression is the number of digits in the result of the expression right of the decimal point, and scale is a register (see the REGISTERS section) that sets the precision of any operations (with exceptions). scale is initially 0. scale cannot be negative. The max allowable value for scale can be queried in dc(1) programs with the V command. seed is a register containing the current seed for the pseudo-random number generator. If the current value of seed is queried and stored, then if it is assigned to seed later, the pseudo-random number generator is guaranteed to produce the same sequence of pseudo-random numbers that were generated after the value of seed was first queried. Multiple values assigned to seed can produce the same sequence of pseudo-random numbers. Likewise, when a value is assigned to seed, it is not guaranteed that querying seed immediately after will return the same value. In addition, the value of seed will change after any call to the ’ command or the “ command that does not get receive a value of 0 or 1. The maximum integer returned by the ’ command can be queried with the W command. Note: The values returned by the pseudo-random number generator with the ’ and “ commands are guaranteed to NOT be cryptographically secure. This is a consequence of using a seeded pseudo-random number generator. However, they are guaranteed to be reproducible with identical seed values. This means that the pseudo-random values from dc(1) should only be used where a reproducible stream of pseudo-random numbers is ESSENTIAL. In any other case, use a non-seeded pseudo-random number generator. The pseudo-random number generator, seed, and all associated operations are non-portable extensions. Comments Comments go from # until, and not including, the next newline. This is a non-portable extension. NUMBERS Numbers are strings made up of digits, uppercase letters up to F, and at most 1 period for a radix. Numbers can have up to DC_NUM_MAX digits. Uppercase letters are equal to 9 plus their position in the alphabet (i.e., A equals 10, or 9+1). If a digit or letter makes no sense with the current value of ibase (i.e., they are greater than or equal to the current value of ibase), then the behavior depends on the existence of the -c/--digit-clamp or -C/--no-digit-clamp options (see the OPTIONS section), the existence and setting of the DC_DIGIT_CLAMP environment variable (see the ENVIRONMENT VARIABLES section), or the default, which can be queried with the -h/--help option. If clamping is off, then digits or letters that are greater than or equal to the current value of ibase are not changed. Instead, their given value is multiplied by the appropriate power of ibase and added into the number. This means that, with an ibase of 3, the number AB is equal to 3^1*A+3^0*B, which is 3 times 10 plus 11, or 41. If clamping is on, then digits or letters that are greater than or equal to the current value of ibase are set to the value of the highest valid digit in ibase before being multiplied by the appropriate power of ibase and added into the number. This means that, with an ibase of 3, the number AB is equal to 3^1*2+3^0*2, which is 3 times 2 plus 2, or 8. There is one exception to clamping: single-character numbers (i.e., A alone). Such numbers are never clamped and always take the value they would have in the highest possible ibase. This means that A alone always equals decimal 10 and Z alone always equals decimal 35. This behavior is mandated by the standard for bc(1) (see the STANDARDS section) and is meant to provide an easy way to set the current ibase (with the i command) regardless of the current value of ibase. If clamping is on, and the clamped value of a character is needed, use a leading zero, i.e., for A, use 0A. In addition, dc(1) accepts numbers in scientific notation. These have the form <number>e<integer>. The exponent (the portion after the e) must be an integer. An example is 1.89237e9, which is equal to 1892370000. Negative exponents are also allowed, so 4.2890e_3 is equal to 0.0042890. WARNING: Both the number and the exponent in scientific notation are interpreted according to the current ibase, but the number is still multiplied by 10^exponent regardless of the current ibase. For example, if ibase is 16 and dc(1) is given the number string FFeA, the resulting decimal number will be 2550000000000, and if dc(1) is given the number string 10e_4, the resulting decimal number will be 0.0016. Accepting input as scientific notation is a non-portable extension. COMMANDS The valid commands are listed below. Printing These commands are used for printing. Note that both scientific notation and engineering notation are available for printing numbers. Scientific notation is activated by assigning 0 to obase using 0o, and engineering notation is activated by assigning 1 to obase using 1o. To deactivate them, just assign a different value to obase. Printing numbers in scientific notation and/or engineering notation is a non-portable extension. p Prints the value on top of the stack, whether number or string, and prints a newline after. This does not alter the stack. n Prints the value on top of the stack, whether number or string, and pops it off of the stack. P Pops a value off the stack. If the value is a number, it is truncated and the absolute value of the result is printed as though obase is 256 and each digit is interpreted as an 8-bit ASCII character, making it a byte stream. If the value is a string, it is printed without a trailing newline. This is a non-portable extension. f Prints the entire contents of the stack, in order from newest to oldest, without altering anything. Users should use this command when they get lost. Arithmetic These are the commands used for arithmetic. + The top two values are popped off the stack, added, and the result is pushed onto the stack. The scale of the result is equal to the max scale of both operands. - The top two values are popped off the stack, subtracted, and the result is pushed onto the stack. The scale of the result is equal to the max scale of both operands. * The top two values are popped off the stack, multiplied, and the result is pushed onto the stack. If a is the scale of the first expression and b is the scale of the second expression, the scale of the result is equal to min(a+b,max(scale,a,b)) where min() and max() return the obvious values. / The top two values are popped off the stack, divided, and the result is pushed onto the stack. The scale of the result is equal to scale. The first value popped off of the stack must be non-zero. % The top two values are popped off the stack, remaindered, and the result is pushed onto the stack. Remaindering is equivalent to 1) Computing a/b to current scale, and 2) Using the result of step 1 to calculate a-(a/b)*b to scale max(scale+scale(b),scale(a)). The first value popped off of the stack must be non-zero. ~ The top two values are popped off the stack, divided and remaindered, and the results (divided first, remainder second) are pushed onto the stack. This is equivalent to x y / x y % except that x and y are only evaluated once. The first value popped off of the stack must be non-zero. This is a non-portable extension. ^ The top two values are popped off the stack, the second is raised to the power of the first, and the result is pushed onto the stack. The scale of the result is equal to scale. The first value popped off of the stack must be an integer, and if that value is negative, the second value popped off of the stack must be non-zero. v The top value is popped off the stack, its square root is computed, and the result is pushed onto the stack. The scale of the result is equal to scale. The value popped off of the stack must be non-negative. _ If this command immediately precedes a number (i.e., no spaces or other commands), then that number is input as a negative number. Otherwise, the top value on the stack is popped and copied, and the copy is negated and pushed onto the stack. This behavior without a number is a non-portable extension. b The top value is popped off the stack, and if it is zero, it is pushed back onto the stack. Otherwise, its absolute value is pushed onto the stack. This is a non-portable extension. | The top three values are popped off the stack, a modular exponentiation is computed, and the result is pushed onto the stack. The first value popped is used as the reduction modulus and must be an integer and non-zero. The second value popped is used as the exponent and must be an integer and non-negative. The third value popped is the base and must be an integer. This is a non-portable extension. $ The top value is popped off the stack and copied, and the copy is truncated and pushed onto the stack. This is a non-portable extension. @ The top two values are popped off the stack, and the precision of the second is set to the value of the first, whether by truncation or extension. The first value popped off of the stack must be an integer and non-negative. This is a non-portable extension. H The top two values are popped off the stack, and the second is shifted left (radix shifted right) to the value of the first. The first value popped off of the stack must be an integer and non-negative. This is a non-portable extension. h The top two values are popped off the stack, and the second is shifted right (radix shifted left) to the value of the first. The first value popped off of the stack must be an integer and non-negative. This is a non-portable extension. G The top two values are popped off of the stack, they are compared, and a 1 is pushed if they are equal, or 0 otherwise. This is a non-portable extension. N The top value is popped off of the stack, and if it a 0, a 1 is pushed; otherwise, a 0 is pushed. This is a non-portable extension. ( The top two values are popped off of the stack, they are compared, and a 1 is pushed if the first is less than the second, or 0 otherwise. This is a non-portable extension. { The top two values are popped off of the stack, they are compared, and a 1 is pushed if the first is less than or equal to the second, or 0 otherwise. This is a non-portable extension. ) The top two values are popped off of the stack, they are compared, and a 1 is pushed if the first is greater than the second, or 0 otherwise. This is a non-portable extension. } The top two values are popped off of the stack, they are compared, and a 1 is pushed if the first is greater than or equal to the second, or 0 otherwise. This is a non-portable extension. M The top two values are popped off of the stack. If they are both non-zero, a 1 is pushed onto the stack. If either of them is zero, or both of them are, then a 0 is pushed onto the stack. This is like the && operator in bc(1), and it is not a short- circuit operator. This is a non-portable extension. m The top two values are popped off of the stack. If at least one of them is non-zero, a 1 is pushed onto the stack. If both of them are zero, then a 0 is pushed onto the stack. This is like the || operator in bc(1), and it is not a short- circuit operator. This is a non-portable extension. Pseudo-Random Number Generator dc(1) has a built-in pseudo-random number generator. These commands query the pseudo-random number generator. (See Parameters for more information about the seed value that controls the pseudo-random number generator.) The pseudo-random number generator is guaranteed to NOT be cryptographically secure. ’ Generates an integer between 0 and DC_RAND_MAX, inclusive (see the LIMITS section). The generated integer is made as unbiased as possible, subject to the limitations of the pseudo-random number generator. This is a non-portable extension. “ Pops a value off of the stack, which is used as an exclusive upper bound on the integer that will be generated. If the bound is negative or is a non-integer, an error is raised, and dc(1) resets (see the RESET section) while seed remains unchanged. If the bound is larger than DC_RAND_MAX, the higher bound is honored by generating several pseudo-random integers, multiplying them by appropriate powers of DC_RAND_MAX+1, and adding them together. Thus, the size of integer that can be generated with this command is unbounded. Using this command will change the value of seed, unless the operand is 0 or 1. In that case, 0 is pushed onto the stack, and seed is not changed. The generated integer is made as unbiased as possible, subject to the limitations of the pseudo-random number generator. This is a non-portable extension. Stack Control These commands control the stack. c Removes all items from (“clears”) the stack. d Copies the item on top of the stack (“duplicates”) and pushes the copy onto the stack. r Swaps (“reverses”) the two top items on the stack. R Pops (“removes”) the top value from the stack. Register Control These commands control registers (see the REGISTERS section). sr Pops the value off the top of the stack and stores it into register r. lr Copies the value in register r and pushes it onto the stack. This does not alter the contents of r. Sr Pops the value off the top of the (main) stack and pushes it onto the stack of register r. The previous value of the register becomes inaccessible. Lr Pops the value off the top of the stack for register r and push it onto the main stack. The previous value in the stack for register r, if any, is now accessible via the lr command. Parameters These commands control the values of ibase, obase, scale, and seed. Also see the SYNTAX section. i Pops the value off of the top of the stack and uses it to set ibase, which must be between 2 and 16, inclusive. If the value on top of the stack has any scale, the scale is ignored. o Pops the value off of the top of the stack and uses it to set obase, which must be between 0 and DC_BASE_MAX, inclusive (see the LIMITS section and the NUMBERS section). If the value on top of the stack has any scale, the scale is ignored. k Pops the value off of the top of the stack and uses it to set scale, which must be non-negative. If the value on top of the stack has any scale, the scale is ignored. j Pops the value off of the top of the stack and uses it to set seed. The meaning of seed is dependent on the current pseudo- random number generator but is guaranteed to not change except for new major versions. The scale and sign of the value may be significant. If a previously used seed value is used again, the pseudo-random number generator is guaranteed to produce the same sequence of pseudo-random numbers as it did when the seed value was previously used. The exact value assigned to seed is not guaranteed to be returned if the J command is used. However, if seed does return a different value, both values, when assigned to seed, are guaranteed to produce the same sequence of pseudo-random numbers. This means that certain values assigned to seed will not produce unique sequences of pseudo-random numbers. There is no limit to the length (number of significant decimal digits) or scale of the value that can be assigned to seed. This is a non-portable extension. I Pushes the current value of ibase onto the main stack. O Pushes the current value of obase onto the main stack. K Pushes the current value of scale onto the main stack. J Pushes the current value of seed onto the main stack. This is a non-portable extension. T Pushes the maximum allowable value of ibase onto the main stack. This is a non-portable extension. U Pushes the maximum allowable value of obase onto the main stack. This is a non-portable extension. V Pushes the maximum allowable value of scale onto the main stack. This is a non-portable extension. W Pushes the maximum (inclusive) integer that can be generated with the ’ pseudo-random number generator command. This is a non-portable extension. Strings The following commands control strings. dc(1) can work with both numbers and strings, and registers (see the REGISTERS section) can hold both strings and numbers. dc(1) always knows whether the contents of a register are a string or a number. While arithmetic operations have to have numbers, and will print an error if given a string, other commands accept strings. Strings can also be executed as macros. For example, if the string [1pR] is executed as a macro, then the code 1pR is executed, meaning that the 1 will be printed with a newline after and then popped from the stack. [characters] Makes a string containing characters and pushes it onto the stack. If there are brackets ([ and ]) in the string, then they must be balanced. Unbalanced brackets can be escaped using a backslash (\) character. If there is a backslash character in the string, the character after it (even another backslash) is put into the string verbatim, but the (first) backslash is not. a The value on top of the stack is popped. If it is a number, it is truncated and its absolute value is taken. The result mod 256 is calculated. If that result is 0, push an empty string; otherwise, push a one-character string where the character is the result of the mod interpreted as an ASCII character. If it is a string, then a new string is made. If the original string is empty, the new string is empty. If it is not, then the first character of the original string is used to create the new string as a one-character string. The new string is then pushed onto the stack. This is a non-portable extension. x Pops a value off of the top of the stack. If it is a number, it is pushed back onto the stack. If it is a string, it is executed as a macro. This behavior is the norm whenever a macro is executed, whether by this command or by the conditional execution commands below. >r Pops two values off of the stack that must be numbers and compares them. If the first value is greater than the second, then the contents of register r are executed. For example, 0 1>a will execute the contents of register a, and 1 0>a will not. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). >res Like the above, but will execute register s if the comparison fails. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). This is a non-portable extension. !>r Pops two values off of the stack that must be numbers and compares them. If the first value is not greater than the second (less than or equal to), then the contents of register r are executed. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). !>res Like the above, but will execute register s if the comparison fails. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). This is a non-portable extension. <r Pops two values off of the stack that must be numbers and compares them. If the first value is less than the second, then the contents of register r are executed. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). <res Like the above, but will execute register s if the comparison fails. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). This is a non-portable extension. !<r Pops two values off of the stack that must be numbers and compares them. If the first value is not less than the second (greater than or equal to), then the contents of register r are executed. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). !<res Like the above, but will execute register s if the comparison fails. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). This is a non-portable extension. =r Pops two values off of the stack that must be numbers and compares them. If the first value is equal to the second, then the contents of register r are executed. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). =res Like the above, but will execute register s if the comparison fails. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). This is a non-portable extension. !=r Pops two values off of the stack that must be numbers and compares them. If the first value is not equal to the second, then the contents of register r are executed. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). !=res Like the above, but will execute register s if the comparison fails. If either or both of the values are not numbers, dc(1) will raise an error and reset (see the RESET section). This is a non-portable extension. ? Reads a line from the stdin and executes it. This is to allow macros to request input from users. q During execution of a macro, this exits the execution of that macro and the execution of the macro that executed it. If there are no macros, or only one macro executing, dc(1) exits. Q Pops a value from the stack which must be non-negative and is used the number of macro executions to pop off of the execution stack. If the number of levels to pop is greater than the number of executing macros, dc(1) exits. , Pushes the depth of the execution stack onto the stack. The execution stack is the stack of string executions. The number that is pushed onto the stack is exactly as many as is needed to make dc(1) exit with the Q command, so the sequence ,Q will make dc(1) exit. This is a non-portable extension. Status These commands query status of the stack or its top value. Z Pops a value off of the stack. If it is a number, calculates the number of significant decimal digits it has and pushes the result. It will push 1 if the argument is 0 with no decimal places. If it is a string, pushes the number of characters the string has. X Pops a value off of the stack. If it is a number, pushes the scale of the value onto the stack. If it is a string, pushes 0. u Pops one value off of the stack. If the value is a number, this pushes 1 onto the stack. Otherwise (if it is a string), it pushes 0. This is a non-portable extension. t Pops one value off of the stack. If the value is a string, this pushes 1 onto the stack. Otherwise (if it is a number), it pushes 0. This is a non-portable extension. z Pushes the current depth of the stack (before execution of this command) onto the stack. yr Pushes the current stack depth of the register r onto the main stack. Because each register has a depth of 1 (with the value 0 in the top item) when dc(1) starts, dc(1) requires that each register’s stack must always have at least one item; dc(1) will give an error and reset otherwise (see the RESET section). This means that this command will never push 0. This is a non-portable extension. Arrays These commands manipulate arrays. :r Pops the top two values off of the stack. The second value will be stored in the array r (see the REGISTERS section), indexed by the first value. ;r Pops the value on top of the stack and uses it as an index into the array r. The selected value is then pushed onto the stack. Yr Pushes the length of the array r onto the stack. This is a non-portable extension. Global Settings These commands retrieve global settings. These are the only commands that require multiple specific characters, and all of them begin with the letter g. Only the characters below are allowed after the character g; any other character produces a parse error (see the ERRORS section). gl Pushes the line length set by DC_LINE_LENGTH (see the ENVIRONMENT VARIABLES section) onto the stack. gx Pushes 1 onto the stack if extended register mode is on, 0 otherwise. See the Extended Register Mode subsection of the REGISTERS section for more information. gz Pushes 0 onto the stack if the leading zero setting has not been enabled with the -z or --leading-zeroes options (see the OPTIONS section), non-zero otherwise. REGISTERS Registers are names that can store strings, numbers, and arrays. (Number/string registers do not interfere with array registers.) Each register is also its own stack, so the current register value is the top of the stack for the register. All registers, when first referenced, have one value (0) in their stack, and it is a runtime error to attempt to pop that item off of the register stack. In non-extended register mode, a register name is just the single character that follows any command that needs a register name. The only exceptions are: a newline (`\n') and a left bracket (`['); it is a parse error for a newline or a left bracket to be used as a register name. Extended Register Mode Unlike most other dc(1) implentations, this dc(1) provides nearly unlimited amounts of registers, if extended register mode is enabled. If extended register mode is enabled (-x or --extended-register command-line arguments are given), then normal single character registers are used unless the character immediately following a command that needs a register name is a space (according to isspace()) and not a newline (`\n'). In that case, the register name is found according to the regex [a- z][a-z0-9_]* (like bc(1) identifiers), and it is a parse error if the next non-space characters do not match that regex. RESET When dc(1) encounters an error or a signal that it has a non-default handler for, it resets. This means that several things happen. First, any macros that are executing are stopped and popped off the stack. The behavior is not unlike that of exceptions in programming languages. Then the execution point is set so that any code waiting to execute (after all macros returned) is skipped. Thus, when dc(1) resets, it skips any remaining code waiting to be executed. Then, if it is interactive mode, and the error was not a fatal error (see the EXIT STATUS section), it asks for more input; otherwise, it exits with the appropriate return code. PERFORMANCE Most dc(1) implementations use char types to calculate the value of 1 decimal digit at a time, but that can be slow. This dc(1) does something different. It uses large integers to calculate more than 1 decimal digit at a time. If built in a environment where DC_LONG_BIT (see the LIMITS section) is 64, then each integer has 9 decimal digits. If built in an environment where DC_LONG_BIT is 32 then each integer has 4 decimal digits. This value (the number of decimal digits per large integer) is called DC_BASE_DIGS. In addition, this dc(1) uses an even larger integer for overflow checking. This integer type depends on the value of DC_LONG_BIT, but is always at least twice as large as the integer type used to store digits. LIMITS The following are the limits on dc(1): DC_LONG_BIT The number of bits in the long type in the environment where dc(1) was built. This determines how many decimal digits can be stored in a single large integer (see the PERFORMANCE section). DC_BASE_DIGS The number of decimal digits per large integer (see the PERFORMANCE section). Depends on DC_LONG_BIT. DC_BASE_POW The max decimal number that each large integer can store (see DC_BASE_DIGS) plus 1. Depends on DC_BASE_DIGS. DC_OVERFLOW_MAX The max number that the overflow type (see the PERFORMANCE section) can hold. Depends on DC_LONG_BIT. DC_BASE_MAX The maximum output base. Set at DC_BASE_POW. DC_DIM_MAX The maximum size of arrays. Set at SIZE_MAX-1. DC_SCALE_MAX The maximum scale. Set at DC_OVERFLOW_MAX-1. DC_STRING_MAX The maximum length of strings. Set at DC_OVERFLOW_MAX-1. DC_NAME_MAX The maximum length of identifiers. Set at DC_OVERFLOW_MAX-1. DC_NUM_MAX The maximum length of a number (in decimal digits), which includes digits after the decimal point. Set at DC_OVERFLOW_MAX-1. DC_RAND_MAX The maximum integer (inclusive) returned by the ’ command, if dc(1). Set at 2^DC_LONG_BIT-1. Exponent The maximum allowable exponent (positive or negative). Set at DC_OVERFLOW_MAX. Number of vars The maximum number of vars/arrays. Set at SIZE_MAX-1. These limits are meant to be effectively non-existent; the limits are so large (at least on 64-bit machines) that there should not be any point at which they become a problem. In fact, memory should be exhausted before these limits should be hit. ENVIRONMENT VARIABLES As non-portable extensions, dc(1) recognizes the following environment variables: DC_ENV_ARGS This is another way to give command-line arguments to dc(1). They should be in the same format as all other command-line arguments. These are always processed first, so any files given in DC_ENV_ARGS will be processed before arguments and files given on the command-line. This gives the user the ability to set up “standard” options and files to be used at every invocation. The most useful thing for such files to contain would be useful functions that the user might want every time dc(1) runs. Another use would be to use the -e option to set scale to a value other than 0. The code that parses DC_ENV_ARGS will correctly handle quoted arguments, but it does not understand escape sequences. For example, the string “/home/gavin/some dc file.dc” will be correctly parsed, but the string “/home/gavin/some "dc" file.dc” will include the backslashes. The quote parsing will handle either kind of quotes, ’ or “. Thus, if you have a file with any number of single quotes in the name, you can use double quotes as the outside quotes, as in “some `dc' file.dc”, and vice versa if you have a file with double quotes. However, handling a file with both kinds of quotes in DC_ENV_ARGS is not supported due to the complexity of the parsing, though such files are still supported on the command-line where the parsing is done by the shell. DC_LINE_LENGTH If this environment variable exists and contains an integer that is greater than 1 and is less than UINT16_MAX (2^16-1), dc(1) will output lines to that length, including the backslash newline combo. The default line length is 70. The special value of 0 will disable line length checking and print numbers without regard to line length and without backslashes and newlines. DC_SIGINT_RESET If dc(1) is not in interactive mode (see the INTERACTIVE MODE section), then this environment variable has no effect because dc(1) exits on SIGINT when not in interactive mode. However, when dc(1) is in interactive mode, then if this environment variable exists and contains an integer, a non-zero value makes dc(1) reset on SIGINT, rather than exit, and zero makes dc(1) exit. If this environment variable exists and is not an integer, then dc(1) will exit on SIGINT. This environment variable overrides the default, which can be queried with the -h or --help options. DC_TTY_MODE If TTY mode is not available (see the TTY MODE section), then this environment variable has no effect. However, when TTY mode is available, then if this environment variable exists and contains an integer, then a non-zero value makes dc(1) use TTY mode, and zero makes dc(1) not use TTY mode. This environment variable overrides the default, which can be queried with the -h or --help options. DC_PROMPT If TTY mode is not available (see the TTY MODE section), then this environment variable has no effect. However, when TTY mode is available, then if this environment variable exists and contains an integer, a non-zero value makes dc(1) use a prompt, and zero or a non-integer makes dc(1) not use a prompt. If this environment variable does not exist and DC_TTY_MODE does, then the value of the DC_TTY_MODE environment variable is used. This environment variable and the DC_TTY_MODE environment variable override the default, which can be queried with the -h or --help options. DC_EXPR_EXIT If any expressions or expression files are given on the command- line with -e, --expression, -f, or --file, then if this environment variable exists and contains an integer, a non-zero value makes dc(1) exit after executing the expressions and expression files, and a zero value makes dc(1) not exit. This environment variable overrides the default, which can be queried with the -h or --help options. DC_DIGIT_CLAMP When parsing numbers and if this environment variable exists and contains an integer, a non-zero value makes dc(1) clamp digits that are greater than or equal to the current ibase so that all such digits are considered equal to the ibase minus 1, and a zero value disables such clamping so that those digits are always equal to their value, which is multiplied by the power of the ibase. This never applies to single-digit numbers, as per the bc(1) standard (see the STANDARDS section). This environment variable overrides the default, which can be queried with the -h or --help options. EXIT STATUS dc(1) returns the following exit statuses: 0 No error. 1 A math error occurred. This follows standard practice of using 1 for expected errors, since math errors will happen in the process of normal execution. Math errors include divide by 0, taking the square root of a negative number, using a negative number as a bound for the pseudo-random number generator, attempting to convert a negative number to a hardware integer, overflow when converting a number to a hardware integer, overflow when calculating the size of a number, and attempting to use a non-integer where an integer is required. Converting to a hardware integer happens for the second operand of the power (^), places (@), left shift (H), and right shift (h) operators. 2 A parse error occurred. Parse errors include unexpected EOF, using an invalid character, failing to find the end of a string or comment, and using a token where it is invalid. 3 A runtime error occurred. Runtime errors include assigning an invalid number to any global (ibase, obase, or scale), giving a bad expression to a read() call, calling read() inside of a read() call, type errors (including attempting to execute a number), and attempting an operation when the stack has too few elements. 4 A fatal error occurred. Fatal errors include memory allocation errors, I/O errors, failing to open files, attempting to use files that do not have only ASCII characters (dc(1) only accepts ASCII characters), attempting to open a directory as a file, and giving invalid command-line options. The exit status 4 is special; when a fatal error occurs, dc(1) always exits and returns 4, no matter what mode dc(1) is in. The other statuses will only be returned when dc(1) is not in interactive mode (see the INTERACTIVE MODE section), since dc(1) resets its state (see the RESET section) and accepts more input when one of those errors occurs in interactive mode. This is also the case when interactive mode is forced by the -i flag or --interactive option. These exit statuses allow dc(1) to be used in shell scripting with error checking, and its normal behavior can be forced by using the -i flag or --interactive option. INTERACTIVE MODE Like bc(1), dc(1) has an interactive mode and a non-interactive mode. Interactive mode is turned on automatically when both stdin and stdout are hooked to a terminal, but the -i flag and --interactive option can turn it on in other situations. In interactive mode, dc(1) attempts to recover from errors (see the RESET section), and in normal execution, flushes stdout as soon as execution is done for the current input. dc(1) may also reset on SIGINT instead of exit, depending on the contents of, or default for, the DC_SIGINT_RESET environment variable (see the ENVIRONMENT VARIABLES section). TTY MODE If stdin, stdout, and stderr are all connected to a TTY, then “TTY mode” is considered to be available, and thus, dc(1) can turn on TTY mode, subject to some settings. If there is the environment variable DC_TTY_MODE in the environment (see the ENVIRONMENT VARIABLES section), then if that environment variable contains a non-zero integer, dc(1) will turn on TTY mode when stdin, stdout, and stderr are all connected to a TTY. If the DC_TTY_MODE environment variable exists but is not a non-zero integer, then dc(1) will not turn TTY mode on. If the environment variable DC_TTY_MODE does not exist, the default setting is used. The default setting can be queried with the -h or --help options. TTY mode is different from interactive mode because interactive mode is required in the bc(1) specification (see the STANDARDS section), and interactive mode requires only stdin and stdout to be connected to a terminal. Command-Line History Command-line history is only enabled if TTY mode is, i.e., that stdin, stdout, and stderr are connected to a TTY and the DC_TTY_MODE environment variable (see the ENVIRONMENT VARIABLES section) and its default do not disable TTY mode. See the COMMAND LINE HISTORY section for more information. Prompt If TTY mode is available, then a prompt can be enabled. Like TTY mode itself, it can be turned on or off with an environment variable: DC_PROMPT (see the ENVIRONMENT VARIABLES section). If the environment variable DC_PROMPT exists and is a non-zero integer, then the prompt is turned on when stdin, stdout, and stderr are connected to a TTY and the -P and --no-prompt options were not used. The read prompt will be turned on under the same conditions, except that the -R and --no-read-prompt options must also not be used. However, if DC_PROMPT does not exist, the prompt can be enabled or disabled with the DC_TTY_MODE environment variable, the -P and --no- prompt options, and the -R and --no-read-prompt options. See the ENVIRONMENT VARIABLES and OPTIONS sections for more details. SIGNAL HANDLING Sending a SIGINT will cause dc(1) to do one of two things. If dc(1) is not in interactive mode (see the INTERACTIVE MODE section), or the DC_SIGINT_RESET environment variable (see the ENVIRONMENT VARIABLES section), or its default, is either not an integer or it is zero, dc(1) will exit. However, if dc(1) is in interactive mode, and the DC_SIGINT_RESET or its default is an integer and non-zero, then dc(1) will stop executing the current input and reset (see the RESET section) upon receiving a SIGINT. Note that “current input” can mean one of two things. If dc(1) is processing input from stdin in interactive mode, it will ask for more input. If dc(1) is processing input from a file in interactive mode, it will stop processing the file and start processing the next file, if one exists, or ask for input from stdin if no other file exists. This means that if a SIGINT is sent to dc(1) as it is executing a file, it can seem as though dc(1) did not respond to the signal since it will immediately start executing the next file. This is by design; most files that users execute when interacting with dc(1) have function definitions, which are quick to parse. If a file takes a long time to execute, there may be a bug in that file. The rest of the files could still be executed without problem, allowing the user to continue. SIGTERM and SIGQUIT cause dc(1) to clean up and exit, and it uses the default handler for all other signals. The one exception is SIGHUP; in that case, and only when dc(1) is in TTY mode (see the TTY MODE section), a SIGHUP will cause dc(1) to clean up and exit. COMMAND LINE HISTORY dc(1) supports interactive command-line editing. If dc(1) can be in TTY mode (see the TTY MODE section), history can be enabled. This means that command-line history can only be enabled when stdin, stdout, and stderr are all connected to a TTY. Like TTY mode itself, it can be turned on or off with the environment variable DC_TTY_MODE (see the ENVIRONMENT VARIABLES section). Note: tabs are converted to 8 spaces. LOCALES This dc(1) ships with support for adding error messages for different locales and thus, supports LC_MESSAGES. SEE ALSO bc(1) STANDARDS The dc(1) utility operators and some behavior are compliant with the operators in the IEEE Std 1003.1-2017 (“POSIX.1-2017”) bc(1) specification at https://pubs.opengroup.org/onlinepubs/9699919799/utilities/bc.html . BUGS None are known. Report bugs at https://git.gavinhoward.com/gavin/bc . AUTHOR Gavin D. Howard <gavin@gavinhoward.com> and contributors. Gavin D. Howard February 2023 DC(1)
| null |
mailx
| null |
mail, mailx – send and receive mail
|
mail [-dEiInv] [-s subject] [-c cc-addr] [-b bcc-addr] [-F] to-addr ... mail [-dEHiInNv] [-F] -f [name] mail [-dEHiInNv] [-F] [-u user] mail [-d] -e [-f name] mail [-H] INTRODUCTION The mail utility is an intelligent mail processing system, which has a command syntax reminiscent of ed(1) with lines replaced by messages. The following options are available: -v Verbose mode. The details of delivery are displayed on the user's terminal. -d Debugging mode. See the debug mail option for details. -e Test for the presence of mail in the (by default, system) mailbox. An exit status of 0 is returned if it has mail; otherwise, an exit status of 1 is returned. -H Write a header summary only, then exit. -E Do not send messages with an empty body. This is useful for piping errors from cron(8) scripts. -i Ignore tty interrupt signals. This is particularly useful when using mail on noisy phone lines. -I Force mail to run in interactive mode even when input is not a terminal. In particular, the ‘~’ special character when sending mail is only active in interactive mode. -n Inhibit reading the system-wide mail.rc files upon startup. -N Inhibit the initial display of message headers when reading mail or editing a mail folder. -s subject Specify subject on command line. (Only the first argument after the -s flag is used as a subject; be careful to quote subjects containing spaces.) -c cc-addr Send carbon copies to cc-addr list of users. The cc-addr argument should be a comma-separated list of names. -b bcc-addr Send blind carbon copies to bcc-addr list of users. The bcc-addr argument should be a comma-separated list of names. -f Use an alternate mailbox. Defaults to the user's mbox if no file is specified. When quit, mail writes undeleted messages back to this file. -F Record the message in a file named after the first recipient. The name is the login-name portion of the address found first on the “To:” line in the mail header. Overrides the record variable, if set. -u user Is equivalent to: mail -f /var/mail/user Startup Actions At startup time mail will execute commands in the system command files /usr/share/misc/mail.rc, /usr/local/etc/mail.rc and /etc/mail.rc in order, unless explicitly told not to by the use of the -n option. Next, the commands in the user's personal command file ~/.mailrc are executed. The mail utility then examines its command line options to determine whether a new message is to be sent, or whether an existing mailbox is to be read. Sending Mail To send a message to one or more people, mail can be invoked with arguments which are the names of people to whom the mail will be sent. You are then expected to type in your message, followed by a ⟨control-D⟩ at the beginning of a line. The section below Replying To or Originating Mail, describes some features of mail available to help you compose your letter. Reading Mail In normal usage mail is given no arguments and checks your mail out of the post office, then prints out a one line header of each message found. The current message is initially the first message (numbered 1) and can be printed using the print command (which can be abbreviated p). You can move among the messages much as you move between lines in ed(1), with the commands + and - moving backwards and forwards, and simple numbers. Disposing of Mail After examining a message you can delete (d) the message or reply (r) to it. Deletion causes the mail program to forget about the message. This is not irreversible; the message can be undeleted (u) by giving its number, or the mail session can be aborted by giving the exit (x) command. Deleted messages will, however, usually disappear never to be seen again. Specifying Messages Commands such as print and delete can be given a list of message numbers as arguments to apply to a number of messages at once. Thus “delete 1 2” deletes messages 1 and 2, while “delete 1-5” deletes messages 1 through 5. The special name ‘*’ addresses all messages, and ‘$’ addresses the last message; thus the command top which prints the first few lines of a message could be used in “top *” to print the first few lines of all messages. Replying To or Originating Mail You can use the reply command to set up a response to a message, sending it back to the person who it was from. Text you then type in, up to an end-of-file, defines the contents of the message. While you are composing a message, mail treats lines beginning with the character ‘~’ specially. For instance, typing ~m (alone on a line) will place a copy of the current message into the response right shifting it by a tabstop (see indentprefix variable, below). Other escapes will set up subject fields, add and delete recipients to the message and allow you to escape to an editor to revise the message or to a shell to run some commands. (These options are given in the summary below.) Ending a Mail Processing Session You can end a mail session with the quit (q) command. Messages which have been examined go to your mbox file unless they have been deleted in which case they are discarded. Unexamined messages go back to the post office. (See the -f option above). Personal and System Wide Distribution Lists It is also possible to create a personal distribution lists so that, for instance, you can send mail to “cohorts” and have it go to a group of people. Such lists can be defined by placing a line like alias cohorts bill ozalp jkf mark kridle@ucbcory in the file .mailrc in your home directory. The current list of such aliases can be displayed with the alias command in mail. System wide distribution lists can be created by editing /etc/mail/aliases, see aliases(5) and sendmail(8); these are kept in a different syntax. In mail you send, personal aliases will be expanded in mail sent to others so that they will be able to reply to the recipients. System wide aliases are not expanded when the mail is sent, but any reply returned to the machine will have the system wide alias expanded as all mail goes through sendmail(8). Recipient address specifications Recipient addresses (any of the “To”, “Cc” or “Bcc” header fields) are subject to expansion when the expandaddr option is set. An address may be expanded as follows: • An address that starts with a pipe (‘|’) character is treated as a command to run. The command immediately following the ‘|’ is executed with the message as its standard input. • An address that starts with a ‘+’ character is treated as a folder. • An address that contains a ‘/’ character but no ‘!’, ‘%’, or ‘@’ characters is also treated as a folder. • If none of the above apply, the recipient is treated as a local or network mail address. If the expandaddr option is not set (the default), no expansion is performed and the recipient is treated as a local or network mail address. Network Mail (ARPA, UUCP, Berknet) The mail utility has a number of options which can be set in the .mailrc file to alter its behavior; thus “set askcc” enables the askcc feature. (These options are summarized below.) SUMMARY (Adapted from the Mail Reference Manual.) Each command is typed on a line by itself, and may take arguments following the command word. The command need not be typed in its entirety — the first command which matches the typed prefix is used. For commands which take message lists as arguments, if no message list is given, then the next message forward which satisfies the command's requirements is used. If there are no messages forward of the current message, the search proceeds backwards, and if there are no good messages at all, mail types “No applicable messages” and aborts the command. - Print out the preceding message. If given a numeric argument n, goes to the n'th previous message and prints it. # ignore the remainder of the line as a comment. ? Prints a brief summary of commands. ! Executes the shell (see sh(1) and csh(1)) command which follows. Print (P) Like print but also prints out ignored header fields. See also print, ignore and retain. Reply (R) Reply to originator. Does not reply to other recipients of the original message. Type (T) Identical to the Print command. alias (a) With no arguments, prints out all currently-defined aliases. With one argument, prints out that alias. With more than one argument, creates a new alias or changes an old one. alternates (alt) The alternates command is useful if you have accounts on several machines. It can be used to inform mail that the listed addresses are really you. When you reply to messages, mail will not send a copy of the message to any of the addresses listed on the alternates list. If the alternates command is given with no argument, the current set of alternative names is displayed. chdir (c) Changes the user's working directory to that specified, if given. If no directory is given, then changes to the user's login directory. copy (co) The copy command does the same thing that save does, except that it does not mark the messages it is used on for deletion when you quit. delete (d) Takes a list of messages as argument and marks them all as deleted. Deleted messages will not be saved in mbox, nor will they be available for most other commands. dp (also dt) Deletes the current message and prints the next message. If there is no next message, mail says “at EOF”. edit (e) Takes a list of messages and points the text editor at each one in turn. On return from the editor, the message is read back in. exit (ex or x) Effects an immediate return to the shell without modifying the user's system mailbox, his mbox file, or his edit file in -f. file (fi) The same as folder. folders List the names of the folders in your folder directory. folder (fo) The folder command switches to a new mail file or folder. With no arguments, it tells you which file you are currently reading. If you give it an argument, it will write out changes (such as deletions) you have made in the current file and read in the new file. Some special conventions are recognized for the name. ‘#’ means the previous file, ‘%’ means your system mailbox, “%user” means user's system mailbox, ‘&’ means your mbox file, and “+folder” means a file in your folder directory. from (f) Takes a list of messages and prints their message headers. headers (h) Lists the current range of headers, which is an 18-message group. If a ‘+’ argument is given, then the next 18-message group is printed, and if a ‘-’ argument is given, the previous 18-message group is printed. help A synonym for ?. hold (ho, also preserve) Takes a message list and marks each message therein to be saved in the user's system mailbox instead of in mbox. Does not override the delete command. ignore Add the list of header fields named to the ignored list. Header fields in the ignore list are not printed on your terminal when you print a message. This command is very handy for suppression of certain machine-generated header fields. The Type and Print commands can be used to print a message in its entirety, including ignored fields. If ignore is executed with no arguments, it lists the current set of ignored fields. inc Incorporate any new messages that have arrived while mail is being read. The new messages are added to the end of the message list, and the current message is reset to be the first new mail message. This does not renumber the existing message list, nor does it cause any changes made so far to be saved. mail (m) Takes as argument login names and distribution group names and sends mail to those people. mbox Indicate that a list of messages be sent to mbox in your home directory when you quit. This is the default action for messages if you do not have the hold option set. more (mo) Takes a list of messages and invokes the pager on that list. next (n, like + or CR) Goes to the next message in sequence and types it. With an argument list, types the next matching message. preserve (pre) A synonym for hold. print (p) Takes a message list and types out each message on the user's terminal. quit (q) Terminates the session, saving all undeleted, unsaved messages in the user's mbox file in his login directory, preserving all messages marked with hold or preserve or never referenced in his system mailbox, and removing all other messages from his system mailbox. If new mail has arrived during the session, the message “You have new mail” is given. If given while editing a mailbox file with the -f flag, then the edit file is rewritten. A return to the shell is effected, unless the rewrite of edit file fails, in which case the user can escape with the exit command. reply (r) Takes a message list and sends mail to the sender and all recipients of the specified message. The default message must not be deleted. respond A synonym for reply. retain Add the list of header fields named to the retained list. Only the header fields in the retained list are shown on your terminal when you print a message. All other header fields are suppressed. The type and print commands can be used to print a message in its entirety. If retain is executed with no arguments, it lists the current set of retained fields. save (s) Takes a message list and a filename and appends each message in turn to the end of the file. The filename in quotes, followed by the line count and character count is echoed on the user's terminal. set (se) With no arguments, prints all variable values. Otherwise, sets option. Arguments are of the form option=value (no space before or after ‘=’) or option. Quotation marks may be placed around any part of the assignment statement to quote blanks or tabs, i.e. “set indentprefix="->"” saveignore Saveignore is to save what ignore is to print and type. Header fields thus marked are filtered out when saving a message by save or when automatically saving to mbox. saveretain Saveretain is to save what retain is to print and type. Header fields thus marked are the only ones saved with a message when saving by save or when automatically saving to mbox. Saveretain overrides saveignore. shell (sh) Invokes an interactive version of the shell. size Takes a message list and prints out the size in characters of each message. source The source command reads commands from a file. top Takes a message list and prints the top few lines of each. The number of lines printed is controlled by the variable toplines and defaults to 5. type (t) A synonym for print. unalias Takes a list of names defined by alias commands and discards the remembered groups of users. The group names no longer have any significance. undelete (u) Takes a message list and marks each message as not being deleted. unread (U) Takes a message list and marks each message as not having been read. unset Takes a list of option names and discards their remembered values; the inverse of set. visual (v) Takes a message list and invokes the display editor on each message. write (w) Similar to save, except that only the message body (without the header) is saved. Extremely useful for such tasks as sending and receiving source program text over the message system. xit (x) A synonym for exit. z The mail utility presents message headers in windowfuls as described under the headers command. You can move mail's attention forward to the next window with the z command. Also, you can move to the previous window by using z-. Tilde/Escapes Here is a summary of the tilde escapes, which are used when composing messages to perform special functions. Tilde escapes are only recognized at the beginning of lines. The name “tilde escape” is somewhat of a misnomer since the actual escape character can be set by the option escape. ~a Inserts the autograph string from the sign= option into the message. ~A Inserts the autograph string from the Sign= option into the message. ~b name ... Add the given names to the list of carbon copy recipients but do not make the names visible in the Cc: line (“blind” carbon copy). ~c name ... Add the given names to the list of carbon copy recipients. ~d Read the file dead.letter from your home directory into the message. ~e Invoke the text editor on the message collected so far. After the editing session is finished, you may continue appending text to the message. ~f messages Read the named messages into the message being sent. If no messages are specified, read in the current message. Message headers currently being ignored (by the ignore or retain command) are not included. ~F messages Identical to ~f, except all message headers are included. ~h Edit the message header fields by typing each one in turn and allowing the user to append text to the end or modify the field by using the current terminal erase and kill characters. ~i string Inserts the value of the named option into the text of the message. ~m messages Read the named messages into the message being sent, indented by a tab or by the value of indentprefix. If no messages are specified, read the current message. Message headers currently being ignored (by the ignore or retain command) are not included. ~M messages Identical to ~m, except all message headers are included. ~p Print out the message collected so far, prefaced by the message header fields. ~q Abort the message being sent, copying the message to dead.letter in your home directory if save is set. ~r filename, ~r !command ~< filename, ~< !command Read the named file into the message. If the argument begins with a ‘!’, the rest of the string is taken as an arbitrary system command and is executed, with the standard output inserted into the message. ~R string Use string as the Reply-To field. ~s string Cause the named string to become the current subject field. ~t name ... Add the given names to the direct recipient list. ~v Invoke an alternative editor (defined by the VISUAL environment variable) on the message collected so far. Usually, the alternative editor will be a screen editor. After you quit the editor, you may resume appending text to the end of your message. ~w filename Write the message onto the named file. ~x Exits as with ~q, except the message is not saved in dead.letter. ~! command Execute the indicated shell command, then return to the message. ~| command, ~^ command Pipe the message through the command as a filter. If the command gives no output or terminates abnormally, retain the original text of the message. The command fmt(1) is often used as command to rejustify the message. ~: mail-command, ~_ mail-command Execute the given mail command. Not all commands, however, are allowed. ~. Simulate end-of-file on input. ~? Print a summary of the available command escapes. ~~ string Insert the string of text in the message prefaced by a single ‘~’. If you have changed the escape character, then you should double that character in order to send it. Mail Options Options can be set with the set command and can be disabled with the unset or set noname commands. Options may be either binary, in which case it is only significant to see whether they are set or not; or string, in which case the actual value is of interest. If an option is not set, mail will look for an environment variable of the same name. The available options include the following: append Causes messages saved in mbox to be appended to the end rather than prepended. This should always be set (preferably in one of the system-wide mail.rc files). Default is noappend. ask, asksub Causes mail to prompt you for the subject of each message you send. If you respond with simply a newline, no subject field will be sent. Default is asksub. askbcc Causes you to be prompted for additional blind carbon copy recipients at the end of each message. Responding with a newline indicates your satisfaction with the current list. Default is noaskbcc. askcc Causes you to be prompted for additional carbon copy recipients at the end of each message. Responding with a newline indicates your satisfaction with the current list. Default is noaskcc. autoinc Causes new mail to be automatically incorporated when it arrives. Setting this is similar to issuing the inc command at each prompt, except that the current message is not reset when new mail arrives. Default is noautoinc. autoprint Causes the delete command to behave like dp; thus, after deleting a message, the next one will be typed automatically. Default is noautoprint. crt The valued option crt is used as a threshold to determine how long a message must be before PAGER is used to read it. If crt is set without a value, then the height of the terminal screen stored in the system is used to compute the threshold (see stty(1)). Default is nocrt. debug Setting the binary option debug is the same as specifying -d on the command line and causes mail to output all sorts of information useful for debugging mail. In case mail is invoked in this mode to send mail, all preparations will be performed and reported about, but the mail will not be actually sent. Default is nodebug. dot The binary option dot causes mail to interpret a period alone on a line as the terminator of a message you are sending. Default is nodot. escape If defined, the first character of this option gives the character to use in place of ‘~’ to denote escapes. expandaddr Causes mail to expand message recipient addresses, as explained in the section Recipient address specifications. flipr Reverses the sense of reply and Reply commands. Default is noflipr. folder The name of the directory to use for storing folders of messages. If this name begins with a ‘/’, mail considers it to be an absolute pathname; otherwise, the folder directory is found relative to your home directory. header If defined, initially display message headers when reading mail or editing a mail folder. Default is header. This option can be disabled by giving the -N flag on the command line. hold This option is used to hold messages in the system mailbox by default. Default is nohold. ignore Causes interrupt signals from your terminal to be ignored and echoed as @'s. Default is noignore. ignoreeof An option related to dot is ignoreeof which makes mail refuse to accept a ⟨control-D⟩ as the end of a message. Ignoreeof also applies to mail command mode. Default is noignoreeof. indentprefix String used by the ~m tilde escape for indenting messages, in place of the normal tab character (^I). Be sure to quote the value if it contains spaces or tabs. metoo Usually, when a group is expanded that contains the sender, the sender is removed from the expansion. Setting this option causes the sender to be included in the group. Default is nometoo. quiet Suppresses the printing of the version when first invoked. Default is noquiet. record If defined, gives the pathname of the file used to record all outgoing mail. If not defined, outgoing mail is not saved. Default is norecord. Replyall Reverses the sense of reply and Reply commands. Default is noReplyall. save If this option is set, and you abort a message with two RUBOUT (erase or delete), mail will copy the partial letter to the file dead.letter in your home directory. Default is save. searchheaders If this option is set, then a message-list specifier in the form “/x:y” will expand to all messages containing the substring y in the header field x. The string search is case insensitive. If x is omitted, it will default to the “Subject” header field. The form “/to:y” is a special case, and will expand to all messages containing the substring y in the “To”, “Cc” or “Bcc” header fields. The check for "to" is case sensitive, so that “/To:y” can be used to limit the search for y to just the “To:” field. Default is nosearchheaders. toplines If defined, gives the number of lines of a message to be printed out with the top command; normally, the first five lines are printed. verbose Setting the option verbose is the same as using the -v flag on the command line. When mail runs in verbose mode, the actual delivery of messages is displayed on the user's terminal. Default is noverbose. ENVIRONMENT DEAD Pathname of the file to save partial messages to in case of interrupts or delivery errors. Default is ~/dead.letter. EDITOR Pathname of the text editor to use in the edit command and ~e escape. If not defined, then a default editor is used. HOME Pathname of the user's home directory. LISTER Pathname of the directory lister to use in the folders command. Default is /bin/ls. MAIL Location of the user's mailbox. Default is /var/mail. MAILRC Pathname of file containing initial mail commands. Default is ~/.mailrc. MBOX The name of the mailbox file. It can be the name of a folder. The default is mbox in the user's home directory. PAGER Pathname of the program to use in the more command or when crt variable is set. The default paginator less(1) is used if this option is not defined. REPLYTO If set, will be used to initialize the Reply-To field for outgoing messages. SHELL Pathname of the shell to use in the ! command and the ~! escape. A default shell is used if this option is not defined. TMPDIR Pathname of the directory used for creating temporary files. VISUAL Pathname of the text editor to use in the visual command and ~v escape. USER Login name of the user executing mail. FILES /var/mail/* Post office. ~/mbox User's old mail. ~/.mailrc File giving initial mail commands. This can be overridden by setting the MAILRC environment variable. /tmp/R* Temporary files. /usr/share/misc/mail.*help Help files. /usr/share/misc/mail.rc /usr/local/etc/mail.rc /etc/mail.rc System-wide initialization files. Each file will be sourced, in order, if it exists. SEE ALSO fmt(1), newaliases(1), vacation(1), aliases(5), sendmail(8) HISTORY A mail command appeared in Version 1 AT&T UNIX. This man page is derived from The Mail Reference Manual originally written by Kurt Shoens. BUGS Usually, mail is just a link to Mail and mailx, which can be confusing. The name of the alternates list is incorrect English (it should be “alternatives”), but is retained for compatibility. macOS 14.5 August 8, 2018 macOS 14.5
| null | null |
odutil
|
Use odutil to look at internal state information for opendirectoryd, enable or disable logging, or change statistics settings. Available commands: show Show various internal information. Subcommands: cache Outputs contents of the cache. Note, this output is not included in show all command. sessions List all open sessions nodes List all open nodes modules List all loaded modules requests List all active requests statistics Outputs statistics information. Some statistics are always enabled (membership). Additional statistics can be enabled see 'set statistics on'. nodenames List all available node names all List all of the above information (excludes cache) show configuration nodename Show configuration of a specific node, Subcommands: module modulename Specific module is requested, otherwise global
|
odutil – allows caller to examine or change state of opendirectoryd(8)
|
odutil show [cache | sessions | nodes | modules | requests | nodenames | statistics | all] odutil show configuration nodename [module modulename] [option option] odutil reset [cache | statistics] odutil set log [default | alert | critical | error | warning | notice | info | debug] odutil set configuration nodename [module modulename] option option value1 ... odutil set statistics [on | off]
|
option option Output a value of a specific option. reset Reset various internal information. Subcommands: cache Resets all caches including membership and kernel (does not affect DNS cache) statistics Resets any accumulated statistics. set log Change the type of log messages saved to persistent storage. The configuration stays active across reboots and must be changed to a new type or 'default'. The next type of messages are automatically stored to memory-only buffers for enhanced debugging. default Enables saving log messages based on default system behavior. Typically, saves basic messages to persistent storage and info messages to memory-only buffers. info Enables saving of info type messages to persistent storage and debug messages to memory- only buffers. debug Enables saving all types of messages to persistent storage. set configuration nodename Sets either global or per-module options accordingly. module modulename If module is omitted, then global option is assumed. option option value1 ... Set a specific option to one or more values as appropriate. set statistics Enables or disables extended statistics. Statistics include per-process-name call statistics and per-API call and latencies. This setting is persistent across reboots and should not normally be run as it is memory intensive. on Enables statistics tracking off Disables statistics tracking SEE ALSO opendirectoryd(8) macOS 14.5 November 15, 2016 macOS 14.5
| null |
jsadebugd
| null | null | null | null | null |
shortcuts
|
The shortcuts command is used to run, list, view or sign shortcuts. To create or edit a shortcut, use the Shortcuts application.
|
shortcuts – Command-line utility for running shortcuts.
|
shortcuts run shortcut-name-or-identifier [--input-path input-path ...] [--output-path output-path ...] [--output-type output-type] shortcuts list [--folder-name folder-name-or-identifier] [--folders] [--show-identifiers] shortcuts view shortcut-name shortcuts sign [--mode mode] --input input --output output
|
shortcuts run shortcut-name-or-identifier [--input-path input-path ...] The input to provide to the shortcut. Can be dropped, or set to “-” for stdin. [--output-path output-path ...] Where to write the shortcut output, if applicable. Can be omitted, or set to “-” for stdout. [--output-type output-type] What type to output data in, in Uniform Type Identifier format. If not provided shortcuts will attempt to infer the output type from the output filename, or use the default type of the output content. shortcuts list [--folder-name folder-name-or-identifier] The folder name or identifier to list shortcuts in, or “none” to list shortcuts not in a folder. [--folders] List folders instead of shortcuts. [--show-identifiers] Show identifiers with each result. shortcuts sign [--mode mode] The signing mode. Either “people-who-know-me” or “anyone”. Specifying “people-who-know-me” will sign locally, but only your devices, or people who have your contact info in their contacts, will be able to import the shortcut. Specifying “anyone” will notarize via iCloud, and allow anyone to import the shortcut. --input input The shortcut file to sign. --output output Output path for the signed shortcut file. macOS September 8, 2021 macOS
| null |
xargs
|
The xargs utility reads space, tab, newline and end-of-file delimited strings from the standard input and executes utility with the strings as arguments. Any arguments specified on the command line are given to utility upon each invocation, followed by some number of the arguments read from the standard input of xargs. This is repeated until standard input is exhausted. Spaces, tabs and newlines may be embedded in arguments using single (`` ' '') or double (``"'') quotes or backslashes (``\''). Single quotes escape all non-single quote characters, excluding newlines, up to the matching single quote. Double quotes escape all non-double quote characters, excluding newlines, up to the matching double quote. Any single character, including newlines, may be escaped by a backslash. The options are as follows: -0, --null Change xargs to expect NUL (``\0'') characters as separators, instead of spaces and newlines. This is expected to be used in concert with the -print0 function in find(1). -E eofstr Use eofstr as a logical EOF marker. -I replstr Execute utility for each input line, replacing one or more occurrences of replstr in up to replacements (or 5 if no -R flag is specified) arguments to utility with the entire line of input. The resulting arguments, after replacement is done, will not be allowed to grow beyond replsize (or 255 if no -S flag is specified) bytes; this is implemented by concatenating as much of the argument containing replstr as possible, to the constructed arguments to utility, up to replsize bytes. The size limit does not apply to arguments to utility which do not contain replstr, and furthermore, no replacement will be done on utility itself. Implies -x. -J replstr If this option is specified, xargs will use the data read from standard input to replace the first occurrence of replstr instead of appending that data after all other arguments. This option will not affect how many arguments will be read from input (-n), or the size of the command(s) xargs will generate (-s). The option just moves where those arguments will be placed in the command(s) that are executed. The replstr must show up as a distinct argument to xargs. It will not be recognized if, for instance, it is in the middle of a quoted string. Furthermore, only the first occurrence of the replstr will be replaced. For example, the following command will copy the list of files and directories which start with an uppercase letter in the current directory to destdir: /bin/ls -1d [A-Z]* | xargs -J % cp -Rp % destdir -L number Call utility for every number lines read. If EOF is reached and fewer lines have been read than number then utility will be called with the available lines. -n number, --max-args=number Set the maximum number of arguments taken from standard input for each invocation of utility. An invocation of utility will use less than number standard input arguments if the number of bytes accumulated (see the -s option) exceeds the specified size or there are fewer than number arguments remaining for the last invocation of utility. The current default value for number is 5000. -o Reopen stdin as /dev/tty in the child process before executing the command. This is useful if you want xargs to run an interactive application. -P maxprocs, --max-procs=maxprocs Parallel mode: run at most maxprocs invocations of utility at once. If maxprocs is set to 0, xargs will run as many processes as possible. -p, --interactive Echo each command to be executed and ask the user whether it should be executed. An affirmative response, ‘y’ in the POSIX locale, causes the command to be executed, any other response causes it to be skipped. No commands are executed if the process is not attached to a terminal. -r, --no-run-if-empty Compatibility with GNU xargs. The GNU version of xargs runs the utility argument at least once, even if xargs input is empty, and it supports a -r option to inhibit this behavior. The FreeBSD version of xargs does not run the utility argument on empty input, but it supports the -r option for command-line compatibility with GNU xargs, but the -r option does nothing in the FreeBSD version of xargs. -R replacements Specify the maximum number of arguments that -I will do replacement in. If replacements is negative, the number of arguments in which to replace is unbounded. -S replsize Specify the amount of space (in bytes) that -I can use for replacements. The default for replsize is 255. -s size, --max-chars=size Set the maximum number of bytes for the command line length provided to utility. The sum of the length of the utility name, the arguments passed to utility (including NULL terminators) and the current environment will be less than or equal to this number. The current default value for size is ARG_MAX - 4096. -t, --verbose Echo the command to be executed to standard error immediately before it is executed. -x, --exit Force xargs to terminate immediately if a command line containing number arguments will not fit in the specified (or default) command line length. If utility is omitted, echo(1) is used. Undefined behavior may occur if utility reads from the standard input. If a command line cannot be assembled, or cannot be invoked, or if an invocation of utility is terminated by a signal, or an invocation of utility exits with a value of 255, the xargs utility stops processing input and exits after all invocations of utility finish processing. LEGACY DESCRIPTION In legacy mode, the -L option treats all newlines as end-of-line, regardless of whether the line is empty or ends with a space. In addition, the -L and -n options are not mutually-exclusive. For more information about legacy mode, see compat(5). EXIT STATUS The xargs utility exits with a value of 0 if no error occurs. If utility cannot be found, xargs exits with a value of 127, otherwise if utility cannot be executed, xargs exits with a value of 126. If any other error occurs, xargs exits with a value of 1.
|
xargs – construct argument list(s) and execute utility
|
xargs [-0oprt] [-E eofstr] [-I replstr [-R replacements] [-S replsize]] [-J replstr] [-L number] [-n number [-x]] [-P maxprocs] [-s size] [utility [argument ...]]
| null |
Create a 3x3 matrix with numbers from 1 to 9. Every echo(1) instance receives three lines as arguments: $ seq 1 9 | xargs -L3 echo 1 2 3 4 5 6 7 8 9 Duplicate every line from standard input: $ echo -e "one\ntwo\nthree" | xargs -I % echo % % one one two two three three Execute at most 2 concurrent instances of find(1) every one of them using one of the directories from the standard input: ls -d /usr/local /opt | xargs -J % -P2 -n1 find % -name file SEE ALSO echo(1), find(1), execvp(3), compat(5) STANDARDS The xargs utility is expected to be IEEE Std 1003.2 (“POSIX.2”) compliant. The -J, -o, -P, -R and -S options are non-standard FreeBSD extensions which may not be available on other operating systems. HISTORY The xargs utility appeared in PWB UNIX. BUGS If utility attempts to invoke another command such that the number of arguments or the size of the environment is increased, it risks execvp(3) failing with E2BIG. The xargs utility does not take multibyte characters into account when performing string comparisons for the -I and -J options, which may lead to incorrect results in some locales. macOS 14.5 September 21, 2020 macOS 14.5
|
tkpp
|
Tkpp is a GUI frontend to pp, which can turn perl scripts into stand- alone PAR files, perl scripts or executables. You can save command line generated, load and save your Tkpp configuration GUI. Below is a short explanation of tkpp GUI. Menu File -> Save command line When you build or display command line in the Tkpp GUI, you can save the command line in a separated file. This command line can be executed from a terminal. File -> Save configuration You can save your GUI configuration (all options used) to load and execute it next time. File -> Load configuration Load your saved file configuration. All saved options will be set in the GUI. File -> Exit Close Tkpp. Help -> Tkpp documentation Display POD documentation of Tkpp. Help -> pp documentation Display POD documentation of pp. Help -> About Tkpp Display version and authors of Tkpp. Help -> About pp Display version and authors of pp ( pp --version). Tabs GUI There are five tabs in GUI : General Options, Information, Size, Other Options and Output. All tabs contain all options which can be used with pp. All default pp options are kept. You can now set as you want the options. When your have finished, you can display the command line or start building your package. You will have the output tab to see error or verbose messages. NOTES In Win32 system, the building is executed in a separate process, then the GUI is not frozen. The first time you use Tkpp, it will tell you to install some CPAN modules to use the GUI (like Tk, Tk::ColoredButton...). SEE ALSO pp, PAR AUTHORS Tkpp was written by Doug Gruber and rewrite by Djibril Ousmanou. In the event this application breaks, you get both pieces :-) COPYRIGHT Copyright 2003, 2004, 2005, 2006, 2011, 2014, 2015 by Doug Gruber <doug(a)dougthug.com>, Audrey Tang <cpan@audreyt.org> and Djibril Ousmanou <djibel(a)cpan.org>. Neither this program nor the associated pp program impose any licensing restrictions on files generated by their execution, in accordance with the 8th article of the Artistic License: "Aggregation of this Package with a commercial distribution is always permitted provided that the use of this Package is embedded; that is, when no overt attempt is made to make this Package's interfaces visible to the end user of the commercial distribution. Such use shall not be construed as a distribution of this Package." Therefore, you are absolutely free to place any license on the resulting executable, as long as the packed 3rd-party libraries are also available under the Artistic License. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See LICENSE. perl v5.34.0 2020-03-08 TKPP(1)
|
tkpp - frontend to pp written in Perl/Tk.
|
You just have to execute command line : tkpp
| null | null |
priclass.d
|
This is a simple DTrace script that samples at 1000 Hz the current thread's scheduling class and priority. A distribution plot is printed. With priorities, the higher the priority the better chance the thread has of being scheduled. This idea came from the script /usr/demo/dtrace/pri.d, which produces similar output for priority changes, not samples. Since this uses DTrace, only users with root privileges can run this command.
|
priclass.d - priority distribution by scheduling class. Uses DTrace.
|
priclass.d
| null |
This samples until Ctrl-C is hit. # priclass.d FIELDS value process priority count number of samples of at least this priority SCHEDULING CLASSES TS time sharing IA interactive RT real time SYS system FSS fair share scheduler BASED ON /usr/demo/dtrace/pri.d DOCUMENTATION DTrace Guide "profile Provider" chapter (docs.sun.com) See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. EXIT priclass.d will sample until Ctrl-C is hit. SEE ALSO pridist.d(1M), dispadmin(1M), dtrace(1M) version 1.00 April 22, 2006 priclass.d(1m)
|
topsysproc
|
This program continually prints a report of the number of system calls by process name, and refreshes the display every 1 second or as specified at the command line. Similar data can be fetched with "prstat -m". Since this uses DTrace, only users with root privileges can run this command.
|
topsysproc - top syscalls by process name. Uses DTrace.
|
topsysproc [-Cs] [interval [count]]
|
-C don't clear the screen -s print per second values
|
Default output, 1 second updates, # topsysproc Print every 5 seconds, # topsysproc 5 Print a scrolling output, # topsysproc -C FIELDS load avg load averages, see uptime(1) syscalls total syscalls in this interval syscalls/s syscalls per second PROCESS process name COUNT total syscalls in this interval COUNT/s syscalls per second NOTES There may be several PIDs with the same process name. DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. EXIT topsysproc will run until Ctrl-C is hit. AUTHOR Brendan Gregg [Sydney, Australia] SEE ALSO dtrace(1M), prstat(1M) version 0.90 June 13, 2005 topsysproc(1m)
|
nl
|
The nl utility reads lines from the named file, applies a configurable line numbering filter operation, and writes the result to the standard output. If file is a single dash (‘-’) or absent, nl reads from the standard input. The nl utility treats the text it reads in terms of logical pages. Unless specified otherwise, line numbering is reset at the start of each logical page. A logical page consists of a header, a body and a footer section; empty sections are valid. Different line numbering options are independently available for header, body and footer sections. The starts of logical page sections are signalled by input lines containing nothing but one of the following sequences of delimiter characters: Line Start of \:\:\: header \:\: body \: footer If the input does not contain any logical page section signalling directives, the text being read is assumed to consist of a single logical page body. The following options are available: -b type Specify the logical page body lines to be numbered. Recognized type arguments are: a Number all lines. t Number only non-empty lines. n No line numbering. pexpr Number only those lines that contain the basic regular expression specified by expr. The default type for logical page body lines is t. -d delim Specify the delimiter characters used to indicate the start of a logical page section in the input file. At most two characters may be specified; if only one character is specified, the first character is replaced and the second character remains unchanged. The default delim characters are “\:”. -f type Specify the same as -b type except for logical page footer lines. The default type for logical page footer lines is n. -h type Specify the same as -b type except for logical page header lines. The default type for logical page header lines is n. -i incr Specify the increment value used to number logical page lines. The default incr value is 1. -l num If numbering of all lines is specified for the current logical section using the corresponding -b a, -f a or -h a option, specify the number of adjacent blank lines to be considered as one. For example, -l 2 results in only the second adjacent blank line being numbered. The default num value is 1. -n format Specify the line numbering output format. Recognized format arguments are: ln Left justified. rn Right justified, leading zeros suppressed. rz Right justified, leading zeros kept. The default format is rn. -p Specify that line numbering should not be restarted at logical page delimiters. -s sep Specify the characters used in separating the line number and the corresponding text line. The default sep setting is a single tab character. -v startnum Specify the initial value used to number logical page lines; see also the description of the -p option. The default startnum value is 1. -w width Specify the number of characters to be occupied by the line number; in case the width is insufficient to hold the line number, it will be truncated to its width least significant digits. The default width is 6. ENVIRONMENT The LANG, LC_ALL, LC_CTYPE and LC_COLLATE environment variables affect the execution of nl as described in environ(7). EXIT STATUS The nl utility exits 0 on success, and >0 if an error occurs.
|
nl – line numbering filter
|
nl [-p] [-b type] [-d delim] [-f type] [-h type] [-i incr] [-l num] [-n format] [-s sep] [-v startnum] [-w width] [file]
| null |
Number all non-blank lines: $ echo -e "This is\n\n\na simple text" | nl 1 This is 2 a simple text Number all lines including blank ones, with right justified line numbers with leading zeroes, starting at 2, with increment of 2 and a custom multi-character separator: $ echo -e "This\nis\nan\n\n\nexample" | nl -ba -n rz -i2 -s "->" -v2 000002->This 000004->is 000006->an 000008-> 000010-> 000012->example Number lines matching regular expression for an i followed by either m or n $ echo -e "This is\na simple text\nwith multiple\nlines" | nl -bp'i[mn]' This is 1 a simple text with multiple 2 lines SEE ALSO jot(1), pr(1) STANDARDS The nl utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). HISTORY The nl utility first appeared in AT&T System V Release 2 UNIX. BUGS Input lines are limited to LINE_MAX (2048) bytes in length. macOS 14.5 June 18, 2020 macOS 14.5
|
podchecker5.30
|
podchecker will read the given input files looking for POD syntax errors in the POD documentation and will print any errors it find to STDERR. At the end, it will print a status message indicating the number of errors found. Directories are ignored, an appropriate warning message is printed. podchecker invokes the podchecker() function exported by Pod::Checker Please see "podchecker()" in Pod::Checker for more details. RETURN VALUE podchecker returns a 0 (zero) exit status if all specified POD files are ok. ERRORS podchecker returns the exit status 1 if at least one of the given POD files has syntax errors. The status 2 indicates that at least one of the specified files does not contain any POD commands. Status 1 overrides status 2. If you want unambiguous results, call podchecker with one single argument only. SEE ALSO Pod::Simple and Pod::Checker AUTHORS Please report bugs using <http://rt.cpan.org>. Brad Appleton <bradapp@enteract.com>, Marek Rouchal <marekr@cpan.org> Based on code for Pod::Text::pod2text(1) written by Tom Christiansen <tchrist@mox.perl.com> perl v5.30.3 2024-04-13 PODCHECKER(1)
|
podchecker - check the syntax of POD format documentation files
|
podchecker [-help] [-man] [-(no)warnings] [file ...] OPTIONS AND ARGUMENTS -help Print a brief help message and exit. -man Print the manual page and exit. -warnings -nowarnings Turn on/off printing of warnings. Repeating -warnings increases the warning level, i.e. more warnings are printed. Currently increasing to level two causes flagging of unescaped "<,>" characters. file The pathname of a POD file to syntax-check (defaults to standard input).
| null | null |
view
|
Vim is a text editor that is upwards compatible to Vi. It can be used to edit all kinds of plain text. It is especially useful for editing programs. There are a lot of enhancements above Vi: multi level undo, multi windows and buffers, syntax highlighting, command line editing, filename completion, on-line help, visual selection, etc.. See ":help vi_diff.txt" for a summary of the differences between Vim and Vi. While running Vim a lot of help can be obtained from the on-line help system, with the ":help" command. See the ON-LINE HELP section below. Most often Vim is started to edit a single file with the command vim file More generally Vim is started with: vim [options] [filelist] If the filelist is missing, the editor will start with an empty buffer. Otherwise exactly one out of the following four may be used to choose one or more files to be edited. file .. A list of filenames. The first one will be the current file and read into the buffer. The cursor will be positioned on the first line of the buffer. You can get to the other files with the ":next" command. To edit a file that starts with a dash, precede the filelist with "--". - The file to edit is read from stdin. Commands are read from stderr, which should be a tty. -t {tag} The file to edit and the initial cursor position depends on a "tag", a sort of goto label. {tag} is looked up in the tags file, the associated file becomes the current file and the associated command is executed. Mostly this is used for C programs, in which case {tag} could be a function name. The effect is that the file containing that function becomes the current file and the cursor is positioned on the start of the function. See ":help tag-commands". -q [errorfile] Start in quickFix mode. The file [errorfile] is read and the first error is displayed. If [errorfile] is omitted, the filename is obtained from the 'errorfile' option (defaults to "AztecC.Err" for the Amiga, "errors.err" on other systems). Further errors can be jumped to with the ":cn" command. See ":help quickfix". Vim behaves differently, depending on the name of the command (the executable may still be the same file). vim The "normal" way, everything is default. ex Start in Ex mode. Go to Normal mode with the ":vi" command. Can also be done with the "-e" argument. view Start in read-only mode. You will be protected from writing the files. Can also be done with the "-R" argument. gvim gview The GUI version. Starts a new window. Can also be done with the "-g" argument. evim eview The GUI version in easy mode. Starts a new window. Can also be done with the "-y" argument. rvim rview rgvim rgview Like the above, but with restrictions. It will not be possible to start shell commands, or suspend Vim. Can also be done with the "-Z" argument.
|
vim - Vi IMproved, a programmer's text editor
|
vim [options] [file ..] vim [options] - vim [options] -t tag vim [options] -q [errorfile] ex view gvim gview evim eview rvim rview rgvim rgview
|
The options may be given in any order, before or after filenames. Options without an argument can be combined after a single dash. +[num] For the first file the cursor will be positioned on line "num". If "num" is missing, the cursor will be positioned on the last line. +/{pat} For the first file the cursor will be positioned in the line with the first occurrence of {pat}. See ":help search-pattern" for the available search patterns. +{command} -c {command} {command} will be executed after the first file has been read. {command} is interpreted as an Ex command. If the {command} contains spaces it must be enclosed in double quotes (this depends on the shell that is used). Example: vim "+set si" main.c Note: You can use up to 10 "+" or "-c" commands. -S {file} {file} will be sourced after the first file has been read. This is equivalent to -c "source {file}". {file} cannot start with '-'. If {file} is omitted "Session.vim" is used (only works when -S is the last argument). --cmd {command} Like using "-c", but the command is executed just before processing any vimrc file. You can use up to 10 of these commands, independently from "-c" commands. -A If Vim has been compiled with ARABIC support for editing right-to-left oriented files and Arabic keyboard mapping, this option starts Vim in Arabic mode, i.e. 'arabic' is set. Otherwise an error message is given and Vim aborts. -b Binary mode. A few options will be set that makes it possible to edit a binary or executable file. -C Compatible. Set the 'compatible' option. This will make Vim behave mostly like Vi, even though a .vimrc file exists. -d Start in diff mode. There should between two to eight file name arguments. Vim will open all the files and show differences between them. Works like vimdiff(1). -d {device}, -dev {device} Open {device} for use as a terminal. Only on the Amiga. Example: "-d con:20/30/600/150". -D Debugging. Go to debugging mode when executing the first command from a script. -e Start Vim in Ex mode, just like the executable was called "ex". -E Start Vim in improved Ex mode, just like the executable was called "exim". -f Foreground. For the GUI version, Vim will not fork and detach from the shell it was started in. On the Amiga, Vim is not restarted to open a new window. This option should be used when Vim is executed by a program that will wait for the edit session to finish (e.g. mail). On the Amiga the ":sh" and ":!" commands will not work. --nofork Foreground. For the GUI version, Vim will not fork and detach from the shell it was started in. -F If Vim has been compiled with FKMAP support for editing right-to-left oriented files and Farsi keyboard mapping, this option starts Vim in Farsi mode, i.e. 'fkmap' and 'rightleft' are set. Otherwise an error message is given and Vim aborts. -g If Vim has been compiled with GUI support, this option enables the GUI. If no GUI support was compiled in, an error message is given and Vim aborts. --gui-dialog-file {name} When using the GUI, instead of showing a dialog, write the title and message of the dialog to file {name}. The file is created or appended to. Only useful for testing, to avoid that the test gets stuck on a dialog that can't be seen. Without the GUI the argument is ignored. --help, -h, -? Give a bit of help about the command line arguments and options. After this Vim exits. -H If Vim has been compiled with RIGHTLEFT support for editing right-to-left oriented files and Hebrew keyboard mapping, this option starts Vim in Hebrew mode, i.e. 'hkmap' and 'rightleft' are set. Otherwise an error message is given and Vim aborts. -i {viminfo} Specifies the filename to use when reading or writing the viminfo file, instead of the default "~/.viminfo". This can also be used to skip the use of the .viminfo file, by giving the name "NONE". -L Same as -r. -l Lisp mode. Sets the 'lisp' and 'showmatch' options on. -m Modifying files is disabled. Resets the 'write' option. You can still modify the buffer, but writing a file is not possible. -M Modifications not allowed. The 'modifiable' and 'write' options will be unset, so that changes are not allowed and files can not be written. Note that these options can be set to enable making modifications. -N No-compatible mode. Resets the 'compatible' option. This will make Vim behave a bit better, but less Vi compatible, even though a .vimrc file does not exist. -n No swap file will be used. Recovery after a crash will be impossible. Handy if you want to edit a file on a very slow medium (e.g. floppy). Can also be done with ":set uc=0". Can be undone with ":set uc=200". -nb Become an editor server for NetBeans. See the docs for details. -o[N] Open N windows stacked. When N is omitted, open one window for each file. -O[N] Open N windows side by side. When N is omitted, open one window for each file. -p[N] Open N tab pages. When N is omitted, open one tab page for each file. -P {parent-title} Win32 GUI only: Specify the title of the parent application. When possible, Vim will run in an MDI window inside the application. {parent-title} must appear in the window title of the parent application. Make sure that it is specific enough. Note that the implementation is still primitive. It won't work with all applications and the menu doesn't work. -R Read-only mode. The 'readonly' option will be set. You can still edit the buffer, but will be prevented from accidentally overwriting a file. If you do want to overwrite a file, add an exclamation mark to the Ex command, as in ":w!". The -R option also implies the -n option (see above). The 'readonly' option can be reset with ":set noro". See ":help 'readonly'". -r List swap files, with information about using them for recovery. -r {file} Recovery mode. The swap file is used to recover a crashed editing session. The swap file is a file with the same filename as the text file with ".swp" appended. See ":help recovery". -s Silent mode. Only when started as "Ex" or when the "-e" option was given before the "-s" option. -s {scriptin} The script file {scriptin} is read. The characters in the file are interpreted as if you had typed them. The same can be done with the command ":source! {scriptin}". If the end of the file is reached before the editor exits, further characters are read from the keyboard. -T {terminal} Tells Vim the name of the terminal you are using. Only required when the automatic way doesn't work. Should be a terminal known to Vim (builtin) or defined in the termcap or terminfo file. --not-a-term Tells Vim that the user knows that the input and/or output is not connected to a terminal. This will avoid the warning and the two second delay that would happen. --ttyfail When stdin or stdout is not a a terminal (tty) then exit right away. -u {vimrc} Use the commands in the file {vimrc} for initializations. All the other initializations are skipped. Use this to edit a special kind of files. It can also be used to skip all initializations by giving the name "NONE". See ":help initialization" within vim for more details. -U {gvimrc} Use the commands in the file {gvimrc} for GUI initializations. All the other GUI initializations are skipped. It can also be used to skip all GUI initializations by giving the name "NONE". See ":help gui-init" within vim for more details. -V[N] Verbose. Give messages about which files are sourced and for reading and writing a viminfo file. The optional number N is the value for 'verbose'. Default is 10. -V[N]{filename} Like -V and set 'verbosefile' to {filename}. The result is that messages are not displayed but written to the file {filename}. {filename} must not start with a digit. --log {filename} If Vim has been compiled with eval and channel feature, start logging and write entries to {filename}. This works like calling ch_logfile({filename}, 'ao') very early during startup. -v Start Vim in Vi mode, just like the executable was called "vi". This only has effect when the executable is called "ex". -w{number} Set the 'window' option to {number}. -w {scriptout} All the characters that you type are recorded in the file {scriptout}, until you exit Vim. This is useful if you want to create a script file to be used with "vim -s" or ":source!". If the {scriptout} file exists, characters are appended. -W {scriptout} Like -w, but an existing file is overwritten. -x Use encryption when writing files. Will prompt for a crypt key. -X Don't connect to the X server. Shortens startup time in a terminal, but the window title and clipboard will not be used. -y Start Vim in easy mode, just like the executable was called "evim" or "eview". Makes Vim behave like a click-and-type editor. -Z Restricted mode. Works like the executable starts with "r". -- Denotes the end of the options. Arguments after this will be handled as a file name. This can be used to edit a filename that starts with a '-'. --clean Do not use any personal configuration (vimrc, plugins, etc.). Useful to see if a problem reproduces with a clean Vim setup. --echo-wid GTK GUI only: Echo the Window ID on stdout. --literal Take file name arguments literally, do not expand wildcards. This has no effect on Unix where the shell expands wildcards. --noplugin Skip loading plugins. Implied by -u NONE. --remote Connect to a Vim server and make it edit the files given in the rest of the arguments. If no server is found a warning is given and the files are edited in the current Vim. --remote-expr {expr} Connect to a Vim server, evaluate {expr} in it and print the result on stdout. --remote-send {keys} Connect to a Vim server and send {keys} to it. --remote-silent As --remote, but without the warning when no server is found. --remote-wait As --remote, but Vim does not exit until the files have been edited. --remote-wait-silent As --remote-wait, but without the warning when no server is found. --serverlist List the names of all Vim servers that can be found. --servername {name} Use {name} as the server name. Used for the current Vim, unless used with a --remote argument, then it's the name of the server to connect to. --socketid {id} GTK GUI only: Use the GtkPlug mechanism to run gvim in another window. --startuptime {file} During startup write timing messages to the file {fname}. --version Print version information and exit. --windowid {id} Win32 GUI only: Make gvim try to use the window {id} as a parent, so that it runs inside that window. ON-LINE HELP Type ":help" in Vim to get started. Type ":help subject" to get help on a specific subject. For example: ":help ZZ" to get help for the "ZZ" command. Use <Tab> and CTRL-D to complete subjects (":help cmdline-completion"). Tags are present to jump from one place to another (sort of hypertext links, see ":help"). All documentation files can be viewed in this way, for example ":help syntax.txt". FILES /usr/local/share/vim/vim??/doc/*.txt The Vim documentation files. Use ":help doc-file-list" to get the complete list. vim?? is short version number, like vim91 for Vim 9.1 /usr/local/share/vim/vim??/doc/tags The tags file used for finding information in the documentation files. /usr/local/share/vim/vim??/syntax/syntax.vim System wide syntax initializations. /usr/local/share/vim/vim??/syntax/*.vim Syntax files for various languages. /usr/local/share/vim/vimrc System wide Vim initializations. ~/.vimrc, ~/.vim/vimrc, $XDG_CONFIG_HOME/vim/vimrc Your personal Vim initializations (first one found is used). /usr/local/share/vim/gvimrc System wide gvim initializations. ~/.gvimrc, ~/.vim/gvimrc, $XDG_CONFIG_HOME/vim/gvimrc Your personal gvim initializations (first one found is used). /usr/local/share/vim/vim??/optwin.vim Script used for the ":options" command, a nice way to view and set options. /usr/local/share/vim/vim??/menu.vim System wide menu initializations for gvim. /usr/local/share/vim/vim??/bugreport.vim Script to generate a bug report. See ":help bugs". /usr/local/share/vim/vim??/filetype.vim Script to detect the type of a file by its name. See ":help 'filetype'". /usr/local/share/vim/vim??/scripts.vim Script to detect the type of a file by its contents. See ":help 'filetype'". /usr/local/share/vim/vim??/print/*.ps Files used for PostScript printing. For recent info read the VIM home page: <URL:http://www.vim.org/> SEE ALSO vimtutor(1) AUTHOR Most of Vim was made by Bram Moolenaar, with a lot of help from others. See ":help credits" in Vim. Vim is based on Stevie, worked on by: Tim Thompson, Tony Andrews and G.R. (Fred) Walter. Although hardly any of the original code remains. BUGS Probably. See ":help todo" for a list of known problems. Note that a number of things that may be regarded as bugs by some, are in fact caused by a too-faithful reproduction of Vi's behaviour. And if you think other things are bugs "because Vi does it differently", you should take a closer look at the vi_diff.txt file (or type :help vi_diff.txt when in Vim). Also have a look at the 'compatible' and 'cpoptions' options. 2024 Jun 04 VIM(1)
| null |
jjs
| null | null | null | null | null |
spfquery
|
spfquery checks if a given set of e-mail parameters (e.g., the SMTP sender's IP address) matches the responsible domain's Sender Policy Framework (SPF) policy. For more information on SPF see <http://www.openspf.org>. Preferred Usage The following usage forms are preferred over the legacy forms used by older spfquery versions: The --identity form checks if the given ip-address is an authorized SMTP sender for the given "helo" hostname, "mfrom" envelope sender e-mail address, or "pra" (so-called purported resonsible address) e-mail address, depending on the value of the --scope option (which defaults to mfrom if omitted). The --file form reads "ip-address identity [helo-identity]" tuples from the file with the specified filename, or from standard input if filename is -, and checks them against the specified scope (mfrom by default). Both forms support an optional --versions option, which specifies a comma-separated list of the SPF version numbers of SPF records that may be used. 1 means that "v=spf1" records should be used. 2 means that "spf2.0" records should be used. Defaults to 1,2, i.e., uses any SPF records that are available. Records of a higher version are preferred. Legacy Usage spfquery versions before 2.500 featured the following usage forms, which are discouraged but still supported for backwards compatibility: The --helo form checks if the given ip-address is an authorized SMTP sender for the "HELO" hostname given as the identity (so-called "HELO" check). The --mfrom form checks if the given ip-address is an authorized SMTP sender for the envelope sender email-address (or domain) given as the identity (so-called "MAIL FROM" check). If a domain is given instead of an e-mail address, "postmaster" will be substituted for the localpart. The --pra form checks if the given ip-address is an authorized SMTP sender for the PRA (Purported Responsible Address) e-mail address given as the identity. Other Usage The --version form prints version information of spfquery. The --help form prints usage information for spfquery.
|
spfquery - (Mail::SPF) - Checks if a given set of e-mail parameters matches a domain's SPF policy VERSION 2.501
|
Preferred usage: spfquery [--versions|-v 1|2|1,2] [--scope|-s helo|mfrom|pra] --identity|--id identity --ip-address|--ip ip-address [--helo-identity|--helo-id helo-identity] [OPTIONS] spfquery [--versions|-v 1|2|1,2] [--scope|-s helo|mfrom|pra] --file|-f filename|- [OPTIONS] Legacy usage: spfquery --helo helo-identity --ip-address|--ip ip-address [OPTIONS] spfquery --mfrom mfrom-identity --ip-address|--ip ip-address [--helo helo-identity] [OPTIONS] spfquery --pra pra-identity --ip-address|--ip ip-address [OPTIONS] Other usage: spfquery --version|-V spfquery --help
|
Standard Options The preferred and legacy forms optionally take any of the following OPTIONS: --default-explanation string --def-exp string Use the specified string as the default explanation if the authority domain does not specify an explanation string of its own. --hostname hostname Use hostname as the host name of the local system instead of auto- detecting it. --keep-comments --no-keep-comments Do (not) print any comments found when reading from a file or from standard input. --sanitize (currently ignored) --no-sanitize (currently ignored) Do (not) sanitize the output by condensing consecutive white-space into a single space and replacing non-printable characters with question marks. Enabled by default. --debug (currently ignored) Print out debug information. Black Magic Options Several options that were supported by earlier versions of spfquery are considered black magic (i.e. potentially dangerous for the innocent user) and are thus disabled by default. If the Mail::SPF::BlackMagic Perl module is installed, they may be enabled by specifying --enable-black-magic. --max-dns-interactive-terms n Evaluate a maximum of n DNS-interactive mechanisms and modifiers per SPF check. Defaults to 10. Do not override the default unless you know what you are doing! --max-name-lookups-per-term n Perform a maximum of n DNS name look-ups per mechanism or modifier. Defaults to 10. Do not override the default unless you know what you are doing! --authorize-mxes-for email-address|domain,... Consider all the MXes of the comma-separated list of email- addresses and domains as inherently authorized. --tfwl Perform "trusted-forwarder.org" accreditation checking. --guess spf-terms Use spf-terms as a default record if no SPF record is found. --local spf-terms Process spf-terms as local policy before resorting to a default result (the implicit or explicit "all" mechanism at the end of the domain's SPF record). For example, this could be used for white- listing one's secondary MXes: "mx:mydomain.example.org". --override domain=spf-record --fallback domain=spf-record Set overrides and fallbacks. Each option can be specified multiple times. For example: --override example.org='v=spf1 -all' --override '*.example.net'='v=spf1 a mx -all' --fallback example.com='v=spf1 -all' RESULT CODES pass The specified IP address is an authorized SMTP sender for the identity. fail The specified IP address is not an authorized SMTP sender for the identity. softfail The specified IP address is not an authorized SMTP sender for the identity, however the authority domain is still testing out its SPF policy. neutral The identity's authority domain makes no assertion about the status of the IP address. permerror A permanent error occurred while evaluating the authority domain's policy (e.g., a syntax error in the SPF record). Manual intervention is required from the authority domain. temperror A temporary error occurred while evaluating the authority domain's policy (e.g., a DNS error). Try again later. none There is no applicable SPF policy for the identity domain. EXIT CODES Result | Exit code -----------+----------- pass | 0 fail | 1 softfail | 2 neutral | 3 permerror | 4 temperror | 5 none | 6
|
spfquery --scope mfrom --id user@example.com --ip 1.2.3.4 spfquery --file test_data echo "127.0.0.1 user@example.com helohost.example.com" | spfquery -f - COMPATIBILITY spfquery has undergone the following interface changes compared to earlier versions: 2.500 • A new preferred usage style for performing individual SPF checks has been introduced. The new style accepts a unified --identity option and an optional --scope option that specifies the type (scope) of the identity. In contrast, the legacy usage style requires a separate usage form for every supported scope. See "Preferred usage" and "Legacy usage" for details. • The former "unknown" and "error" result codes have been renamed to "permerror" and "temperror", respectively, in order to comply with RFC 4408 terminology. • SPF checks with an empty identity are no longer supported. In the case of an empty "MAIL FROM" SMTP transaction parameter, perform a check with the "helo" scope directly. • The --debug and --(no-)sanitize options are currently ignored by this version of spfquery. They will again be supported in the future. • Several features that were supported by earlier versions of spfquery are considered black magic and thus are now disabled by default. See "Black Magic Options". • Several option names have been deprecated. This is a list of them and their preferred synonyms: Deprecated options | Preferred options ---------------------+----------------------------- --sender, -s | --mfrom --ipv4, -i | --ip-address, --ip --name | --hostname --max-lookup-count, | --max-dns-interactive-terms --max-lookup | --rcpt-to, -r | --authorize-mxes-for --trusted | --tfwl SEE ALSO Mail::SPF, spfd(8) <http://tools.ietf.org/html/rfc4408> AUTHORS This version of spfquery is a complete rewrite by Julian Mehnle <julian@mehnle.net>, based on an earlier version written by Meng Weng Wong <mengwong+spf@pobox.com> and Wayne Schlitt <wayne@schlitt.net>. perl v5.34.0 2024-04-13 SPFQUERY(1)
|
sample
|
sample is a command-line tool for gathering data about the running behavior of a process. It suspends the process at specified intervals (by default, every 1 millisecond), records the call stacks of all threads in the process at that time, then resumes the process. The analysis done by sample is called ``sampling'' because it only checks the state of the program at the sampling points. The analysis may miss execution of some functions that are not executing during one of the samples, but sample still provides useful data about commonly executing functions. At the end of the sampling duration, sample produces a report showing which functions were executing during the sampling. The data is condensed into a call tree, showing the functions seen on the stack and how they were called. (This tree is a subset of the actual call tree for the execution, since some functions may not have been executing during any of the sampling events.) The tree is displayed textually, with called functions indented one level to the right of the callee. In the call tree, if a function calls more than one function then a vertical line is printed to visually connect those separate children functions, making it easier to see which functions are at the same level. The characters used to draw those lines, such as + | : ! are arbitrary and have no specific meaning. ARGUMENTS The user of sample specifies a target process (either by process id, or by name), the duration of the sampling run (in seconds), and a sampling rate (in milliseconds). If the sampling duration is not specified, a default of 10 seconds is used. Longer sampling durations provide better data by collecting more samples, but could also be confusing if the target process performs many different types of operations during that period. The default sampling rate is 1 millisecond. Fast sampling rates provide more samples and a better chance to capture all the functions that are executing. -wait tells sample to wait for the process specified (usually as a partial name or hint) to exist, then start sampling that process. This option allows you to sample from an application's launch. -mayDie tells sample to immediately grab the location of symbols from the application, on the assumption that the application may exit or crash at any point during the sampling. This ensures that sample can give information about the call stacks even if the process no longer exists. -fullPaths tells sample to show the full path to the source code (rather than just the file name) for any symbol in a binary image for which debug information is available. The full path was the path to the source code when the binary image was built. -e tells sample to open the output in TextEdit automatically when sampling completes. -file filename tells sample the full path to where the output should be written. If this flag is not specified, results are written to a file in /tmp called <application name>_<date>_<time>.<XXXX>.sample.txt, where each 'X' is replaced by a random alphanumeric character. If neither the -e nor -file flags are given, the output gets written to stdout as well as saved to the file in /tmp. SEE ALSO filtercalltree(1), spindump(8) The Xcode developer tools also include Instruments, a graphical application that can give information similar to that provided by sample. The Time Profiler instrument graphically displays dynamic, real-time CPU sampling information. macOS 14.5 Mar. 16, 2013 macOS 14.5
|
sample – Profile a process during a time interval
|
sample pid | partial-executable-name [duration [samplingInterval]] [-wait] [-mayDie] [-fullPaths] [-e] [-file filename]
| null | null |
bg
|
Shell builtin commands are commands that can be executed within the running shell's process. Note that, in the case of csh(1) builtin commands, the command is executed in a subshell if it occurs as any component of a pipeline except the last. If a command specified to the shell contains a slash ‘/’, the shell will not execute a builtin command, even if the last component of the specified command matches the name of a builtin command. Thus, while specifying “echo” causes a builtin command to be executed under shells that support the echo builtin command, specifying “/bin/echo” or “./echo” does not. While some builtin commands may exist in more than one shell, their operation may be different under each shell which supports them. Below is a table which lists shell builtin commands, the standard shells that support them and whether they exist as standalone utilities. Only builtin commands for the csh(1) and sh(1) shells are listed here. Consult a shell's manual page for details on the operation of its builtin commands. Beware that the sh(1) manual page, at least, calls some of these commands “built-in commands” and some of them “reserved words”. Users of other shells may need to consult an info(1) page or other sources of documentation. Commands marked “No**” under External do exist externally, but are implemented as scripts using a builtin command of the same name. Command External csh(1) sh(1) ! No No Yes % No Yes No . No No Yes : No Yes Yes @ No Yes Yes [ Yes No Yes { No No Yes } No No Yes alias No** Yes Yes alloc No Yes No bg No** Yes Yes bind No No Yes bindkey No Yes No break No Yes Yes breaksw No Yes No builtin No No Yes builtins No Yes No case No Yes Yes cd No** Yes Yes chdir No Yes Yes command No** No Yes complete No Yes No continue No Yes Yes default No Yes No dirs No Yes No do No No Yes done No No Yes echo Yes Yes Yes echotc No Yes No elif No No Yes else No Yes Yes end No Yes No endif No Yes No endsw No Yes No esac No No Yes eval No Yes Yes exec No Yes Yes exit No Yes Yes export No No Yes false Yes No Yes fc No** No Yes fg No** Yes Yes filetest No Yes No fi No No Yes for No No Yes foreach No Yes No getopts No** No Yes glob No Yes No goto No Yes No hash No** No Yes hashstat No Yes No history No Yes No hup No Yes No if No Yes Yes jobid No No Yes jobs No** Yes Yes kill Yes Yes Yes limit No Yes No local No No Yes log No Yes No login Yes Yes No logout No Yes No ls-F No Yes No nice Yes Yes No nohup Yes Yes No notify No Yes No onintr No Yes No popd No Yes No printenv Yes Yes No printf Yes No Yes pushd No Yes No pwd Yes No Yes read No** No Yes readonly No No Yes rehash No Yes No repeat No Yes No return No No Yes sched No Yes No set No Yes Yes setenv No Yes No settc No Yes No setty No Yes No setvar No No Yes shift No Yes Yes source No Yes No stop No Yes No suspend No Yes No switch No Yes No telltc No Yes No test Yes No Yes then No No Yes time Yes Yes No times No No Yes trap No No Yes true Yes No Yes type No** No Yes ulimit No** No Yes umask No** Yes Yes unalias No** Yes Yes uncomplete No Yes No unhash No Yes No unlimit No Yes No unset No Yes Yes unsetenv No Yes No until No No Yes wait No** Yes Yes where No Yes No which Yes Yes No while No Yes Yes SEE ALSO csh(1), dash(1), echo(1), false(1), info(1), kill(1), login(1), nice(1), nohup(1), printenv(1), printf(1), pwd(1), sh(1), test(1), time(1), true(1), which(1), zsh(1) HISTORY The builtin manual page first appeared in FreeBSD 3.4. AUTHORS This manual page was written by Sheldon Hearn <sheldonh@FreeBSD.org>. macOS 14.5 December 21, 2010 macOS 14.5
|
builtin, !, %, ., :, @, [, {, }, alias, alloc, bg, bind, bindkey, break, breaksw, builtins, case, cd, chdir, command, complete, continue, default, dirs, do, done, echo, echotc, elif, else, end, endif, endsw, esac, eval, exec, exit, export, false, fc, fg, filetest, fi, for, foreach, getopts, glob, goto, hash, hashstat, history, hup, if, jobid, jobs, kill, limit, local, log, login, logout, ls-F, nice, nohup, notify, onintr, popd, printenv, printf, pushd, pwd, read, readonly, rehash, repeat, return, sched, set, setenv, settc, setty, setvar, shift, source, stop, suspend, switch, telltc, test, then, time, times, trap, true, type, ulimit, umask, unalias, uncomplete, unhash, unlimit, unset, unsetenv, until, wait, where, which, while – shell built-in commands
|
See the built-in command description in the appropriate shell manual page.
| null | null |
lipo
|
The lipo tool creates or operates on ``universal'' (multi-architecture) files. Generally, lipo reads a single input file and writes to a single output file, although some commands and options accept multiple input files. lipo will only ever write to a single output file, and input files are never modified in place. lipo supports a number of commands for creating universal files from single-architecture files, extracting single-architecture files from universal files, and displaying architecture information. lipo can only perform one such command at a time, although some command flags may appear more than once. Some commands support additional options that can be used with that command. In addition, there are global options that are supported by multiple commands. The arch_type arguments may be any of the supported architecture names listed in the man page arch(3). COMMANDS -archs Display only the architecture names present in a single input file. Each architecture name is a single word, making this option suitable for shell scripting. Unknown architectures will be represented by "unknown" along with the numeric CPU type and CPU subtype values as a single word. -create Create one universal output file from one or more input files. When input files specified on the command-line, all of the architectures in each file will be copied into the output file, whereas when input files are included using the global -arch option, only the specified architecture will be copied from that input file. This command requires the -output option. -detailed_info Display a detailed list of the architecture types in the input universal file (all the the information in the universal header, for each architecture in the file). -extract arch_type [-extract arch_type...] Take one universal input file and copy the arch_type from that universal file into a universal output file containing only that architecture. This command requires the -output option. -extract_family arch_type [-extract_family arch_type...] Take one universal input file and copy all of the arch_types for the family that arch_type is in from that universal file into an output file containing only those architectures. The file will be thin if only one architecture is found or universal otherwise. This command requires the -output option. -info Display a brief description of each input file along with the names of each architecture type in that input file. -remove arch_type [-remove arch_type ...] Take one universal input file and remove the arch_type from that universal file, placing the result in the output file. This command requires the -output option. -replace arch_type file_name [-replace arch_type file_name...] Take one universal input file; in the output file, replace the arch_type contents of the input file with the contents of the specified file_name. This command requires the -output option. -thin arch_type Take one input file and create a thin output file with the specified arch_type. This command requires the -output option. -verify_arch arch_type ... Take one input file and verify the specified arch_types are present in the file. If so then exit with a status of 0 else exit with a status of 1. Because more than one arch_type can be verified at once, all of the input files must appear before the -verify_arch flag on the command-line.
|
lipo - create or operate on universal files
|
lipo input_file command [option...]
|
-arch arch_type input_file Tells lipo that input_file contains the specified architecture type. The -arch arch_type specification is unnecessary if input_file is an object file, a universal file, or some other file whose architecture(s) lipo can figure out. -hideARM64 When creating a universal binary including both 32-bit and 64-bit ARM files, this option will ask lipo to add the 64-bit files at the end and not include them in the count of architectures present in the file. The files must be executable files (Mach-O filetype MH_EXECUTE). This option has no effect if neither 32-bit ARM nor 64-bit ARM files are present, and no other files may be hidden in this way. This option only works with the -create, -remove, and -replace, commands, and is only intended for tools and workflows testing a workaround on older systems. -output output_file Commands that create new files write to the output file specified by the -output flag. This option is required for the -create, -extract, -extract_family, -remove, -replace, and -thin commands. -segalign arch_type value Set the segment alignment of the specified arch_type when creating a universal file containing that architecture. value is a hexadecimal number that must be an integral power of 2. This is only needed when lipo can't figure out the alignment of an input file (currently not an object file), or when it guesses at the alignment too conservatively. The default for files unknown to lipo is 0 (2^0, or an alignment of one byte), and the default alignment for archives is 4 (2^2, or 4-byte alignment). SEE ALSO arch(3) Apple Computer, Inc. August 31, 2018 LIPO(1)
| null |
seeksize.d
|
seeksize.d is a simple DTrace program to print a report of disk event seeks by process. This can be used to identify whether processes are accessing the disks in a "random" or "sequential" manner. Sequential is often desirable, indicated by mostly zero length seeks. Since this uses DTrace, only users with root privileges can run this command.
|
seeksize.d - print disk event seek report. Uses DTrace.
|
seeksize.d
| null |
Sample until Ctrl-C is hit then print report, # seeksize.d FIELDS PID process ID CMD command and argument list value distance in disk blocks (sectors) count number of I/O operations DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. EXIT seeksize.d will sample until Ctrl-C is hit. AUTHOR Brendan Gregg [Sydney, Australia] SEE ALSO iosnoop(1M), bitesize.d(1M), dtrace(1M) version 0.95 May 14, 2005 seeksize.d(1m)
|
eyapp
|
The eyapp compiler is a front-end to the Parse::Eyapp module, which lets you compile Parse::Eyapp grammar input files into Perl LALR(1) Object Oriented parser modules. OPTIONS IN DETAIL -v Creates a file grammar.output describing your parser. It will show you a summary of conflicts, rules, the DFA (Deterministic Finite Automaton) states and overall usage of the parser. Implies option "-N". To produce a more detailed description of the states, the LALR tables aren't compacted. Use the combination "-vN" to produce an ".output" file corresponding to the compacted tables. -s Create a standalone module in which the parsing driver is included. The modules including the LALR driver (Parse::Eyapp::Driver), those for AST manipulations (Parse::Eyapp::Node and Parse::Eyapp::YATW)) and Parse::Eyapp::Base are included - almost verbatim - inside the generated module. Note that if you have more than one parser module called from a program, to have it standalone, you need this option only for one of your grammars; -n Disable source file line numbering embedded in your parser module. I don't know why one should need it, but it's there. -m module Gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) of module. It defaults to grammar -o outfile The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m A::Module::Name (see below), to Name.pm. -c grammar[.eyp] Produces as output (STDOUT) the grammar without the actions. Only the syntactic parts are displayed. Comments will be also stripped if the "-v" option is added. -t filename The -t filename option allows you to specify a file which should be used as template for generating the parser output. The default is to use the internal template defined in Parse::Eyapp::Output.pm. For how to write your own template and which substitutions are available, have a look to the module Parse::Eyapp::Output.pm : it should be obvious. -b shebang If you work on systems that understand so called shebangs, and your generated parser is directly an executable script, you can specify one with the -b option, ie: eyapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp This will output a file called myscript.pl whose very first line is: #!/usr/local/bin/perl -w The argument is mandatory, but if you specify an empty string, the value of $Config{perlpath} will be used instead. -B prompt Adds a modulino call '__PACKAGE->main(<prompt>) unless caller();' as the very last line of the output file. The argument is mandatory. -C grammar.eyp An abbreviation for the combined use of -b '' and -B '' -T grammar.eyp Equivalent to %tree. -N grammar.eyp Equivalent to the directive %nocompact. Do not compact LALR action tables. -l Do not provide a default lexical analyzer. By default "eyapp" builds a lexical analyzer from your "%token = /regexp/" definitions grammar The input grammar file. If no suffix is given, and the file does not exists, an attempt to open the file with a suffix of .eyp is tried before exiting. -V Display current version of Parse::Eyapp and gracefully exits. -h Display the usage screen. EXAMPLE The following "eyapp" program translates an infix expression like "2+3*4" to postfix: "2 3 4 * +" %token NUM = /([0-9]+(?:\.[0-9]+)?)/ %token VAR = /([A-Za-z][A-Za-z0-9_]*)/ %right '=' %left '-' '+' %left '*' '/' %left NEG %defaultaction { "$left $right $op"; } %% line: $exp { print "$exp\n" } ; exp: $NUM { $NUM } | $VAR { $VAR } | VAR.left '='.op exp.right | exp.left '+'.op exp.right | exp.left '-'.op exp.right | exp.left '*'.op exp.right | exp.left '/'.op exp.right | '-' $exp %prec NEG { "$exp NEG" } | '(' $exp ')' { $exp } ; %% Notice that there is no need to write lexer and error report subroutines. First, we compile the grammar: pl@nereida:~/LEyapp/examples/eyappintro$ eyapp -o postfix.pl -C Postfix.eyp If we use the "-C" option and no "main()" was written one default "main" sub is provided. We can now execute the resulting program: pl@nereida:~/LEyapp/examples/eyappintro$ ./postfix.pl -c 'a = 2*3 +b' a 2 3 * b + = When a non conformant input is given, it produces an accurate error message: pl@nereida:~/LEyapp/examples/eyappintro$ ./postfix.pl -c 'a = 2**3 +b' Syntax error near '*'. Expected one of these terminals: '-' 'NUM' 'VAR' '(' There were 1 errors during parsing AUTHOR Casiano Rodriguez-Leon COPYRIGHT Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012 Casiano Rodriguez- Leon. Copyright © 2017 William N. Braswell, Jr. All Rights Reserved. Parse::Yapp is Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. Parse::Yapp is Copyright © 2017 William N. Braswell, Jr. All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. SEE ALSO • Parse::Eyapp, • perldoc vgg, • The tutorial Parsing Strings and Trees with "Parse::Eyapp" (An Introduction to Compiler Construction in seven pages)> in • The pdf file in <http://nereida.deioc.ull.es/~pl/perlexamples/Eyapp.pdf> • <http://nereida.deioc.ull.es/~pl/perlexamples/section_eyappts.html> (Spanish), • eyapp, • treereg, • Parse::yapp, • yacc(1), • bison(1), • the classic book "Compilers: Principles, Techniques, and Tools" by Alfred V. Aho, Ravi Sethi and • Jeffrey D. Ullman (Addison-Wesley 1986) • Parse::RecDescent. POD ERRORS Hey! The above document had some coding errors, which are explained below: Around line 199: Non-ASCII character seen before =encoding in '©'. Assuming UTF-8 perl v5.34.0 2017-06-14 EYAPP(1)
|
eyapp - A Perl front-end to the Parse::Eyapp module
|
eyapp [options] grammar[.eyp] eyapp -V eyapp -h grammar The grammar file. If no suffix is given, and the file does not exists, .eyp is added
| null | null |
clang++
|
clang is a C, C++, and Objective-C compiler which encompasses preprocessing, parsing, optimization, code generation, assembly, and linking. Depending on which high-level mode setting is passed, Clang will stop before doing a full link. While Clang is highly integrated, it is important to understand the stages of compilation, to understand how to invoke it. These stages are: Driver The clang executable is actually a small driver which controls the overall execution of other tools such as the compiler, assembler and linker. Typically you do not need to interact with the driver, but you transparently use it to run the other tools. Preprocessing This stage handles tokenization of the input source file, macro expansion, #include expansion and handling of other preprocessor directives. The output of this stage is typically called a ".i" (for C), ".ii" (for C++), ".mi" (for Objective-C), or ".mii" (for Objective-C++) file. Parsing and Semantic Analysis This stage parses the input file, translating preprocessor tokens into a parse tree. Once in the form of a parse tree, it applies semantic analysis to compute types for expressions as well and determine whether the code is well formed. This stage is responsible for generating most of the compiler warnings as well as parse errors. The output of this stage is an "Abstract Syntax Tree" (AST). Code Generation and Optimization This stage translates an AST into low-level intermediate code (known as "LLVM IR") and ultimately to machine code. This phase is responsible for optimizing the generated code and handling target-specific code generation. The output of this stage is typically called a ".s" file or "assembly" file. Clang also supports the use of an integrated assembler, in which the code generator produces object files directly. This avoids the overhead of generating the ".s" file and of calling the target assembler. Assembler This stage runs the target assembler to translate the output of the compiler into a target object file. The output of this stage is typically called a ".o" file or "object" file. Linker This stage runs the target linker to merge multiple object files into an executable or dynamic library. The output of this stage is typically called an "a.out", ".dylib" or ".so" file. Clang Static Analyzer The Clang Static Analyzer is a tool that scans source code to try to find bugs through code analysis. This tool uses many parts of Clang and is built into the same driver. Please see <https://clang-analyzer.llvm.org> for more details on how to use the static analyzer.
|
clang - the Clang C, C++, and Objective-C compiler
|
clang [options] filename ...
|
Stage Selection Options -E Run the preprocessor stage. -fsyntax-only Run the preprocessor, parser and semantic analysis stages. -S Run the previous stages as well as LLVM generation and optimization stages and target-specific code generation, producing an assembly file. -c Run all of the above, plus the assembler, generating a target ".o" object file. no stage selection option If no stage selection option is specified, all stages above are run, and the linker is run to combine the results into an executable or shared library. Language Selection and Mode Options -x <language> Treat subsequent input files as having type language. -std=<standard> Specify the language standard to compile for. Supported values for the C language are: c89 c90 iso9899:1990 ISO C 1990 iso9899:199409 ISO C 1990 with amendment 1 gnu89 gnu90 ISO C 1990 with GNU extensions c99 iso9899:1999 ISO C 1999 gnu99 ISO C 1999 with GNU extensions c11 iso9899:2011 ISO C 2011 gnu11 ISO C 2011 with GNU extensions c17 iso9899:2017 ISO C 2017 gnu17 ISO C 2017 with GNU extensions The default C language standard is gnu17, except on PS4, where it is gnu99. Supported values for the C++ language are: c++98 c++03 ISO C++ 1998 with amendments gnu++98 gnu++03 ISO C++ 1998 with amendments and GNU extensions c++11 ISO C++ 2011 with amendments gnu++11 ISO C++ 2011 with amendments and GNU extensions c++14 ISO C++ 2014 with amendments gnu++14 ISO C++ 2014 with amendments and GNU extensions c++17 ISO C++ 2017 with amendments gnu++17 ISO C++ 2017 with amendments and GNU extensions c++20 ISO C++ 2020 with amendments gnu++20 ISO C++ 2020 with amendments and GNU extensions c++2b Working draft for ISO C++ 2023 gnu++2b Working draft for ISO C++ 2023 with GNU extensions The default C++ language standard is gnu++98. Supported values for the OpenCL language are: cl1.0 OpenCL 1.0 cl1.1 OpenCL 1.1 cl1.2 OpenCL 1.2 cl2.0 OpenCL 2.0 The default OpenCL language standard is cl1.0. Supported values for the CUDA language are: cuda NVIDIA CUDA(tm) -stdlib=<library> Specify the C++ standard library to use; supported options are libstdc++ and libc++. If not specified, platform default will be used. -rtlib=<library> Specify the compiler runtime library to use; supported options are libgcc and compiler-rt. If not specified, platform default will be used. -ansi Same as -std=c89. -ObjC, -ObjC++ Treat source input files as Objective-C and Object-C++ inputs respectively. -trigraphs Enable trigraphs. -ffreestanding Indicate that the file should be compiled for a freestanding, not a hosted, environment. Note that it is assumed that a freestanding environment will additionally provide memcpy, memmove, memset and memcmp implementations, as these are needed for efficient codegen for many programs. -fno-builtin Disable special handling and optimizations of well-known library functions, like strlen() and malloc(). -fno-builtin-<function> Disable special handling and optimizations for the specific library function. For example, -fno-builtin-strlen removes any special handling for the strlen() library function. -fno-builtin-std-<function> Disable special handling and optimizations for the specific C++ standard library function in namespace std. For example, -fno-builtin-std-move_if_noexcept removes any special handling for the std::move_if_noexcept() library function. For C standard library functions that the C++ standard library also provides in namespace std, use -fno-builtin-<function> instead. -fmath-errno Indicate that math functions should be treated as updating errno. -fpascal-strings Enable support for Pascal-style strings with "\pfoo". -fms-extensions Enable support for Microsoft extensions. -fmsc-version= Set _MSC_VER. Defaults to 1300 on Windows. Not set otherwise. -fborland-extensions Enable support for Borland extensions. -fwritable-strings Make all string literals default to writable. This disables uniquing of strings and other optimizations. -flax-vector-conversions, -flax-vector-conversions=<kind>, -fno-lax-vector-conversions Allow loose type checking rules for implicit vector conversions. Possible values of <kind>: • none: allow no implicit conversions between vectors • integer: allow implicit bitcasts between integer vectors of the same overall bit-width • all: allow implicit bitcasts between any vectors of the same overall bit-width <kind> defaults to integer if unspecified. -fblocks Enable the "Blocks" language feature. -fobjc-abi-version=version Select the Objective-C ABI version to use. Available versions are 1 (legacy "fragile" ABI), 2 (non-fragile ABI 1), and 3 (non-fragile ABI 2). -fobjc-nonfragile-abi-version=<version> Select the Objective-C non-fragile ABI version to use by default. This will only be used as the Objective-C ABI when the non-fragile ABI is enabled (either via -fobjc-nonfragile-abi, or because it is the platform default). -fobjc-nonfragile-abi, -fno-objc-nonfragile-abi Enable use of the Objective-C non-fragile ABI. On platforms for which this is the default ABI, it can be disabled with -fno-objc-nonfragile-abi. Target Selection Options Clang fully supports cross compilation as an inherent part of its design. Depending on how your version of Clang is configured, it may have support for a number of cross compilers, or may only support a native target. -arch <architecture> Specify the architecture to build for (Mac OS X specific). -target <architecture> Specify the architecture to build for (all platforms). -mmacosx-version-min=<version> When building for macOS, specify the minimum version supported by your application. -miphoneos-version-min When building for iPhone OS, specify the minimum version supported by your application. --print-supported-cpus Print out a list of supported processors for the given target (specified through --target=<architecture> or -arch <architecture>). If no target is specified, the system default target will be used. -mcpu=?, -mtune=? Acts as an alias for --print-supported-cpus. -march=<cpu> Specify that Clang should generate code for a specific processor family member and later. For example, if you specify -march=i486, the compiler is allowed to generate instructions that are valid on i486 and later processors, but which may not exist on earlier ones. Code Generation Options -O0, -O1, -O2, -O3, -Ofast, -Os, -Oz, -Og, -O, -O4 Specify which optimization level to use: -O0 Means "no optimization": this level compiles the fastest and generates the most debuggable code. -O1 Somewhere between -O0 and -O2. -O2 Moderate level of optimization which enables most optimizations. -O3 Like -O2, except that it enables optimizations that take longer to perform or that may generate larger code (in an attempt to make the program run faster). -Ofast Enables all the optimizations from -O3 along with other aggressive optimizations that may violate strict compliance with language standards. -Os Like -O2 with extra optimizations to reduce code size. -Oz Like -Os (and thus -O2), but reduces code size further. -Og Like -O1. In future versions, this option might disable different optimizations in order to improve debuggability. -O Equivalent to -O1. -O4 and higher Currently equivalent to -O3 -g, -gline-tables-only, -gmodules Control debug information output. Note that Clang debug information works best at -O0. When more than one option starting with -g is specified, the last one wins: -g Generate debug information. -gline-tables-only Generate only line table debug information. This allows for symbolicated backtraces with inlining information, but does not include any information about variables, their locations or types. -gmodules Generate debug information that contains external references to types defined in Clang modules or precompiled headers instead of emitting redundant debug type information into every object file. This option transparently switches the Clang module format to object file containers that hold the Clang module together with the debug information. When compiling a program that uses Clang modules or precompiled headers, this option produces complete debug information with faster compile times and much smaller object files. This option should not be used when building static libraries for distribution to other machines because the debug info will contain references to the module cache on the machine the object files in the library were built on. -fstandalone-debug -fno-standalone-debug Clang supports a number of optimizations to reduce the size of debug information in the binary. They work based on the assumption that the debug type information can be spread out over multiple compilation units. For instance, Clang will not emit type definitions for types that are not needed by a module and could be replaced with a forward declaration. Further, Clang will only emit type info for a dynamic C++ class in the module that contains the vtable for the class. The -fstandalone-debug option turns off these optimizations. This is useful when working with 3rd-party libraries that don't come with debug information. This is the default on Darwin. Note that Clang will never emit type information for types that are not referenced at all by the program. -feliminate-unused-debug-types By default, Clang does not emit type information for types that are defined but not used in a program. To retain the debug info for these unused types, the negation -fno-eliminate-unused-debug-types can be used. -fexceptions Enable generation of unwind information. This allows exceptions to be thrown through Clang compiled stack frames. This is on by default in x86-64. -ftrapv Generate code to catch integer overflow errors. Signed integer overflow is undefined in C. With this flag, extra code is generated to detect this and abort when it happens. -fvisibility This flag sets the default visibility level. -fcommon, -fno-common This flag specifies that variables without initializers get common linkage. It can be disabled with -fno-common. -ftls-model=<model> Set the default thread-local storage (TLS) model to use for thread-local variables. Valid values are: "global-dynamic", "local-dynamic", "initial-exec" and "local-exec". The default is "global-dynamic". The default model can be overridden with the tls_model attribute. The compiler will try to choose a more efficient model if possible. -flto, -flto=full, -flto=thin, -emit-llvm Generate output files in LLVM formats, suitable for link time optimization. When used with -S this generates LLVM intermediate language assembly files, otherwise this generates LLVM bitcode format object files (which may be passed to the linker depending on the stage selection options). The default for -flto is "full", in which the LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where the linker merges all such modules into a single combined module for optimization. With "thin", ThinLTO compilation is invoked instead. NOTE: On Darwin, when using -flto along with -g and compiling and linking in separate steps, you also need to pass -Wl,-object_path_lto,<lto-filename>.o at the linking step to instruct the ld64 linker not to delete the temporary object file generated during Link Time Optimization (this flag is automatically passed to the linker by Clang if compilation and linking are done in a single step). This allows debugging the executable as well as generating the .dSYM bundle using dsymutil(1). Driver Options -### Print (but do not run) the commands to run for this compilation. --help Display available options. -Qunused-arguments Do not emit any warnings for unused driver arguments. -Wa,<args> Pass the comma separated arguments in args to the assembler. -Wl,<args> Pass the comma separated arguments in args to the linker. -Wp,<args> Pass the comma separated arguments in args to the preprocessor. -Xanalyzer <arg> Pass arg to the static analyzer. -Xassembler <arg> Pass arg to the assembler. -Xlinker <arg> Pass arg to the linker. -Xpreprocessor <arg> Pass arg to the preprocessor. -o <file> Write output to file. -print-file-name=<file> Print the full library path of file. -print-libgcc-file-name Print the library path for the currently used compiler runtime library ("libgcc.a" or "libclang_rt.builtins.*.a"). -print-prog-name=<name> Print the full program path of name. -print-search-dirs Print the paths used for finding libraries and programs. -save-temps Save intermediate compilation results. -save-stats, -save-stats=cwd, -save-stats=obj Save internal code generation (LLVM) statistics to a file in the current directory (-save-stats/"-save-stats=cwd") or the directory of the output file ("-save-state=obj"). -integrated-as, -no-integrated-as Used to enable and disable, respectively, the use of the integrated assembler. Whether the integrated assembler is on by default is target dependent. -time Time individual commands. -ftime-report Print timing summary of each stage of compilation. -v Show commands to run and use verbose output. Diagnostics Options -fshow-column, -fshow-source-location, -fcaret-diagnostics, -fdiagnostics-fixit-info, -fdiagnostics-parseable-fixits, -fdiagnostics-print-source-range-info, -fprint-source-range-info, -fdiagnostics-show-option, -fmessage-length These options control how Clang prints out information about diagnostics (errors and warnings). Please see the Clang User's Manual for more information. Preprocessor Options -D<macroname>=<value> Adds an implicit #define into the predefines buffer which is read before the source file is preprocessed. -U<macroname> Adds an implicit #undef into the predefines buffer which is read before the source file is preprocessed. -include <filename> Adds an implicit #include into the predefines buffer which is read before the source file is preprocessed. -I<directory> Add the specified directory to the search path for include files. -F<directory> Add the specified directory to the search path for framework include files. -nostdinc Do not search the standard system directories or compiler builtin directories for include files. -nostdlibinc Do not search the standard system directories for include files, but do search compiler builtin include directories. -nobuiltininc Do not search clang's builtin directory for include files. ENVIRONMENT TMPDIR, TEMP, TMP These environment variables are checked, in order, for the location to write temporary files used during the compilation process. CPATH If this environment variable is present, it is treated as a delimited list of paths to be added to the default system include path list. The delimiter is the platform dependent delimiter, as used in the PATH environment variable. Empty components in the environment variable are ignored. C_INCLUDE_PATH, OBJC_INCLUDE_PATH, CPLUS_INCLUDE_PATH, OBJCPLUS_INCLUDE_PATH These environment variables specify additional paths, as for CPATH, which are only used when processing the appropriate language. MACOSX_DEPLOYMENT_TARGET If -mmacosx-version-min is unspecified, the default deployment target is read from this environment variable. This option only affects Darwin targets. BUGS To report bugs, please visit <https://github.com/llvm/llvm-project/issues/>. Most bug reports should include preprocessed source files (use the -E option) and the full output of the compiler, along with information to reproduce. SEE ALSO as(1), ld(1) AUTHOR Maintained by the Clang / LLVM Team (<http://clang.llvm.org>) COPYRIGHT 2007-2024, The Clang Team 11 January 28, 2024 CLANG(1)
| null |
setuids.d
|
setuids.d is a simple DTrace program to print details of setuid calls, where a process assumes a different UID. These are usually related to login events. Since this uses DTrace, only users with root privileges can run this command.
|
setuids.d - snoop setuid calls as they occur. Uses DTrace.
|
setuids.d
| null |
Default output, print setuids as they occur, # setuids.d FIELDS UID user ID (from) SUID set user ID (to) PPID parent process ID PID process ID PCMD parent command CMD command (with arguments) DOCUMENTATION See the DTraceToolkit for further documentation under the Docs directory. The DTraceToolkit docs may include full worked examples with verbose descriptions explaining the output. EXIT setuids.d will run forever until Ctrl-C is hit. AUTHOR Brendan Gregg [Sydney, Australia] SEE ALSO dtrace(1M), bsmconv(1M) version 1.00 June 18, 2005 setuids.d(1m)
|
instmodsh5.34
|
A little interface to ExtUtils::Installed to examine installed modules, validate your packlists and even create a tarball from an installed module. SEE ALSO ExtUtils::Installed perl v5.34.1 2024-04-13 INSTMODSH(1)
|
instmodsh - A shell to examine installed modules
|
instmodsh
| null | null |
aa
|
aa creates and manipulates Apple Archives COMMANDS archive Archive the contents of the target directory append Archive the contents of the target directory, append to an existing archive file extract Extract the contents of an archive to the target directory list List the contents of an archive convert Convert an archive into another archive manifest Alias for 'archive -manifest' verify Compare the contents of the target directory with a manifest check-and-fix Verify and fix the contents of the target directory using an error correcting manifest
|
aa – Manipulate Apple Archives
|
aa command [options]
|
-v Increase verbosity. Default is silent operation. -h Print usage and exit. -d -dir Target directory for archive/extract. Default is the current directory. -i -input_file Input file. Default is stdin. -o -output_file Output file. Default is stdout. -subdir -subdir Path to archive under dir. subdir will be included in the archived paths, and extracted. Default is empty. -D -dir_and_subdir Set both dir to `dirname dir_and_subdir` and subdir to `basename dir_and_subdir`. -x Do not cross volume boundaries when archiving. -p Generate destination path automatically based on source path. For example 'aa archive -d foo -p' becomes 'aa archive -d foo -o foo.aar'. -a -algorithm Compression algorithm used when creating archives. One of lzfse, lzma, lz4, zlib, raw. Default is lzfse. -b -block_size Block size used when compressing archives, a number with optional b, k, m, g suffix (bytes are assumed if no suffix is specified). Default is 4m for archive and 1m for the other commands. -t -worker_threads Number of worker threads compressing/decompressing data. Default is the number of physical CPU on the running machine. -wt -writer_threads Number of writer threads extracting archive content. Default is to match worker_threads. -enable-dedup -(-no-enable-dedup) If set, and SLC fields (the SLC field identifies a cluster of regular files with identical content) are present in the archive, files with same data will be extracted as clones. Note that to create such an archive, you have to manually add the SLC field, for example `aa archive -o archive.aa -include-field SLC ...`. In this case, aa marks files with identical content as a cluster and shows a summary at the end. There is no way to deduplicate the data in the archive (by storing the data only once) from the command line. To achieve this, use the API and pass the `AA_FLAG_ARCHIVE_DEDUPLICATE_DAT` flag. -enable-holes -(-no-enable-holes) If set, and the filesystem supports it, detect and create holes in files to store 0-filled segments -ignore-eperm -(-no-ignore-eperm) If set, ignore EPERM (operation not permitted) errors when setting files attributes -manifest Alias for the following options: -exclude-field dat -include-field sh2,siz,idx,idz -a lzfse -b 1m -imanifest -input_manifest_file Manifest matching the input archive. Can be used in conjonction with the entry selection options to accelerate processing -omanifest -output_manifest_file Receives a manifest of the output archive -list-format -format Output format for the list command, one of text, json. Default is text ENTRY SELECTION OPTIONS -include-path and -include-path-list options are applied first to select an initial set of entries, then -exclude-path, -exclude-path-list, -exclude-name, -exclude-regex are applied to remove entries from this set. If no -include-path or -include-path-list option is given, all entries are included in the initial set. If a directory is included/excluded, the entire sub-tree is included/excluded. -include-path -path Include entry paths having path as a prefix. This option can be given multiple times. -exclude-path -path Exclude entry paths having path as a prefix. This option can be given multiple times. -include-path-list -path_list_file File containing a list of paths to include, one entry per line. This option can be given multiple times. -exclude-path-list -path_list_file File containing a list of paths to exclude, one entry per line. This option can be given multiple times. -include-regex -expr Include entry paths matching regular expression expr, see re_format(7). This option can be given multiple times. -exclude-regex -expr Exclude entry paths matching regular expression expr, see re_format(7). This option can be given multiple times. -exclude-name -name Exclude entry paths where a single component of the path matches exactly name. This option can be given multiple times. --include-type -<type_spec> Include only entries matching the given types. <type_spec> is a word containing one or more of the entry type characters listed below. -exclude-type -<type_spec> Include only entries not matching the given types. <type_spec> is a word containing one or more of the entry type characters listed below. -include-field -<field_spec> Add the given fields to the set of field keys. This option can be given multiple times. <field_spec> is a comma separated list of entry field keys listed below. -exclude-field -<field_spec> Remove the given fields from the set of field keys. This option can be given multiple times. <field_spec> is a comma separated list of entry field keys listed below. ENCRYPTION OPTIONS When archiving, encryption is selected by one of the -password..., -key..., or -recipient-pub options. The archive will be signed if a private key is specified with -sign-priv. With the currently available profiles, public/private keys are on the Elliptic Curve P-256, and symmetric keys are 256-bit long. -keychain Use Keychain to load/store symmetric keys and passwords -password -file File containing encryption password. When encrypting, and if -password-gen is passed, receives the generated password. Can be - to print the password to standard output. --password-value -password Password. -password-gen When encrypting, generate a new random password. It is recommended to always use this option, in conjonction with -keychain to store the password in the Keychain, or -password to store the password in a file or print it. -key -file File containing encryption symmetric key. When encrypting, and if -key-gen is passed, receives the generated key. -key-value -key Symmetric key, either "hex:<64 hex digits>" or "base64:<32 bytes encoded using base64>". -key-gen When encrypting, generate a new random symmetric key. -recipient-pub -file Recipient public key for encryption. The corresponding private key is required to decrypt the archive. -recipient-priv -file Recipient private key for decryption. The archive must have been encrypted against the corresponding public key. -sign-pub -file Signing public key for decryption. The archive must have been signed with the corresponding private key. -sign-priv -file Signing private key for encryption. The corresponding public key is required to decrypt and authenticate the archive. ENTRY TYPES b block special c character special d directory f regular file l symbolic link m metadata p fifo s socket ENTRY FIELDS typ entry type pat path lnk link path dev device id uid user id gid group id mod access permissions flg flags mtm modification time ctm creation time btm backup time xat extended attributes acl access control list cks CRC32 checksum sh1 SHA1 digest sh2 SHA2-256 digest dat file contents siz file size duz disk usage idx entry index in main archive yec file data error correcting codes yaf Apple Archive fields (in metadata entry) all alias for all fields (exclude only) attr alias for uid,gid,mod,flg,mtm,btm,ctm
|
Archive the contents of directory foo into archive foo.aar, using LZMA compression with 8 MB blocks aa archive -d foo -o foo.aar -a lzma -b 8m Extract the contents of foo.aar in directory dst aa extract -d dst -i foo.aar Create a manifest of the contents of directory foo into foo.manifest, using LZFSE compression with 1 MB blocks aa manifest -d foo -o foo.manifest -a lzfse -b 1m Verify the contents of dst match the manifest foo.manifest aa verify -i foo.manifest -d dst -v Print all entry paths in foo.manifest aa list -i foo.manifest Print all entry paths, uid, gid for regular files in foo.manifest aa list -v -i foo.manifest -include-type f -exclude-field all -include- field uid,gid,pat Create a manifest of the contents of archive foo.aar in foo.manifest aa convert -manifest -v -i foo.aar -o foo.manifest Extract a subset of entries matching prefix Applications/Mail.app from archive foo.aar in directory dst aa extract -i foo.aar -include-path Applications/Mail.app -d dst Archive and encrypt directory foo to archive foo.aea, generating a random password and storing it in the Keychain aa archive -d foo -o foo.aea -keychain -password-gen Decrypt and extract archive foo.aea to directory dst, obtaining the password from the Keychain (requires local authentication) aa extract -o foo.aea -d dst -keychain Archive directory foo to archive foo.aar aa archive -p -d foo Extract archive foo.aar to directory foo aa extract -p -i foo.aar macOS March 9, 2020 macOS
|
shlock
|
NOTE: The shlock command is deprecated, and lockf(1) should be used instead. The shlock command can create or verify a lock file on behalf of a shell or other script program. When it attempts to create a lock file, if one already exists, shlock verifies that it is or is not valid. If valid, shlock will exit with a non-zero exit code. If invalid, shlock will remove the lock file, and create a new one. shlock uses the link(2) system call to make the final target lock file, which is an atomic operation (i.e. "dot locking", so named for this mechanism's original use for locking system mailboxes). It puts the process ID ("PID") from the command line into the requested lock file. shlock verifies that an extant lock file is still valid by using kill(2) with a zero signal to check for the existence of the process that holds the lock. The -d option causes shlock to be verbose about what it is doing. The -f argument with lockfile is always required. The -p option with PID is given when the program is to create a lock file; when absent, shlock will simply check for the validity of the lock file. The -u option causes shlock to read and write the PID as a binary pid_t, instead of as ASCII, to be compatible with the locks created by UUCP. EXIT STATUS A zero exit code indicates a valid lock file.
|
shlock – create or verify a lock file for shell scripts
|
shlock [-du] [-p PID] -f lockfile
| null |
BOURNE SHELL #!/bin/sh lckfile=/tmp/foo.lock if shlock -f ${lckfile} -p $$ then # do what required the lock rm ${lckfile} else echo Lock ${lckfile} already held by `cat ${lckfile}` fi C SHELL #!/bin/csh -f set lckfile=/tmp/foo.lock shlock -f ${lckfile} -p $$ if ($status == 0) then # do what required the lock rm ${lckfile} else echo Lock ${lckfile} already held by `cat ${lckfile}` endif The examples assume that the file system where the lock file is to be created is writable by the user, and has space available. SEE ALSO lockf(1) HISTORY shlock was written for the first Network News Transfer Protocol (NNTP) software distribution, released in March 1986. The algorithm was suggested by Peter Honeyman, from work he did on HoneyDanBer UUCP. AUTHORS Erik E. Fair <fair@clock.org> BUGS Does not work on NFS or other network file system on different systems because the disparate systems have disjoint PID spaces. Cannot handle the case where a lock file was not deleted, the process that created it has exited, and the system has created a new process with the same PID as in the dead lock file. The lock file will appear to be valid even though the process is unrelated to the one that created the lock in the first place. Always remove your lock files after you're done. macOS 14.5 November 2, 2012 macOS 14.5
|
symbols
|
The symbols command may be used to examine library, symbol, and source line information in files and running processes. You may need root privileges to examine running processes. The symbols command can be used to determine symbol availability to tools such as Instruments, dtrace, and sample. COMMON OPTIONS -help Print a more extensive list of options -v Print version information -w Print wide output, do not clip to terminal width -uuid Print UUID info only. -arch arch_name Specify the target architecture. The default value is current , which matches the current system architecture. If the current architecture is not available in the targeted file or process, the symbols command will attempt to use any64bit , which matches the first available 64-bit architecture. If there is no 64-bit architecture available, the symbols command will finally fall back to any , which matches the first available architecture. The value all may be used to iterate over all architectures in a target. The arch name may also be any of the commonly used architecture mnemonics, for example i386, x86_64, or arm -cpuType # Specify the target architecture cpu type as a numeric value -cpuSubtype # Specify the target architecture cpu subtype as a numeric value -noHeaders Do not print library level information. This also supresses printing of any lower level information, which implies -noRegions, -noSymbols, and -noSources -noRegions Do not print segment/section level information. This also supresses printing of any lower level information, which implies -noSymbols and -noSources -noSymbols Do not print symbol level information. This also supresses printing of any lower level information, which implies -noSources -noSources Do not print source level information -noDemangling Do not print the human readable form of symbol names, instead print the name used by the linker -printSignature Print a "signature" for each target, which can later be used as input to the symbols command. This is a way to archive target data for later use. See also the -saveSignature flag -deepSignature Causes all signatures to be "deep copies", containing complete copies of all available information -fullSourcePath Print the entire source path for each source info -printDsymPaths Print the path of the dSYM file (if found) used when creating symbol information -lookup (0x1234 | symbol) Find one or more addresses or symbols in the targets. Symbols may contain simple shell globbing style patterns. OUTPUT Output from symbols has the following format: target [arch_name, elapsed-time]: UUID symbol-owner-path [FLAGS] address (size) region-name address (size) symbol-name [FLAGS] address (size) sourcefile : line # Symbol owner flags have the following meanings: PROT A load command has the SG_PROTECTED_VERSION_1 flag set AOUT This symbol owner is an executable DYLIB This symbol owner is a dylib or framework DYLIB-STUB This symbol owner is used only by the linker DYLD This symbol owner is the runtime dynamic linker BUNDLE This symbol owner is a loadable bundle OBJECT This symbol owner is an unlinked object file KEXT-BUNDLE This symbol owner is a kext dSYM_v# This symbol owner is a dSYM, of version '#' DYLDSHAREDCACHE This symbol owner was found in the dyld shared cache ObjC-RR This symbol owner supports manual retain-release ObjC-GC This symbol owner supports old-style garbage collection SLID This symbol owner was relocated from its base address PIE This symbol owner is compiled position independent RESTRICTED This symbol owner has a restrict segment/section STATIC-LIB This symbol-owner is from a static library (.a) FaultedFromDisk The data for this symbol owner was found on disk FaultedFromTask The data for this symbol owner was retrieved from a running task FaultedFromSelfDyldSharedCache The data for this symbol owner was found in the current processes dyld shared cache FilesetEntry This symbol owner is a member of a fileset kernel collection Found-dSYM A dSYM was found for this symbol owner Found-Binary-via-dSYM-colocation The binary for this symbol owner was found by looking up the dSYM, and then looking next to the dSYM Found-Binary-via-dSYM-plist The binary for this symbol owner was found by looking up the dSYM, and then reading its plist MMap32 The symbol owner is using a mmap'd file cache for symbol information MMap64 The symbol owner is using a mmap'd file cache for symbol information Private This symbol owner cannot be cached Empty No data was found for this symbol owner Symbol flags have the following meanings: FUNC This symbol has executable code DYLD-STUB This symbol is a stub used by the dynamic linker OBJC This symbol is an Objective C method THUMB This symbol uses thumb instruction encoding OMIT-FP This symbol does not create a frame pointer. EXT This symbol has external visibility PEXT This symbol has private-external visibility LENGTH The length of this symbol is known, not guessed NameNList The name of this symbol comes from NList data NameDwarf The name of this symbol comes from Dwarf data NameDwarfMIPSLinkage The name of this symbol is from specialized Dwarf MangledNameNList The mangled name of this symbol is from NList data MangledNameDwarf The mangled name of this symbol is from Dwarf data MangledNameDwarfMIPSLinkage The mangled name of this symbol is from specialized Dwarf Merged This symbol has multiple data sources NList This symbol was found in NList data Dwarf This symbol was found in Dwarf data DebugMap This symbol was found in DebugMap data FunctionStarts This symbol was found in function starts data SOURCES OF SYMBOL INFORMATION symbols uses multiple sources of symbol information. All sources are queried, and the resulting data is merged. NLIST symbol information is found in the LINKEDIT segment. It is imprecise, and only contains a starting address, not a length or ending address. Nlist data is not required to (and typically does not) reference all symbols. Usually only external symbol information is available. Even that may be removed by use of strip(1) DEBUG MAP symbol information is multi-part. A per-symbol reference in the original file points to an external file containing additional debug information, usually DWARF. FUNCTION STARTS symbol information is found in the LC_FUNCTION_STARTS load command of the target. It is imprecise, and only contains a starting address, not a length or ending address. Furthermore, it contains no name or mangled name information. The LC_FUNCTION_STARTS load command is optional, it may not be found in all targets. DWARF symbol information is true debug info. It is usually precise (but it is not required to be). When available, dwarf information is treated as more reliable than any other information source, and conflicts are resolved in favor of dwarf data. DSYM. A dSYM is an external file containing DWARF and NLIST symbol information. KERNEL SYMBOLS Kernel symbols are available by using the special pid "-1". This includes loaded kexts. SIGNATURES A signature is the information needed to reconstruct symbol information at a later date. For example, a signature contains a list of libraries, and for each library a UUID and the addresses the segments were loaded at. You can also ask for a "deep" signature, which contains complete information about every piece of information symbols could find. This can be very useful for later diagnosis and exploration. SYMBOLS PACKAGE A symbols package is a directory with "deep" signatures for one or more binary images. When a directory is specified with -symbolsPackageDir, symbols will output a deep signature for each binary image slice it reads. These files contain enough information to symbolicate application stack traces (such as those generated by crash reports) with function names and file names/line numbers.
|
symbols – display symbol information about a file or process
|
symbols [-help] [-w] [-uuid] [-arch arch_name] [-saveSignature path] [-symbolsPackageDir path] [-lookup (0x1234 | symbol) ...] file... pid... process-name... signature... dSYM...
| null |
symbols /System/Library/Frameworks/AppKit.framework/AppKit Print out all symbol and source line information in the default architecture of AppKit. symbols -uuid /System/Library/Frameworks/AppKit.framework/AppKit Print out summarized UUID information for each arch in AppKit. symbols -arch i386 /System/Library/Frameworks/AppKit.framework/AppKit Print out all symbol and source line information in the i386 architecture of AppKit. symbols 7085 Print out all symbol and source line information in pid 7085. symbols 7085 -lookup 0x7fff5bf0008 Print the symbol and source line information in pid 7085 at address 0x7fff5bf0008. symbols Safari Attempt to find a process named Safari, and print its symbol and source line information. symbols -deepSignature -saveSignature /tmp/Safari.signature Safari Attempt to find a process named Safari, and save a copy of all discoverable information to a file in /tmp. symbols /tmp/Safari.signature -lookup "*alloc*" Using the cached information in /tmp/Safari.signature, find every method/function matching the wildcard name *alloc* symbols -w -1 Print out in wide format all available information on kernel symbols" Darwin 9/20/10 Darwin
|
perlthanks5.30
|
This program is designed to help you generate bug reports (and thank- you notes) about perl5 and the modules which ship with it. In most cases, you can just run it interactively from a command line without any special arguments and follow the prompts. If you have found a bug with a non-standard port (one that was not part of the standard distribution), a binary distribution, or a non-core module (such as Tk, DBI, etc), then please see the documentation that came with that distribution to determine the correct place to report bugs. Bug reports should be submitted to the GitHub issue tracker at <https://github.com/Perl/perl5/issues>. The perlbug@perl.org address no longer automatically opens tickets. You can use this tool to compose your report and save it to a file which you can then submit to the issue tracker. In extreme cases, perlbug may not work well enough on your system to guide you through composing a bug report. In those cases, you may be able to use perlbug -d or perl -V to get system configuration information to include in your issue report. When reporting a bug, please run through this checklist: What version of Perl you are running? Type "perl -v" at the command line to find out. Are you running the latest released version of perl? Look at http://www.perl.org/ to find out. If you are not using the latest released version, please try to replicate your bug on the latest stable release. Note that reports about bugs in old versions of Perl, especially those which indicate you haven't also tested the current stable release of Perl, are likely to receive less attention from the volunteers who build and maintain Perl than reports about bugs in the current release. This tool isn't appropriate for reporting bugs in any version prior to Perl 5.0. Are you sure what you have is a bug? A significant number of the bug reports we get turn out to be documented features in Perl. Make sure the issue you've run into isn't intentional by glancing through the documentation that comes with the Perl distribution. Given the sheer volume of Perl documentation, this isn't a trivial undertaking, but if you can point to documentation that suggests the behaviour you're seeing is wrong, your issue is likely to receive more attention. You may want to start with perldoc perltrap for pointers to common traps that new (and experienced) Perl programmers run into. If you're unsure of the meaning of an error message you've run across, perldoc perldiag for an explanation. If the message isn't in perldiag, it probably isn't generated by Perl. You may have luck consulting your operating system documentation instead. If you are on a non-UNIX platform perldoc perlport, as some features may be unimplemented or work differently. You may be able to figure out what's going wrong using the Perl debugger. For information about how to use the debugger perldoc perldebug. Do you have a proper test case? The easier it is to reproduce your bug, the more likely it will be fixed -- if nobody can duplicate your problem, it probably won't be addressed. A good test case has most of these attributes: short, simple code; few dependencies on external commands, modules, or libraries; no platform-dependent code (unless it's a platform-specific bug); clear, simple documentation. A good test case is almost always a good candidate to be included in Perl's test suite. If you have the time, consider writing your test case so that it can be easily included into the standard test suite. Have you included all relevant information? Be sure to include the exact error messages, if any. "Perl gave an error" is not an exact error message. If you get a core dump (or equivalent), you may use a debugger (dbx, gdb, etc) to produce a stack trace to include in the bug report. NOTE: unless your Perl has been compiled with debug info (often -g), the stack trace is likely to be somewhat hard to use because it will most probably contain only the function names and not their arguments. If possible, recompile your Perl with debug info and reproduce the crash and the stack trace. Can you describe the bug in plain English? The easier it is to understand a reproducible bug, the more likely it will be fixed. Any insight you can provide into the problem will help a great deal. In other words, try to analyze the problem (to the extent you can) and report your discoveries. Can you fix the bug yourself? If so, that's great news; bug reports with patches are likely to receive significantly more attention and interest than those without patches. Please submit your patch via the GitHub Pull Request workflow as described in perldoc perlhack. You may also send patches to perl5-porters@perl.org. When sending a patch, create it using "git format-patch" if possible, though a unified diff created with "diff -pu" will do nearly as well. Your patch may be returned with requests for changes, or requests for more detailed explanations about your fix. Here are a few hints for creating high-quality patches: Make sure the patch is not reversed (the first argument to diff is typically the original file, the second argument your changed file). Make sure you test your patch by applying it with "git am" or the "patch" program before you send it on its way. Try to follow the same style as the code you are trying to patch. Make sure your patch really does work ("make test", if the thing you're patching is covered by Perl's test suite). Can you use "perlbug" to submit a thank-you note? Yes, you can do this by either using the "-T" option, or by invoking the program as "perlthanks". Thank-you notes are good. It makes people smile. Please make your issue title informative. "a bug" is not informative. Neither is "perl crashes" nor is "HELP!!!". These don't help. A compact description of what's wrong is fine. Having done your bit, please be prepared to wait, to be told the bug is in your code, or possibly to get no reply at all. The volunteers who maintain Perl are busy folks, so if your problem is an obvious bug in your own code, is difficult to understand or is a duplicate of an existing report, you may not receive a personal reply. If it is important to you that your bug be fixed, do monitor the issue tracker (you will be subscribed to notifications for issues you submit or comment on) and the commit logs to development versions of Perl, and encourage the maintainers with kind words or offers of frosty beverages. (Please do be kind to the maintainers. Harassing or flaming them is likely to have the opposite effect of the one you want.) Feel free to update the ticket about your bug on http://rt.perl.org if a new version of Perl is released and your bug is still present.
|
perlbug - how to submit bug reports on Perl
|
perlbug perlbug [ -v ] [ -a address ] [ -s subject ] [ -b body | -f inputfile ] [ -F outputfile ] [ -r returnaddress ] [ -e editor ] [ -c adminaddress | -C ] [ -S ] [ -t ] [ -d ] [ -A ] [ -h ] [ -T ] perlbug [ -v ] [ -r returnaddress ] [ -A ] [ -ok | -okay | -nok | -nokay ] perlthanks
|
-a Address to send the report to. Defaults to perlbug@perl.org. -A Don't send a bug received acknowledgement to the reply address. Generally it is only a sensible to use this option if you are a perl maintainer actively watching perl porters for your message to arrive. -b Body of the report. If not included on the command line, or in a file with -f, you will get a chance to edit the message. -C Don't send copy to administrator. -c Address to send copy of report to. Defaults to the address of the local perl administrator (recorded when perl was built). -d Data mode (the default if you redirect or pipe output). This prints out your configuration data, without mailing anything. You can use this with -v to get more complete data. -e Editor to use. -f File containing the body of the report. Use this to quickly send a prepared message. -F File to output the results to instead of sending as an email. Useful particularly when running perlbug on a machine with no direct internet connection. -h Prints a brief summary of the options. -ok Report successful build on this system to perl porters. Forces -S and -C. Forces and supplies values for -s and -b. Only prompts for a return address if it cannot guess it (for use with make). Honors return address specified with -r. You can use this with -v to get more complete data. Only makes a report if this system is less than 60 days old. -okay As -ok except it will report on older systems. -nok Report unsuccessful build on this system. Forces -C. Forces and supplies a value for -s, then requires you to edit the report and say what went wrong. Alternatively, a prepared report may be supplied using -f. Only prompts for a return address if it cannot guess it (for use with make). Honors return address specified with -r. You can use this with -v to get more complete data. Only makes a report if this system is less than 60 days old. -nokay As -nok except it will report on older systems. -p The names of one or more patch files or other text attachments to be included with the report. Multiple files must be separated with commas. -r Your return address. The program will ask you to confirm its default if you don't use this option. -S Send without asking for confirmation. -s Subject to include with the message. You will be prompted if you don't supply one on the command line. -t Test mode. The target address defaults to perlbug-test@perl.org. Also makes it possible to command perlbug from a pipe or file, for testing purposes. -T Send a thank-you note instead of a bug report. -v Include verbose configuration data in the report. AUTHORS Kenneth Albanowski (<kjahds@kjahds.com>), subsequently doctored by Gurusamy Sarathy (<gsar@activestate.com>), Tom Christiansen (<tchrist@perl.com>), Nathan Torkington (<gnat@frii.com>), Charles F. Randall (<cfr@pobox.com>), Mike Guy (<mjtg@cam.ac.uk>), Dominic Dunlop (<domo@computer.org>), Hugo van der Sanden (<hv@crypt.org>), Jarkko Hietaniemi (<jhi@iki.fi>), Chris Nandor (<pudge@pobox.com>), Jon Orwant (<orwant@media.mit.edu>, Richard Foley (<richard.foley@rfi.net>), Jesse Vincent (<jesse@bestpractical.com>), and Craig A. Berry (<craigberry@mac.com>). SEE ALSO perl(1), perldebug(1), perldiag(1), perlport(1), perltrap(1), diff(1), patch(1), dbx(1), gdb(1) BUGS None known (guess what must have been used to report them?) perl v5.30.3 2024-04-13 PERLBUG(1)
| null |
xctrace
|
xctrace is used to record new Instruments.app .trace files using the specified recording template. It also allows for converting supported converting files of supported input types into .trace files and exporting data from .trace files to parseable formats like xml. Available commands and their options: help General help or help specific to command argument record Perform a new recording on the specified device and target with the given template. Resulting .trace file can be viewed in Instruments.app or exported using xctrace. Recording can target all processes, attach to an existing process or launch a new one. --output path Save the trace to the specified path. A path to an existing trace file can be used if --append-run is specified. In this case the provided template will be ignored and the template in the existing trace will be used. If the passed path is a directory, a uniquely named file will be created in it. If the path contains the extension .trace, a new trace will be created with that name at the specified path or working directory. --append-run Allows to target an existing trace file. Specifying it causes new run to be appended. New run is recorded with the template that this existing trace file was initially recorded with. --template path | name Records using given trace template name or path. If name is specified, template needs to be either bundled with an installed Instruments Package or located in the Application Support directory for Instruments. To retrieve available templates, run xctrace list templates. --instrument name Adds Instrument with the specified name to the recording configuration. To retrieve available Instruments, run xctrace list instruments. --device name | UDID Record on a device with the given name or UDID. If not specified, then local device is chosen for the recording. If the word simulator is included, devices of simulator types will be preferred. To get list of available devices, run xctrace list devices. --time-limit time [ms|s|m|h] Limits the recording to the specified time period. Example: "--time-limit 5s" or "--time-limit 1m" --window duration [ms|s|m] Configure trace to operate in windowed mode, where trace buffer acts as a ring buffer, removing old events to make room for new ones. Example: "--window 5s" --all-processes Record all processes running on the system. --attach pid | name Attach and record running process with the given name or pid. --launch -- command [arguments] Launch and record process with the given name or path and provided arguments list. This option should be passed as the last one in the xctrace command invocation. --package file Install the given Instruments Package temporarily for the duration of a command --target-stdin - | file Redirects standard input stream of a launched process in case if target device is set to the local Mac. Can be pointing to a file or be specified as - , which causes standard input of xctrace to be passed into the standard input of a target process. --target-stdout - | file Redirects standard output stream of a launched process. Can be pointing to a file or be specified as - , which causes standard output of a target process to be to be redirected into the standard output of xctrace. --env VAR=value Sets environment variable for a launched process. Example: "--env PATH=/tmp" --no-prompt Skip any prompts that would be otherwise presented (like privacy warnings) --notify-tracing-started name Send Darwin notification with this name when a recording has started. import If the specified file is of a support input format, imports the file into an Instruments .trace file using the specified template. This file can later be viewed using Instruments.app or exported by using xctrace export command. --input file Import data from a supported file format at the given path. --output path Save the trace to the specified path. Existing trace files cannot be targeted. If the passed path is a directory, a uniquely named file will be created in it. If the path contains the extension .trace, a new trace will be created with that name at the specified path or working directory. --template path | name Imported using given trace template name or path. Only data that is needed by Instruments contained in the template will be imported. If name is specified, template needs to be either bundled with an installed Instruments Package or located in the Application Support directory for Instruments. To retrieve available templates, run xctrace list templates. --instrument name Adds Instrument with the specified name to the import configuration. To retrieve available Instruments, run xctrace list instruments. --package file Install the given Instruments Package temporarily for the duration of a command. export Perform a new recording on the specified device and target with the given template. Resulting .trace file can be viewed in Instruments.app or exported using xctrace. Recording can target all processes, attach to an existing process or launch a new one. --input file Export data from .trace file at the given path. --output path Save output of the export operation to the given path. If not specified, then textual output is being written to the xctrace standard output. --toc Export the table of contents of a trace file. This will contain overview of content and exportable entities from the given trace file. --xpath expression Perform given XPath query on the table of contents to select entities to export from the given trace file. Selected entities will be present in the export command output. --har Export data as the HTTP Archive file if the trace run contains the HTTP Traffic Instrument. remodel Remodel trace using currently installed packages and their modelers. --input file Remodel data from .trace file at the given path. --output path Save remodeled .trace file to the given path. . --package file Install the given Instruments Package temporarily for the duration of a command. symbolicate Symbolicate trace file using supplied debug symbols (dSYM). --input file Symbolicate addresses in .trace file at the given path. --output path Save symbolicated .trace file to the given path. If not specified, the symbolicated .trace will be saved to its original location (input path). --dsym path Use symbol data from dSYM at given path. Path can be a dSYM or a directory to search recursively for dSYMs. If not specified, the tool will make its best effort to locate dSYMs (it may take a while). list devices Lists all of non-host devices that can be used as a target for a new recording. list templates Lists all of templates that are known to xctrace. These include Instruments.app bundled templates, templates from installed Instruments Packages and custom templates installed into Application Support directory for Instruments.app. list instruments Lists all of the Instruments available to select as part of the record or import workflow. Global options: --quiet Make terminal output less verbose SEE ALSO Instruments.app may be used to perform trace recordings in a graphical environment and may also be used to open trace documents created by xctrace.
|
xctrace – Record, import, export and symbolicate Instruments .trace files.
|
xctrace [command [options]] xctrace help [command] xctrace record [--output path] [--append-run] [--template path | name] [--device name | UDID] [--time-limit time [ms|s|m|h]] [--all-processes | --attach pid | name | --launch command [arguments]] [--target-stdin - | file] [--target-stdout - | file] [--env VAR=value] [--package file] [--no-prompt] [--notify-tracing-started name] xctrace import [--input file] [--output path] [--template path | name] [--package file] xctrace export [--input file] [--output path] [--toc | --xpath expression] xctrace remodel [--input file] [--output path] [--package file] xctrace symbolicate [--input file] [--output path] [--dsym file] xctrace list [devices | templates | instruments]
| null |
Import a logarchive file to the trace file with a unique name using a MyCustomTemplate template: % xctrace import --input system_logs.logarchive --template 'MyCustomTemplate' Import a ktrace file into a new document created from the template with name MyCustomTemplate and adding the instrument from /tmp/PackageToLoad.instrdst and save the resulting document as output.trace: % xctrace import --input trace001.ktrace --template 'MyCustomTemplate' --package '/tmp/PackageToLoad.instrdst' --output output.trace Export a table of contents (toc) of the input.trace file to standard output: % xctrace export --input input.trace --toc Export recorded data from a table with my-table-schema schema in the first run of the input.trace file to standard output: % xctrace export --input input.trace --xpath '/trace-toc/run[@number="1"]/data/table[@schema="my-table-schema"]' Export UUID, binary path, load address and architecture for each binary image contained in the first run of the input.trace and save as output.xml: % xctrace export --input input.trace --output output.xml --xpath '/trace-toc/run[@number="1"]/processes' Export UUID, binary path, load address and architecture for each binary image used by the process named my-process-name in the first run of the input.trace file to standard output: % xctrace export --input input.trace --xpath '/trace-toc/run[@number="1"]/processes/process[@name="my-process-name"]' Start recording all processes on the local Mac device using the Time Profiler template and automatically stop the recording after 5s: % xctrace record --all-processes --template 'Time Profiler' --time-limit 5s Start a new recording by attaching to the process with name Trailblazer on the connected device Chad's iPhone using the template Time Profiler: % xctrace record --template 'Time Profiler' --device-name 'Chad's iPhone' --attach 'Trailblazer' Start Metal System Trace template recording on a simulator device named iPhone SE Simulator, capturing all existing processes: % xctrace record --template 'Metal System Trace' --device-name 'iPhone SE Simulator' --all-processes Start Time Profiler template recording on a local Mac device, launching and profiling binary at /tmp/tool path with arg1 arg2 arguments, output of the binary gets redirected to the standard output: % xctrace record --template 'Time Profiler' --target-stdout - --launch -- /tmp/tool arg1 arg2 Symbolicate the input.trace file using debug information from a SomeLibrary.dSYM file: % xctrace symbolicate --input input.trace --dsym SomeLibrary.dSYM Symbolicate the input.trace file by trying automatically locate debug information: % xctrace symbolicate --input input.trace macOS January 3, 2023 macOS
|
pod2man5.30
|
pod2man is a front-end for Pod::Man, using it to generate *roff input from POD source. The resulting *roff code is suitable for display on a terminal using nroff(1), normally via man(1), or printing using troff(1). input is the file to read for POD source (the POD can be embedded in code). If input isn't given, it defaults to "STDIN". output, if given, is the file to which to write the formatted output. If output isn't given, the formatted output is written to "STDOUT". Several POD files can be processed in the same pod2man invocation (saving module load and compile times) by providing multiple pairs of input and output files on the command line. --section, --release, --center, --date, and --official can be used to set the headers and footers to use; if not given, Pod::Man will assume various defaults. See below or Pod::Man for details. pod2man assumes that your *roff formatters have a fixed-width font named "CW". If yours is called something else (like "CR"), use --fixed to specify it. This generally only matters for troff output for printing. Similarly, you can set the fonts used for bold, italic, and bold italic fixed-width output. Besides the obvious pod conversions, Pod::Man, and therefore pod2man also takes care of formatting func(), func(n), and simple variable references like $foo or @bar so you don't have to use code escapes for them; complex expressions like $fred{'stuff'} will still need to be escaped, though. It also translates dashes that aren't used as hyphens into en dashes, makes long dashes--like this--into proper em dashes, fixes "paired quotes," and takes care of several other troff-specific tweaks. See Pod::Man for complete information.
|
pod2man - Convert POD data to formatted *roff input
|
pod2man [--center=string] [--date=string] [--errors=style] [--fixed=font] [--fixedbold=font] [--fixeditalic=font] [--fixedbolditalic=font] [--name=name] [--nourls] [--official] [--release=version] [--section=manext] [--quotes=quotes] [--lquote=quote] [--rquote=quote] [--stderr] [--utf8] [--verbose] [input [output] ...] pod2man --help
|
-c string, --center=string Sets the centered page header for the ".TH" macro to string. The default is "User Contributed Perl Documentation", but also see --official below. -d string, --date=string Set the left-hand footer string for the ".TH" macro to string. By default, the modification date of the input file will be used, or the current date if input comes from "STDIN", and will be based on UTC (so that the output will be reproducible regardless of local time zone). --errors=style Set the error handling style. "die" says to throw an exception on any POD formatting error. "stderr" says to report errors on standard error, but not to throw an exception. "pod" says to include a POD ERRORS section in the resulting documentation summarizing the errors. "none" ignores POD errors entirely, as much as possible. The default is "die". --fixed=font The fixed-width font to use for verbatim text and code. Defaults to "CW". Some systems may want "CR" instead. Only matters for troff(1) output. --fixedbold=font Bold version of the fixed-width font. Defaults to "CB". Only matters for troff(1) output. --fixeditalic=font Italic version of the fixed-width font (actually, something of a misnomer, since most fixed-width fonts only have an oblique version, not an italic version). Defaults to "CI". Only matters for troff(1) output. --fixedbolditalic=font Bold italic (probably actually oblique) version of the fixed-width font. Pod::Man doesn't assume you have this, and defaults to "CB". Some systems (such as Solaris) have this font available as "CX". Only matters for troff(1) output. -h, --help Print out usage information. -l, --lax No longer used. pod2man used to check its input for validity as a manual page, but this should now be done by podchecker(1) instead. Accepted for backward compatibility; this option no longer does anything. --lquote=quote --rquote=quote Sets the quote marks used to surround C<> text. --lquote sets the left quote mark and --rquote sets the right quote mark. Either may also be set to the special value "none", in which case no quote mark is added on that side of C<> text (but the font is still changed for troff output). Also see the --quotes option, which can be used to set both quotes at once. If both --quotes and one of the other options is set, --lquote or --rquote overrides --quotes. -n name, --name=name Set the name of the manual page for the ".TH" macro to name. Without this option, the manual name is set to the uppercased base name of the file being converted unless the manual section is 3, in which case the path is parsed to see if it is a Perl module path. If it is, a path like ".../lib/Pod/Man.pm" is converted into a name like "Pod::Man". This option, if given, overrides any automatic determination of the name. Although one does not have to follow this convention, be aware that the convention for UNIX man pages for commands is for the man page title to be in all-uppercase, even if the command isn't. This option is probably not useful when converting multiple POD files at once. When converting POD source from standard input, the name will be set to "STDIN" if this option is not provided. Providing this option is strongly recommended to set a meaningful manual page name. --nourls Normally, L<> formatting codes with a URL but anchor text are formatted to show both the anchor text and the URL. In other words: L<foo|http://example.com/> is formatted as: foo <http://example.com/> This flag, if given, suppresses the URL when anchor text is given, so this example would be formatted as just "foo". This can produce less cluttered output in cases where the URLs are not particularly important. -o, --official Set the default header to indicate that this page is part of the standard Perl release, if --center is not also given. -q quotes, --quotes=quotes Sets the quote marks used to surround C<> text to quotes. If quotes is a single character, it is used as both the left and right quote. Otherwise, it is split in half, and the first half of the string is used as the left quote and the second is used as the right quote. quotes may also be set to the special value "none", in which case no quote marks are added around C<> text (but the font is still changed for troff output). Also see the --lquote and --rquote options, which can be used to set the left and right quotes independently. If both --quotes and one of the other options is set, --lquote or --rquote overrides --quotes. -r version, --release=version Set the centered footer for the ".TH" macro to version. By default, this is set to the version of Perl you run pod2man under. Setting this to the empty string will cause some *roff implementations to use the system default value. Note that some system "an" macro sets assume that the centered footer will be a modification date and will prepend something like "Last modified: ". If this is the case for your target system, you may want to set --release to the last modified date and --date to the version number. -s string, --section=string Set the section for the ".TH" macro. The standard section numbering convention is to use 1 for user commands, 2 for system calls, 3 for functions, 4 for devices, 5 for file formats, 6 for games, 7 for miscellaneous information, and 8 for administrator commands. There is a lot of variation here, however; some systems (like Solaris) use 4 for file formats, 5 for miscellaneous information, and 7 for devices. Still others use 1m instead of 8, or some mix of both. About the only section numbers that are reliably consistent are 1, 2, and 3. By default, section 1 will be used unless the file ends in ".pm", in which case section 3 will be selected. --stderr By default, pod2man dies if any errors are detected in the POD input. If --stderr is given and no --errors flag is present, errors are sent to standard error, but pod2man does not abort. This is equivalent to "--errors=stderr" and is supported for backward compatibility. -u, --utf8 By default, pod2man produces the most conservative possible *roff output to try to ensure that it will work with as many different *roff implementations as possible. Many *roff implementations cannot handle non-ASCII characters, so this means all non-ASCII characters are converted either to a *roff escape sequence that tries to create a properly accented character (at least for troff output) or to "X". This option says to instead output literal UTF-8 characters. If your *roff implementation can handle it, this is the best output format to use and avoids corruption of documents containing non- ASCII characters. However, be warned that *roff source with literal UTF-8 characters is not supported by many implementations and may even result in segfaults and other bad behavior. Be aware that, when using this option, the input encoding of your POD source should be properly declared unless it's US-ASCII. Pod::Simple will attempt to guess the encoding and may be successful if it's Latin-1 or UTF-8, but it will warn, which by default results in a pod2man failure. Use the "=encoding" command to declare the encoding. See perlpod(1) for more information. -v, --verbose Print out the name of each output file as it is being generated. EXIT STATUS As long as all documents processed result in some output, even if that output includes errata (a "POD ERRORS" section generated with "--errors=pod"), pod2man will exit with status 0. If any of the documents being processed do not result in an output document, pod2man will exit with status 1. If there are syntax errors in a POD document being processed and the error handling style is set to the default of "die", pod2man will abort immediately with exit status 255. DIAGNOSTICS If pod2man fails with errors, see Pod::Man and Pod::Simple for information about what those errors might mean.
|
pod2man program > program.1 pod2man SomeModule.pm /usr/perl/man/man3/SomeModule.3 pod2man --section=7 note.pod > note.7 If you would like to print out a lot of man page continuously, you probably want to set the C and D registers to set contiguous page numbering and even/odd paging, at least on some versions of man(7). troff -man -rC1 -rD1 perl.1 perldata.1 perlsyn.1 ... To get index entries on "STDERR", turn on the F register, as in: troff -man -rF1 perl.1 The indexing merely outputs messages via ".tm" for each major page, section, subsection, item, and any "X<>" directives. See Pod::Man for more details. BUGS Lots of this documentation is duplicated from Pod::Man. AUTHOR Russ Allbery <rra@cpan.org>, based very heavily on the original pod2man by Larry Wall and Tom Christiansen. COPYRIGHT AND LICENSE Copyright 1999-2001, 2004, 2006, 2008, 2010, 2012-2018 Russ Allbery <rra@cpan.org> This program is free software; you may redistribute it and/or modify it under the same terms as Perl itself. SEE ALSO Pod::Man, Pod::Simple, man(1), nroff(1), perlpod(1), podchecker(1), perlpodstyle(1), troff(1), man(7) The man page documenting the an macro set may be man(5) instead of man(7) on your system. The current version of this script is always available from its web site at <https://www.eyrie.org/~eagle/software/podlators/>. It is also part of the Perl core distribution as of 5.6.0. perl v5.30.3 2024-04-13 POD2MAN(1)
|
gzexe
|
The gzexe utility uses gzip(1) to compress executables, producing executables that decompress on-the-fly when executed. This saves disk space, at the cost of slower execution times. The original executables are saved by copying each of them to a file with the same name with a ‘~’ suffix appended. After verifying that the compressed executables work as expected, the backup files can be removed. The options are as follows: -d Decompress executables previously compressed by gzexe. The gzexe program refuses to compress non-regular or non-executable files, files with a setuid or setgid bit set, files that are already compressed using gzexe or programs it needs to perform on-the-fly decompression: sh(1), mktemp(1), rm(1), echo(1), tail(1), gzip(1), and chmod(1). SEE ALSO gzip(1) CAVEATS The gzexe utility replaces files by overwriting them with the generated compressed executable. To be able to do this, it is required that the original files are writable. macOS 14.5 January 26, 2007 macOS 14.5
|
gzexe – create auto-decompressing executables
|
gzexe [-d] file ...
| null | null |
json_xs5.30
|
json_xs converts between some input and output formats (one of them is JSON). The default input format is "json" and the default output format is "json-pretty".
|
json_xs - JSON::XS commandline utility
|
json_xs [-v] [-f inputformat] [-t outputformat]
|
-v Be slightly more verbose. -f fromformat Read a file in the given format from STDIN. "fromformat" can be one of: json - a json text encoded, either utf-8, utf16-be/le, utf32-be/le cbor - CBOR (RFC 7049, CBOR::XS), a kind of binary JSON storable - a Storable frozen value storable-file - a Storable file (Storable has two incompatible formats) bencode - use Convert::Bencode, if available (used by torrent files, among others) clzf - Compress::LZF format (requires that module to be installed) eval - evaluate the given code as (non-utf-8) Perl, basically the reverse of "-t dump" yaml - YAML format (requires that module to be installed) string - do not attempt to decode the file data none - nothing is read, creates an "undef" scalar - mainly useful with "-e" -t toformat Write the file in the given format to STDOUT. "toformat" can be one of: json, json-utf-8 - json, utf-8 encoded json-pretty - as above, but pretty-printed json-utf-16le, json-utf-16be - little endian/big endian utf-16 json-utf-32le, json-utf-32be - little endian/big endian utf-32 cbor - CBOR (RFC 7049, CBOR::XS), a kind of binary JSON cbor-packed - CBOR using extensions to make it smaller storable - a Storable frozen value in network format storable-file - a Storable file in network format (Storable has two incompatible formats) bencode - use Convert::Bencode, if available (used by torrent files, among others) clzf - Compress::LZF format yaml - YAML::XS format dump - Data::Dump dumper - Data::Dumper string - writes the data out as if it were a string none - nothing gets written, mainly useful together with "-e" Note that Data::Dumper doesn't handle self-referential data structures correctly - use "dump" instead. -e code Evaluate perl code after reading the data and before writing it out again - can be used to filter, create or extract data. The data that has been written is in $_, and whatever is in there is written out afterwards.
|
json_xs -t none <isitreally.json "JSON Lint" - tries to parse the file isitreally.json as JSON - if it is valid JSON, the command outputs nothing, otherwise it will print an error message and exit with non-zero exit status. <src.json json_xs >pretty.json Prettify the JSON file src.json to dst.json. json_xs -f storable-file <file Read the serialised Storable file file and print a human-readable JSON version of it to STDOUT. json_xs -f storable-file -t yaml <file Same as above, but write YAML instead (not using JSON at all :) json_xs -f none -e '$_ = [1, 2, 3]' Dump the perl array as UTF-8 encoded JSON text. <torrentfile json_xs -f bencode -e '$_ = join "\n", map @$_, @{$_->{"announce-list"}}' -t string Print the tracker list inside a torrent file. lwp-request http://cpantesters.perl.org/show/JSON-XS.json | json_xs Fetch the cpan-testers result summary "JSON::XS" and pretty-print it. AUTHOR Copyright (C) 2008 Marc Lehmann <json@schmorp.de> perl v5.30.3 2018-11-15 JSON_XS(1)
|
ip2cc5.34
|
Ip2cc is a program to lookup countries of IP addresses. Ip2cc has two modes: interactive and non-interactive. Interactive mode allows the user to query more than one hostname. Non-interactive mode is used to print just the country for a single host. ARGUMENTS Interactive mode is entered when no arguments are given. Non-interactive mode is used when the name or Internet address of the host to be looked up is given as the first argument. SEE ALSO IP::Country - the fast database used by this script. AUTHOR Nigel Wetters Gourlay <nwetters@cpan.org> perl v5.34.0 2024-04-13 IP2CC(1)
|
ip2cc - lookup country from IP address or hostname
|
ip2cc [host-to-find]
| null | null |
usbdiagnose
| null | null | null | null | null |
genstrings
|
The genstrings utility generates one or more .strings files from the C, Objective-C, C++, Objective-C++, or Swift source code files provided as arguments. A .strings file is used for localizing an application for different languages, as described under Internationalization in the Developer Documentation. Source Code genstrings scans the provided source files for calls to the following functions, to extract their string contents and produce string tables for localization. The NSLocalizedString() macro is used as an example below; by default genstrings recognizes it and the CFCopyLocalizedString() macro. To enable support for the SwiftUI Text() initializer, use the -SwiftUI flag. See the documentation for the -s routine option below for information on how to recognize other patterns. The "key", "Table", and "value" arguments must be literal strings in order for genstrings to be able to extract them from source code. The comment argument may be either a literal string or nil, but is strongly recommended to provide context to localizers. NSLocalizedString("key", comment) Source lines containing this form will generate an appropriate string table entry to a file named Localizable.strings. NSLocalizedStringFromTable("key", "Table", comment) NSLocalizedStringFromTableInBundle("key", "Table", bundle, comment) Source lines containing either of these forms will generate an appropriate string table entry in a file named Table.strings. NSLocalizedStringWithDefaultValue("key", "Table", bundle, "value", comment) Source lines with will generate an appropriate string table entry in a file named Table.strings with a distinct key and value; all other forms reuse the key as the value. Format Strings and Positional Parameters Keys and values of string file entries can include formatting characters. For value strings with multiple formatting arguments, positional parameters are generated. These allow the order of arguments to be changed as needed by each localization. For example, "File %1$@ contains %2$d bytes." could become "%2$d bytes are contained in file %1$@." in another localization. The -noPositionalParameters flag can be used to suppress generation of positional parameters in string table entries. Important When a macro such as NSLocalizedString() is used as a format string, it is crucial to ensure that all formatting arguments are present with the same types in the same order in any translated string tables, to avoid runtime argument type mismatches. Encoding By default, genstrings assumes source files are UTF-8 encoded, or contain no non-ASCII characters. Files in other encodings will not be read successfully unless the -encoding charset-name flag is used to specify their encoding as an IANA charset name. The -macRoman flag can also be used to specify input file are expected to be in the Mac Roman encoding. However, developers are strongly encouraged to move to UTF-8 as the encoding for source files as the -macRoman option may be removed in future versions. The -d flag may be used to request genstrings attempt to detect an input file's encoding if it is not read successfully as UTF-8 or using its specified encoding. Embedded non-ASCII characters in UTF-8 files, as well as non-ASCII characters specified by the escape sequences \uxxxx and \Uxxxxxxxx are read automatically by genstrings. The -u option and genstrings specific escape sequence are also supported. Generated .strings files are UTF-16 encoded by default. Host endianness is used unless the -bigEndian or -littleEndian option is specified. The endian options do not affect .strings files being appended to with the -a option. The byte order of the existing file is maintained.
|
genstrings – generate string tables from source code
|
genstrings [-a] [-SwiftUI] [-s routine [-s routine ...]] [-skipTable Table [-skipTable Table ...]] [-noPositionalParameters] [-u] [-encoding charset-name] [-macRoman] [-d] [-q] [-bigEndian | -littleEndian] [-o outputDir] file ...
|
-a Allows the output to be appended to the old output files. However, -a causes the results to be appended to the end of the old file and not merged. -SwiftUI Enables support for recognizing the SwiftUI Text() initializer, including its single-argument variant. -s routine [-s routine ...] Recognizes routine() as equivalent to NSLocalizedString(). For example, -s MyLocalString will catch calls to MyLocalString(), MyLocalStringFromTable(), and so on. This flag may be passed any number of times. Note Specifying routine names to treat as equivalent to NSLocalizedString() does not prevent either NSLocalizedString() or CFCopyLocalizedString() or any of their variants from being recognized. -skipTable Table [-skipTable Table ...] Causes genstrings to skip over the file for Table. Note that any entries in this table will not be generated. This flag may be passed any number of times. -noPositionalParameters Turns off generation of positional parameters. -u Allow unicode characters in the value of strings files. Any occurrence of \Uxxxx (where xxxx are four or eight hex digits) in the source code will be written to the strings file with its Unicode value (in terms of \Uxxxx) for the key, but the actual Unicode value for its value. For example, NSLocalizedString(@"AB\U0043D", @"Comment") will result in an entry such as "AB\U0043D" = "ABCD" in the string table. Note that non-ASCII characters can now be handled automatically without this option. See Encoding section above for details. -encoding charset-name Read source files using the given IANA charset name. See Encoding section above for details. -macRoman For compatibility, read source files using Mac Roman encoding. See Encoding section above for details. -q Turns off multiple key/value pairs warning. -bigEndian | -littleEndian Causes output files to be written with the specified endianness and be prefixed with an appropriate byte-order marker. -o outputDir Specifies the directory in which the output string tables should be created. Xcode June 12, 2019 Xcode
| null |
at
|
The at and batch utilities read commands from standard input or a specified file which are to be executed at a later time, using sh(1). at executes commands at a specified time; atq lists the user's pending jobs, unless the user is the superuser; in that case, everybody's jobs are listed; atrm deletes jobs; batch executes commands when system load levels permit; in other words, when the load average drops below 1.5 times number of active CPUs, or the value specified in the invocation of atrun. The at utility allows some moderately complex time specifications. It accepts times of the form HHMM or HH:MM to run a job at a specific time of day. (If that time is already past, the next day is assumed.) As an alternative, the following keywords may be specified: midnight, noon, or teatime (4pm) and time-of-day may be suffixed with AM, PM, or UTC for running in the morning, the evening, or in UTC time. The day on which the job is to be run may also be specified by giving a date in the form month-name day with an optional year, or giving a date of the forms DD.MM.YYYY, DD.MM.YY, MM/DD/YYYY, MM/DD/YY, MMDDYYYY, or MMDDYY. The specification of a date must follow the specification of the time of day. Time can also be specified as: [now] + count time-units, where the time- units can be minutes, hours, days, weeks, months or years and at may be told to run the job today by suffixing the time with today and to run the job tomorrow by suffixing the time with tomorrow. The shortcut next can be used instead of + 1. For example, to run a job at 4pm three days from now, use at 4pm + 3 days, to run a job at 10:00am on July 31, use at 10am Jul 31 and to run a job at 1am tomorrow, use at 1am tomorrow. The at utility also supports the POSIX time format (see -t option). For both at and batch, commands are read from standard input or the file specified with the -f option and executed. The working directory, the environment (except for the variables TERM, TERMCAP, DISPLAY and _) and the umask are retained from the time of invocation. An at or batch command invoked from a su(1) shell will retain the current userid. The user will be mailed standard error and standard output from his commands, if any. Mail will be sent using the command sendmail(8). If at is executed from a su(1) shell, the owner of the login shell will receive the mail. The superuser may use these commands in any case. For other users, permission to use at is determined by the files /usr/lib/cron/at.allow and /usr/lib/cron/at.deny. If the file /usr/lib/cron/at.allow exists, only usernames mentioned in it are allowed to use at. In these two files, a user is considered to be listed only if the user name has no blank or other characters before it on its line and a newline character immediately after the name, even at the end of the file. Other lines are ignored and may be used for comments. If /usr/lib/cron/at.allow does not exist, /usr/lib/cron/at.deny is checked, every username not mentioned in it is then allowed to use at. If neither exists, only the superuser is allowed use of at. This is the default configuration. IMPLEMENTATION NOTES Note that at is implemented through the launchd(8) daemon periodically invoking atrun(8), which is disabled by default. See atrun(8) for information about enabling atrun.
|
at, batch, atq, atrm – queue, examine or delete jobs for later execution
|
at [-q queue] [-f file] [-mldbv] time at [-q queue] [-f file] [-mldbv] -t [[CC]YY]MMDDhhmm[.SS] at -c job [job ...] at -l [job ...] at -l -q queue at -r job [job ...] atq [-q queue] [-v] atrm job [job ...] batch [-q queue] [-f file] [-mv] [time]
|
-q queue Use the specified queue. A queue designation consists of a single letter; valid queue designations range from a to z and A to Z. The a queue is the default for at and the b queue for batch. Queues with higher letters run with increased niceness. If a job is submitted to a queue designated with an uppercase letter, it is treated as if it had been submitted to batch at that time. If atq is given a specific queue, it will only show jobs pending in that queue. -m Send mail to the user when the job has completed even if there was no output. -f file Read the job from file rather than standard input. -l With no arguments, list all jobs for the invoking user. If one or more job numbers are given, list only those jobs. -d Is an alias for atrm (this option is deprecated; use -r instead). -b Is an alias for batch. -v For atq, shows completed but not yet deleted jobs in the queue; otherwise shows the time the job will be executed. -c Cat the jobs listed on the command line to standard output. -r Remove the specified jobs. -t Specify the job time using the POSIX time format. The argument should be in the form [[CC]YY]MMDDhhmm[.SS] where each pair of letters represents the following: CC The first two digits of the year (the century). YY The second two digits of the year. MM The month of the year, from 1 to 12. DD the day of the month, from 1 to 31. hh The hour of the day, from 0 to 23. mm The minute of the hour, from 0 to 59. SS The second of the minute, from 0 to 60. If the CC and YY letter pairs are not specified, the values default to the current year. If the SS letter pair is not specified, the value defaults to 0. FILES /usr/lib/cron/jobs directory containing job files /usr/lib/cron/spool directory containing output spool files /var/run/utmpx login records /usr/lib/cron/at.allow allow permission control /usr/lib/cron/at.deny deny permission control /usr/lib/cron/jobs/.lockfile job-creation lock file SEE ALSO nice(1), sh(1), umask(2), compat(5), atrun(8), cron(8), launchd(8), sendmail(8) AUTHORS At was mostly written by Thomas Koenig <ig25@rz.uni-karlsruhe.de>. The time parsing routines are by David Parsons <orc@pell.chi.il.us>, with minor enhancements by Joe Halpin <joe.halpin@attbi.com>. BUGS If the file /var/run/utmpx is not available or corrupted, or if the user is not logged on at the time at is invoked, the mail is sent to the userid found in the environment variable LOGNAME. If that is undefined or empty, the current userid is assumed. The at and batch utilities as presently implemented are not suitable when users are competing for resources. If this is the case, another batch system such as nqs may be more suitable. Specifying a date past 2038 may not work on some systems. macOS 14.5 August 11, 2018 macOS 14.5
| null |
what
|
The what utility searches each specified file for sequences of the form “@(#)” as inserted by the SCCS source code control system. It prints the remainder of the string following this marker, up to a NUL character, newline, double quote, ‘>’ character, or backslash. The following options are available: -q Only output the match text, rather than formatting it. -s Stop searching each file after the first match. EXIT STATUS Exit status is 0 if any matches were found, otherwise 1. SEE ALSO ident(1), strings(1) STANDARDS The what utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). The -q option is a non-standard FreeBSD extension which may not be available on other operating systems. HISTORY The what command appeared in 4.0BSD. BUGS This is a rewrite of the SCCS command of the same name, and behavior may not be identical. macOS 14.5 December 14, 2006 macOS 14.5
|
what – show what versions of object modules were used to construct a file
|
what [-qs] [file ...]
| null | null |
sdx
|
sdx combines a number of functions into a single command-line developer utility. Its most common use is to create, browse, and unravel Starkits: sdx qwrap myscript.tcl ?options ...? create a starkit from a single Tcl script sdx wrap mystar.kit ?options ...? create a starkit from a mystar.vfs directory structure sdx unwrap mystar.kit the reverse of wrap, lets you dissect any starkit sdx lsk mystar.kit list the contents of a starkit, as seen when mounted in Tcl sdx version mystar.kit calculate the version ID of a starkit, report newest file found inside sdx mkpack oldstar.kit newstar.kit copy and optimally pack the Metakit data by removing all unused areas sdx mksplit mystar.kit split a starkit into mystar.head and a mystar.tail parts sdx also has other, less frequently used commands, see sdx help and sdx help command for more information. sdx is itself a Starkit, you can inspect its contents by doing sdx unwrap `which sdx`. SEE ALSO http://code.google.com/p/tclkit/, http://wiki.tcl.tk/sdx/, http://wiki.tcl.tk/starkit/, http://www.equi4.com/starkit/, http://www.equi4.com/starkit/sdx.html KEYWORDS Starkit, Tcl sdx 2.0 sdx(1)
|
sdx - Starkit Developer eXtension
| null | null | null |
m4
| null | null | null | null | null |
asa
|
The asa utility reads files sequentially, mapping FORTRAN carriage- control characters to line-printer control sequences, and writes them to the standard output. The first character of each line is interpreted as a carriage-control character. The following characters are interpreted as follows: ⟨space⟩ Output the rest of the line without change. 0 Output a ⟨newline⟩ character before printing the rest of the line. 1 Output a ⟨formfeed⟩ character before printing the rest of the line. + The trailing ⟨newline⟩ of the previous line is replaced by a ⟨carriage-return⟩ before printing the rest of the line. Lines beginning with characters other than the above are treated as if they begin with ⟨space⟩. EXIT STATUS The asa utility exits 0 on success, and >0 if an error occurs.
|
asa – interpret carriage-control characters
|
asa [file ...]
| null |
To view a file containing the output of a FORTRAN program: asa file To format the output of a FORTRAN program and redirect it to a line- printer: a.out | asa | lpr SEE ALSO f77(1) STANDARDS The asa utility conforms to IEEE Std 1003.1-2001 (“POSIX.1”). AUTHORS J.T. Conklin, Winning Strategies, Inc. macOS 14.5 May 9, 2002 macOS 14.5
|
iptab
| null | null | null | null | null |
swiftc
| null | null | null | null | null |
nfsstat
|
nfsstat displays statistics kept about NFS client and server activity, active user activity, exported directories, and mount information. In the absence of any options, nfsstat displays NFS client and server statistics. The options are as follows: -c Show NFS client statistics. -e Show NFS server exported directory statistics. -m [mountpath] Show NFS mount information. -s Show NFS server statistics. -3 Print only NFS v3 statistics. -4 Print only NFS v4 statistics. -u Show NFS server active user statistics. -f JSON Print output as JSON format. -w wait Display a shorter summary at wait second intervals. -n net|user Show network addresses as numbers, or show users as uid numbers. This option can appear multiple times. -z Zero NFS client and server statistics. -v Show additional information (if available). OUTPUT The data fields that nfsstat displays for each set of statistics are: NFSv3 Client Information: Statistics for NFSv3 file system mounts. RPC Counts Counts of the RPC calls made to each of the NFSv3 protocol procedures. NFSv4 Client Information: Statistics for NFSv4 file system mounts. RPC Counts Counts of the RPC calls made to each of the NFSv4 protocol procedures. Operations Counts Counts of the operations calls made by the client within the compound procedure. Common Client Information: Common statistics for NFS file system mounts. RPC Info Statistics for NFS RPC calls: TimedOut RPC calls that timed out, perhaps to a slow or dead server. Invalid Invalid RPC replies. X Replies RPC replies received that did not have calls pending. Retries RPC calls that were retried. Requests Total number of RPC calls made. Cache Info Statistics on NFS client-side cache performance: Attr Hits/Misses Performance of the NFS file attribute cache. Lkup Hits/Misses Performance of the directory name lookup cache. BioR Hits/Misses Performance of block cache for reads. BioW Hits/Misses Performance of block cache for writes. BioRL Hits/Misses Performance of symbolic link cache. BioD Hits/Misses Performance of directory cache. DirE Hits/Misses Performance of directory offset cache. Accs Hits/Misses Performance of access rights cache. Paging Info Counts both pagein and pageout operations. NFSv3 Server Information: Statistics for the NFSv3 server. RPC Counts Counts of RPC calls on each of the NFS server's procedures are recorded here. Server Ret-Failed RPC errors returned by the server. Server Faults Errors in the NFS server. Server Cache Stats Statistics from the NFS server's RPC duplicate request cache: Inprog Calls already in progress. Idem Cache hits for idempotent procedures. Non-idem Cache hits for non-idempotent procedures. Misses Cache Misses. Server Write Gathering These statistics describe the efficiency of the NFS server's write gathering feature. WriteOps Write operations to disk. WriteRPC Write operations received by the server. Opsaved Write operations that were gathered (WriteRPC - WriteOps) NFS Server Exported Directory Information: Statistics for each exported directory on the NFS server. NFS Requests Count of NFS requests processed by an exported directory. Bytes Read Count of bytes read from an exported directory. Bytes Written Count of bytes written to an exported directory. NFS Server Active User Information: List of active NFS users and statistics on the NFS server. NFS Requests Count of NFS requests received from an active user. Bytes Read Count of bytes read by an active user. Bytes Written Count of bytes written by an active user. Idle Amount of time an active user has been idle. User Name (or uid if -n user was given) of active user. IP Address Host name (or network address if -n net was given) of client machine. NFS Mount Information: Information about the given NFS mount (or all NFS mounts). The path mounted on and the server:/path that is mounted. Mount arguments originally passed in to the mount. Current mount parameter values and status information. SEE ALSO netstat(1), iostat(8), mount_nfs(8), nfsd(8) HISTORY The nfsstat command appears in 4.4BSD. BSD 4.4 January 11, 2011 BSD 4.4
|
nfsstat – display NFS statistics
|
nfsstat [-cseuv] [-w wait] [-n net|user] [-m [mountpath]]
| null | null |
eyapp5.30
|
The eyapp compiler is a front-end to the Parse::Eyapp module, which lets you compile Parse::Eyapp grammar input files into Perl LALR(1) Object Oriented parser modules. OPTIONS IN DETAIL -v Creates a file grammar.output describing your parser. It will show you a summary of conflicts, rules, the DFA (Deterministic Finite Automaton) states and overall usage of the parser. Implies option "-N". To produce a more detailed description of the states, the LALR tables aren't compacted. Use the combination "-vN" to produce an ".output" file corresponding to the compacted tables. -s Create a standalone module in which the parsing driver is included. The modules including the LALR driver (Parse::Eyapp::Driver), those for AST manipulations (Parse::Eyapp::Node and Parse::Eyapp::YATW)) and Parse::Eyapp::Base are included - almost verbatim - inside the generated module. Note that if you have more than one parser module called from a program, to have it standalone, you need this option only for one of your grammars; -n Disable source file line numbering embedded in your parser module. I don't know why one should need it, but it's there. -m module Gives your parser module the package name (or name space or module name or class name or whatever-you-call-it) of module. It defaults to grammar -o outfile The compiled output file will be named outfile for your parser module. It defaults to grammar.pm or, if you specified the option -m A::Module::Name (see below), to Name.pm. -c grammar[.eyp] Produces as output (STDOUT) the grammar without the actions. Only the syntactic parts are displayed. Comments will be also stripped if the "-v" option is added. -t filename The -t filename option allows you to specify a file which should be used as template for generating the parser output. The default is to use the internal template defined in Parse::Eyapp::Output.pm. For how to write your own template and which substitutions are available, have a look to the module Parse::Eyapp::Output.pm : it should be obvious. -b shebang If you work on systems that understand so called shebangs, and your generated parser is directly an executable script, you can specify one with the -b option, ie: eyapp -b '/usr/local/bin/perl -w' -o myscript.pl myscript.yp This will output a file called myscript.pl whose very first line is: #!/usr/local/bin/perl -w The argument is mandatory, but if you specify an empty string, the value of $Config{perlpath} will be used instead. -B prompt Adds a modulino call '__PACKAGE->main(<prompt>) unless caller();' as the very last line of the output file. The argument is mandatory. -C grammar.eyp An abbreviation for the combined use of -b '' and -B '' -T grammar.eyp Equivalent to %tree. -N grammar.eyp Equivalent to the directive %nocompact. Do not compact LALR action tables. -l Do not provide a default lexical analyzer. By default "eyapp" builds a lexical analyzer from your "%token = /regexp/" definitions grammar The input grammar file. If no suffix is given, and the file does not exists, an attempt to open the file with a suffix of .eyp is tried before exiting. -V Display current version of Parse::Eyapp and gracefully exits. -h Display the usage screen. EXAMPLE The following "eyapp" program translates an infix expression like "2+3*4" to postfix: "2 3 4 * +" %token NUM = /([0-9]+(?:\.[0-9]+)?)/ %token VAR = /([A-Za-z][A-Za-z0-9_]*)/ %right '=' %left '-' '+' %left '*' '/' %left NEG %defaultaction { "$left $right $op"; } %% line: $exp { print "$exp\n" } ; exp: $NUM { $NUM } | $VAR { $VAR } | VAR.left '='.op exp.right | exp.left '+'.op exp.right | exp.left '-'.op exp.right | exp.left '*'.op exp.right | exp.left '/'.op exp.right | '-' $exp %prec NEG { "$exp NEG" } | '(' $exp ')' { $exp } ; %% Notice that there is no need to write lexer and error report subroutines. First, we compile the grammar: pl@nereida:~/LEyapp/examples/eyappintro$ eyapp -o postfix.pl -C Postfix.eyp If we use the "-C" option and no "main()" was written one default "main" sub is provided. We can now execute the resulting program: pl@nereida:~/LEyapp/examples/eyappintro$ ./postfix.pl -c 'a = 2*3 +b' a 2 3 * b + = When a non conformant input is given, it produces an accurate error message: pl@nereida:~/LEyapp/examples/eyappintro$ ./postfix.pl -c 'a = 2**3 +b' Syntax error near '*'. Expected one of these terminals: '-' 'NUM' 'VAR' '(' There were 1 errors during parsing AUTHOR Casiano Rodriguez-Leon COPYRIGHT Copyright © 2006, 2007, 2008, 2009, 2010, 2011, 2012 Casiano Rodriguez- Leon. Copyright © 2017 William N. Braswell, Jr. All Rights Reserved. Parse::Yapp is Copyright © 1998, 1999, 2000, 2001, Francois Desarmenien. Parse::Yapp is Copyright © 2017 William N. Braswell, Jr. All Rights Reserved. This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.8 or, at your option, any later version of Perl 5 you may have available. SEE ALSO • Parse::Eyapp, • perldoc vgg, • The tutorial Parsing Strings and Trees with "Parse::Eyapp" (An Introduction to Compiler Construction in seven pages)> in • The pdf file in <http://nereida.deioc.ull.es/~pl/perlexamples/Eyapp.pdf> • <http://nereida.deioc.ull.es/~pl/perlexamples/section_eyappts.html> (Spanish), • eyapp, • treereg, • Parse::yapp, • yacc(1), • bison(1), • the classic book "Compilers: Principles, Techniques, and Tools" by Alfred V. Aho, Ravi Sethi and • Jeffrey D. Ullman (Addison-Wesley 1986) • Parse::RecDescent. POD ERRORS Hey! The above document had some coding errors, which are explained below: Around line 199: Non-ASCII character seen before =encoding in '©'. Assuming UTF-8 perl v5.30.3 2017-06-14 EYAPP(1)
|
eyapp - A Perl front-end to the Parse::Eyapp module
|
eyapp [options] grammar[.eyp] eyapp -V eyapp -h grammar The grammar file. If no suffix is given, and the file does not exists, .eyp is added
| null | null |
uupick
|
The uupick program is used to conveniently retrieve files transferred by the uuto program. For each file transferred by uuto, uupick will display the source system, the file name, and whether the name refers to a regular file or a directory. It will then wait for the user to specify an action to take. One of the following commands must be entered: `q' Quit out of `uupick'. `RETURN' Skip the file. `m [directory]' Move the file or directory to the specified directory. If no directory is specified, the file is moved to the current directory. `a [directory]' Move all files from this system to the specified directory. If no directory is specified, the files are moved to the current directory. `p' List the file on standard output. `d' Delete the file. `! [command]' Execute `command' as a shell escape.
|
uupick - retrieve files transferred by uuto
|
uupick [-s system] [--system system]
|
-s system, --system system Used to restrict `uupick' to only present files transferred from a particular system. Standard UUCP options: -x type, --debug type Turn on particular debugging types. The following types are recognized: abnormal, chat, handshake, uucp-proto, proto, port, config, spooldir, execute, incoming, outgoing. -I file, --config Set configuration file to use. -v, --version Report version information and exit. --help Print a help message and exit. SEE ALSO uucp(1), uuto(1) AUTHOR Ian Lance Taylor <ian@airs.com>. Text for this Manpage comes from Taylor UUCP, version 1.07 Info documentation. Taylor UUCP 1.07 uupick(8)
| null |
ipcs
|
The ipcs utility provides information on System V interprocess communication (IPC) facilities on the system. The options are as follows: -a Show the maximum amount of information possible when displaying active semaphores, message queues, and shared memory segments. (This is shorthand for specifying the -b, -c, -o, -p, and -t options.) -b Show the maximum allowed sizes for active semaphores, message queues, and shared memory segments. The “maximum allowed size” is the maximum number of bytes in a message on a message queue, the size of a shared memory segment, or the number of semaphores in a set of semaphores. -c Show the creator's name and group for active semaphores, message queues, and shared memory segments. -M Display system information about shared memory. -m Display information about active shared memory segments. -o Show outstanding usage for active message queues, and shared memory segments. The “outstanding usage” is the number of messages in a message queue, or the number of processes attached to a shared memory segment. -p Show the process ID information for active semaphores, message queues, and shared memory segments. The “process ID information” is the last process to send a message to or receive a message from a message queue, the process that created a semaphore, or the last process to attach or detach a shared memory segment. -Q Display system information about messages queues. -q Display information about active message queues. -S Display system information about semaphores. -s Display information about active semaphores. -T Display system information about shared memory, message queues and semaphores. -t Show access times for active semaphores, message queues, and shared memory segments. The access times is the time of the last control operation on an IPC object, the last send or receive of a message, the last attach or detach of a shared memory segment, or the last operation on a semaphore. -u Display information about IPC mechanisms owned by user. User specification can be in the form of a numeric UID or a login name. If none of the -M, -m, -Q, -q, -S, or -s options are specified, information about all active IPC facilities is listed. RESTRICTIONS System data structures may change while ipcs is running; the output of ipcs is not guaranteed to be consistent. BUGS This manual page is woefully incomplete, because it does not at all attempt to explain the information printed by ipcs. SEE ALSO ipcrm(1) AUTHORS Thorsten Lockert <tholo@sigmasoft.com> macOS 14.5 July 29, 2021 macOS 14.5
|
ipcs – report System V interprocess communication facilities status
|
ipcs [-abcMmopQqSsTt] [-u user]
| null | null |
pluginkit
|
pluginkit manages the PlugInKit subsystem for the current user. It can query the plug-in database and make limited interventions for debugging and development. A list of flags and their descriptions: -A, --all-versions Matches find all versions of a given plug-in known to the system. By default, only the latest (highest) version is returned. -a Explicitly adds plugins at the file location(s) given, even if they are not normally eligible for automatic discovery. Note that database clean-ups may eventually remove them in that case. -e election Perform a matching operation (see -m) and apply the given user election setting to all matching plug-ins. Elections can be "use", "ignore", and "default". Elections are applied to all plug-ins with given identifier. -D, --duplicates Matches find all physical instances of a given plug-in known to the system, even multiple copies with the same version. -i, --identifier identifier Specifies a plug-in identifier to match, a short-hand for NSExtensionIdentifier=identifier. -m --match Requests pluginkit to scan all registered plug-ins for those matching the given search criteria (see DISCOVERY MATCHING below). All matching plug-ins are returned, one per line. Each line may begin with any one of the following tags indicating the user election state: + indicates that the user has elected to use the plug-in - indicates that the user has elected to ignore the plug-in ! indicates that the user has elected to use the plug-in for debugger use = indicates that the plug-in is superseded by another plug- in ? unknown user election state Add the -v option to get more detailed output. This is exactly reproducing the functionality of PlugInKit discovery, except that no host-specific restrictions are imposed. The -A and -D options affect the outcome. -P --platform platform Explicitly specifies a plug-in platform to match (macOS only). Can be provided multiple times on the command line and all specified platforms will be matched. Available platforms: native, maccatalyst -p --protocol protocol Specifies a plug-in protocol to match, a short-hand for NSExtensionPointName=protocol. -r Explicitly removes plugins at the file location(s) given. Note that automatic discovery procedures may add them back if they are still present. --raw Present replies from the management daemon (pkd) in raw XML form. This is primarily useful for debugging and for reporting full state in bug reports. -v Asks for more verbose operation. For matching requests, more detail is printed about each matched plug-in. This option can be given more than once. DISCOVERY MATCHING During plug-in discovery, PlugInKit matches plug-ins against match criteria and delivers matching plug-ins. Only plug-ins that match all given criteria are eligible. Criteria are expressed as "key" (must be present) or "key=value" (key must be present and have the given value). The -i and -p arguments are shorthands for the conventional identifier and protocol matching keys. All matching plug-ins are reduced according to the -A and -D options given. With -D, all eligible plug-ins are returned. With -A, the last- registered (by timestamp) instance of each version is returned. By default, only the last instance of the highest version is returned. Note that this reduction is applied after matching. EXPLICIT CHANGES The -a and -r options make changes to the system's plug-in registry. The registry is designed to operate automatically, and will update on its own as applications are installed, removed, and discovered. The options available through pluginkit are intended only for limited manipulation during plug-in development and for certain maintenance tasks. They cannot make permanent alterations of the automatic registry state. SEE ALSO launchd(8), pkd(8) HISTORY The pluginkit command first appeared in OS X 10.9. Darwin January 22, 2014 Darwin
|
pluginkit – plugin plug-in extension pluginkit
|
pluginkit -m [-ADv] [-p -protocol] [-i -identifier] [key=value] [...] pluginkit [-ar] [-v] [file ...] pluginkit -e election [-p -protocol] [-i -identifier] [key=value] [...]
| null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.