Misplaced Pages

chown

Article snapshot taken from Wikipedia with creative commons attribution-sharealike license. Give it a read and then ask your questions in the chat. We can research this topic together.

In computing , a command is a directive to a computer program to perform a specific task. It may be issued via a command-line interface or as input to a network service as part of a network protocol , or as an event triggered in a graphical user interface .

#530469

7-433: The command chown / ˈ tʃ oʊ n / , an abbreviation of change owner , is used on Unix and Unix-like operating systems to change the owner of file system files and directories . Unprivileged (regular) users who wish to change the group membership of a file that they own may use chgrp . The ownership of any file in the system may only be altered by a super-user. A user cannot give away ownership of

14-544: A file, even when the user owns it. Similarly, only a member of a group can change a file's group ID to that group. The version of chown bundled in GNU coreutils was written by David MacKenzie and Jim Meyering. 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 chown command has also been ported to

21-511: Is done in Bash with the builtin command printf , while it is done with the built-in function print() in Python. Here are some commands given to a command-line interpreter ( Unix shell ). The following command changes the user's working position in the directory tree to the directory /home/pete . The utility program is cd and the argument is /home/pete : The following command prints

28-467: The IBM i operating system. Command (computing) Specifically, the term command is used in imperative programming languages. The name arises because statements in these languages are usually written in a manner similar to the imperative mood used in many natural languages . A statement in an imperative programming language would then be a sentence in a natural language, and the command would be

35-611: The predicate . Many programs allow specifically formatted arguments , known as flags or options, which modify the default behaviour of the program, while further arguments may provide objects, such as files, to act on. As an analogy to a natural language, the flags are adverbs, while the other arguments are objects . The meaning of command is highly dependent on context. For example, some authors refer to conditionals as commands while they are called expressions in Python or Bash and statements in JAVA. Similarly, writing to stdout

42-447: The argument is the directory /bin : The following command displays the contents of the files ch1.txt and ch2.txt . The program name is cat , having two file name arguments: Here are some commands for the DOS , OS/2 and Microsoft Windows command prompt processor. The following command displays the contents of the file readme.txt . The program name is type and the argument

49-404: The text Hello World on the standard output stream, which, in this case, just prints the text on the screen. The program name is echo and the argument is "Hello World". The quotes are used to prevent Hello and World being treated as separate tokens: The following commands are equivalent. They list files in the directory /bin . The program is ls , having three flags ( l , t , r ), and

#530469