Midterm (Short Answer) Flashcards
What is the who command used for?
To determine information about who is logged in, use the who command
Why is the who command important in a multiuser system?
In a multiuser system, knowing who is logged in to the system is important for the administrator, so the administrator can periodically verify authorized users and levels of use. Knowing who is logged in is also valuable for ordinary users,who can use that information to judge how busy the system is at a given time or who might want to contact another user.
What is the man program?
For reference, UNIX/Linux include an online manual that contains all commands, including their options and arguments. The man program in UNIX/Linux displays this online manual, called the man pages, for command-line assistance.
What argument(s) does the man program accept?
The man program usually accepts only one argument—the name of the command about which you want more information. The online manual shows the valid command formats that your system accepts.
What is the cat command and how is it used?
The cat command gets its name from the word “concatenate”, which means “to link”. You can display multiple files by entering their file names after the cat command and separating them with spaces. UNIX/Linux then display the files’ contents in the order in which you entered them.
What is output redirection (>)?
In UNIX/Linux, the greater-than sign (>) is called an output redirection operator. You can use this redirection operator to create a new file or overwrite an existing file by attaching it to a command that produces output. In effect, you redirect the output to a disk file instead of to the monitor.
How is output redirection performed in UNIX/Linux?
For example, if you type who > current_users and press Enter, this creates a file called current_users that contains the information from the who command.
When is output redirection (>) useful?
Redirecting output is useful in many circumstances. For example, when you monitor a system, you might redirect output to a file that you can examine later. Or, you might have a program or report-generating utility that manipulates data so that you can redirect the results to a file instead of to the screen.
What command do you use to copy files in UNIX/Linux? How do you use this command?
The UNIX/Linux copy command is cp, which is used to copy files from one directory to another. The -i option provides valuable insurance because it warns you that the cp command overwrites the destination file, if a file of the same name already exists. You can also use the dot notation (current directory) as shorthand to specify the destination of a cp command.
Why would you want to set file permissions?
Early in computing, people didn’t worry much about security. Stolen files and intrusions were less of a concern, in part because networks were rare and there was no Internet. As you have probably learned through the media, friends, and school, times are different and you need to protect your files. Security is important on UNIX/Linux systems because they can house multiple users and are connected to networks and the Internet, all potential sources of intrusion.
Users can set permissions for files (including directories) they own so as to establish security. System administrators also set permissions to protect system and shared files. Permissions manage who can read, write, or execute files.
What is the role of GIDs in UNIX/Linux systems?
The system administrator assigns group ids when he or she adds a new user account. A group id (GID) gives a group of users equal access to files that they all share. Others are all other users who are not associated with the owner’s group by a group id, but who have read and execute permissions.