Pr (Unix)

Last updated
pr
Original author(s) Ken Thompson,
Dennis Ritchie
(AT&T Bell Laboratories)
Developer(s) Various open-source and commercial developers
Initial releaseNovember 3, 1971;50 years ago (1971-11-03)
Operating system Unix, Unix-like, Plan 9, OS-9, IBM i
Platform Cross-platform
Type Command
License coreutils: GPLv3+

pr is a command on various operating systems that is used to paginate or columnate computer files for printing. It can also be used to compare two files side by side, as an alternative to diff.

It is a required program in a POSIX-compliant environment and has been implemented by GNU as part of the GNU Core Utilities. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities. [1] It is also available in the OS-9 shell. [2] The pr command has also been ported to the IBM i operating system. [3]

Related Research Articles

The Portable Operating System Interface (POSIX) is a family of standards specified by the IEEE Computer Society for maintaining compatibility between operating systems. POSIX defines both the system- and user-level application programming interfaces (API), along with command line shells and utility interfaces, for software compatibility (portability) with variants of Unix and other operating systems. POSIX is also a trademark of the IEEE. POSIX is intended to be used by both application and system developers.

uniq is a utility command on Unix, Plan 9, Inferno, and Unix-like operating systems which, when fed a text file or standard input, outputs the text with adjacent identical lines collapsed to one, unique line of text.

In the Unix operating system, shar is an archive format created with the Unix shar utility. A shar file is a type of self-extracting archive, because it is a valid shell script, and executing it will recreate the files. To extract the files, only the standard Unix Bourne shell sh is usually required.

uname Standard UNIX utility that prints name and other details about the machine

uname is a computer program in Unix and Unix-like computer operating systems that prints the name, version and other details about the current machine and the operating system running on it.

ln (Unix)

The ln command is a standard Unix command utility used to create a hard link or a symbolic link (symlink) to an existing file or directory. The use of a hard link allows multiple filenames to be associated with the same file since a hard link points to the inode of a given file, the data of which is stored on disk. On the other hand, symbolic links are special files that refer to other files by name.

chown Command used on Unix-like systems to change the owner of a file

The command chown, an abbreviation of change owner, is used on Unix and Unix-like operating systems to change the owner of file system files, directories. Unprivileged (regular) users who wish to change the group membership of a file that they own may use chgrp.

In computing, touch is a command used to update the access date and/or modification date of a computer file or directory. It is included in Unix and Unix-like operating systems, TSC's FLEX, Digital Research/Novell DR DOS, the AROS shell, the Microware OS-9 shell, and ReactOS. The command is also available for FreeDOS and Microsoft Windows.

xargs is a command on Unix and most Unix-like operating systems used to build and execute commands from standard input. It converts input from standard input into arguments to a command.

tr (Unix) Command in Unix-like operating systems

tr is a command in Unix, Plan 9, Inferno, and Unix-like operating systems. It is an abbreviation of translate or transliterate, indicating its operation of replacing or removing specific characters in its input data set.

wc (Unix)

wc is a command in Unix, Plan 9, Inferno, and Unix-like operating systems. The program reads either standard input or a list of computer files and generates one or more of the following statistics: newline count, word count, and byte count. If a list of files is provided, both individual file and total statistics follow.

In Unix and Unix-like operating systems, iconv is a command-line program and a standardized application programming interface (API) used to convert between different character encodings. "It can convert from any of these encodings to any other, through Unicode conversion."

cmp (Unix)

In computing, cmp is a command-line utility on Unix and Unix-like operating systems that compares two files of any type and writes the results to the standard output. By default, cmp is silent if the files are the same; if they differ, the byte and line number at which the first difference occurred is reported. The command is also available in the OS-9 shell.

mv is a Unix command that moves one or more files or directories from one place to another. If both filenames are on the same filesystem, this results in a simple file rename; otherwise the file content is copied to the new location and the old file is removed. Using mv requires the user to have write permission for the directories the file will move between. This is because mv changes the content of both directories involved in the move. When using the mv command on files located on the same filesystem, the file's timestamp is not updated.

rm (Unix)

rm is a basic command on Unix and Unix-like operating systems used to remove objects such as computer files, directories and symbolic links from file systems and also special files such as device nodes, pipes and sockets, similar to the del command in MS-DOS, OS/2, and Microsoft Windows. The command is also available in the EFI shell.

In computing, tee is a command in command-line interpreters (shells) using standard streams which reads standard input and writes it to both standard output and one or more files, effectively duplicating its input. It is primarily used in conjunction with pipes and filters. The command is named after the T-splitter used in plumbing.

test is a command-line utility found in Unix, Plan 9, and Unix-like operating systems that evaluates conditional expressions. test was turned into a shell builtin command in 1981 with UNIX System III and at the same time made available under the alternate name [.

In computing, sleep is a command in Unix, Unix-like and other operating systems that suspends program execution for a specified time.

expr is a command line utility on Unix and Unix-like operating systems which evaluates an expression and outputs the corresponding value. It first appeared in Unix v7. The command is available as a separate package for Microsoft Windows as part of the UnxUtils collection of native Win32 ports of common GNU Unix-like utilities. The expr command has also been ported to the IBM i operating system.

dirname is a standard computer program on Unix and Unix-like operating systems. When dirname is given a pathname, it will delete any suffix beginning with the last slash ('/') character and return the result. dirname is described in the Single UNIX Specification and is primarily used in shell scripts.

od is a command on various operating systems for displaying ("dumping") data in various human-readable output formats. The name is an acronym for "octal dump" since it defaults to printing in the octal data format.

References

  1. "Native Win32 ports of some GNU utilities". unxutils.sourceforge.net.
  2. Paul S. Dayan (1992). The OS-9 Guru - 1 : The Facts. Galactic Industrial Limited. ISBN   0-9519228-0-7.
  3. IBM. "IBM System i Version 7.2 Programming Qshell" (PDF). Retrieved 2020-09-05.{{cite web}}: CS1 maint: url-status (link)