|
In computer command line interfaces, a command-line argument is an argument sent to a program being called. In general, a program can take any number of command-line arguments, which may be necessary for the program to run, or may even be ignored, depending on the function of that program. It has been suggested that this article or section be merged with Command prompt. ...
A parameter is a variable which can be accepted by a subroutine. ...
For example, in the popular Unix environment, an example of a command-line argument is: Unix or UNIX is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie, and Douglas McIlroy. ...
rm file.s "file.s" is a command-line argument which tells the program rm to remove the file "file.s".
Command-line switch
A command-line switch or simply switch (also known as a flag, an option, or a command-line parameter) is an indication by a user that a computer program should change its default behaviour. The terms computer program, software program, applications program, system software, or just program are used to refer to either an executable program by both lay people and computer programmers or the collection of source code from which an executable program is created (eg, compiled). ...
For example, in the OpenVMS operating system, the command directory is used to list the files inside a directory. By default—that is, when the user simply types directory—it will list only the names of the files. By adding the switch /owner (to form the command directory/owner), the user can instruct the directory command to also display the ownership of the files. OpenVMS (Open Virtual Memory System or just VMS) is the name of a high-end computer server operating system that runs on the VAX and Alpha family of computers developed by Digital Equipment Corporation of Maynard, Massachusetts (now owned by Hewlett-Packard), and more recently on Hewlett-Packard systems built...
To meet Wikipedias quality standards, this article or section may require cleanup. ...
In computing, a command is a directive to a computer program acting as an interpreter of some kind, in order to perform a specific task. ...
A computer file is a collection of information that is stored in a computer system and can be identified by its full path name. ...
In computing, a directory, catalog, or folder, is an entity in a file system which can contain a group of files and/or other directories. ...
The format of switches varies widely between operating systems. Under the OpenVMS operating system, switches are entered in the form command/switch_1/switch_2/switch_3=value etc. The form /switch=value is used to provide an argument to the switch; for example, /user=john might specify that only files owned by the user "john" should be displayed. The factual accuracy of this article is disputed. ...
MS-DOS and related operating systems typically use single-letter switches, for example dir/w/p/a:s. In this case, the : character serves the same purpose as = above. Microsofts disk operating system, MS-DOS, was Microsofts implementation of DOS, which was the first popular operating system for the IBM PC, and until recently, was widely used on the PC compatible platform. ...
Traditionally, the Unix operating system is similar to MS-DOS; switches are single letters, and introduced via a - (hyphen); e.g. ls -l -F -a. When options are given in this form (a dash and then a letter or word), they are more often called flags - as in compiler flags. Multiple flags may be combined into one, so the previous command could be rewritten ls -lFa. However, with the increasingly widespread use of software from the GNU project, particularly in the Linux operating system, GNU's "long options" are also widely used. Long options are introduced via --, and are typically whole words. For example, ls --long --classify --all. Arguments to long options are provided with =, as ls --block-size=1024. Unix or UNIX is a computer operating system originally developed in the 1960s and 1970s by a group of AT&T employees at Bell Labs including Ken Thompson, Dennis Ritchie, and Douglas McIlroy. ...
GNU (pronounced ) is a free operating system consisting of a kernel, libraries, system utilities, compilers, and end-user applications. ...
Linux (also known as GNU/Linux) is a Unix-like computer operating system. ...
GNU -- is also used to terminate option list. This is very practical; for example, if one has file called -file1, and wants delete it by typing rm -file1, rm might think that -file1 is command line switch, and produce an error. Using rm -- -file1 removes ambiguity. The title given to this article is incorrect due to technical limitations. ...
|