IFT 250
Which of the following applied to file names?
-Unique to a directory location -Up to 255 characters but 20 much more reasonable -Can contains upper and lower case letters, numbers, and some special characters -(CORRECT) All of the above!
Which of the following commands would you use to get help while using the UNIX command line?
-help -info -man -(CORRECT)All of the above!
Features of the Unix operating system include:
-large repository of apps -constant updates releases -rich programming tools -high level of performance -available on all modern hardware platforms -easily scable -(CORRECT) All of the above!
Which of the following commands would you use after a command with a pipe | to control paging on the monitor?
-less -more -(CORRECT) both of the above answers are correct!
Files are containers of data where directories are containers for collections of files.
True
Linux uses a default directory organization with upper-level directory names and organized files that makes it easier for system administrators to locate files.
True
Metacharacters are special characters that have special meaning to the shell.
True
The UNIX shell is both an interpreter and a scripting language.
True
The environment variables, aliases and set options that we define are only applicable for the session and revert to their defaults when the session ends.
True
The history feature lets you recall previous commands (even those executed in previous sessions), edit them if required, and re-execute them.
True
There are multiple default file options for login scripts in UNIX and the bash shell.
True
UNIX/Linux uses a hierarchical directory structure.
True
Using redirection and pipes are very powerful command line tools. Redirection allows you to redirect standard input, output, and error to a file. Pipes allow you to redirect output from one command to becomes input to the next command.
True
When the \ precedes a metacharacter, its special meaning is turned off. This is known as "escaping" the metacharacter.
True
When the shell enables one or more arguments to be obtained from the standard output of another command is known as command substitution. The backtick character is used for command substitution.
True
X-Windows is a graphical user interface developed by MIT in the 1980s.
True
You really should know vi pretty well if you are a system administrator or programmer on the UNIX platform.
True
grep scans its input for a pattern, then displays the selected pattern, lines numbers and/or the filenames where the pattern occurs.
True
Which of the following commands would you use to change your password for your user account?
passwd
Which of the following commands can you use to accept an input stream and paginate output of that stream with various options such as length of page, double space, and/or number the lines of output?
pr
Which of the following commands would you use to determine what directory you are current in?
pwd
On the Unix / Linux operating system, the system admin user account is ___________________.
root
A _____________ is a component in Unix that runs on top of the kernel and provides a command line user environment.
shell
Which of the following commands would you use to review your terminal settings?
stty
________________________________ is software that manages the computer's hardware and provides a convenient and safe environment for running programs. It acts as an interface between programs and the hardware (CPU, RAM, hard disk drive, printer, CD-ROM, etc).
Operating system
UNIX uses which of the following network communication protocol suites natively?
TCP/IP
A process is a running program.
True
A regular expression uses an elaborate metacharacter set that overshadows the shell's wild cards. This includes the use of character class with [ ] (square brackets) , negating of class with ^ (caret), * (asterisk), and pattern locations with $ and ^ (caret).
True
A variable assignment in the Bourne family of shells can be made with an = sign by a user (example count=5).
True
Commands may vary from shell to shell. For example, commands in the bash shell may not be the same syntax format or may not even be available at all in the C shell.
True
Which of the following commands would you use to pull selected lines of text from a file that matches a certain pattern?
grep
Which of the following commands would you use to review the last 50 commands executed at the command line for the user that you are currently logged on as?
history
Which of the following commands could you use to see your IP address on UNIX?
ifconfig
What is the unique number that identifies a file in the filesystem?
inode number
Which vi mode allows users to insert or append text at the cursor?
input
To set a pointer with a new name or location to an existing file without making a second copy of the file, use the ____________ command.
ln
Linux uses the BSD printing system by default which includes the following commands:
lpr, lpq, and lprm
Which of the following commands would you use to see when a file was last modified?
ls -l
Which of the following commands would you use to send mail to another user on the UNIX system?
mail or mailx
Who developed the vi editor?
Bill Joy
Unix is written in the ________ programming language. This allows for portability across hardware platforms.
C
Which of the following can be used in "quoting", which can be used to turn of the meaning of a metacharacter?
Correct! " (double quote) Correct! ' (single quote)
Which of the following are valid metacharacters used to match file names, known as wildcards in UNIX, although the implementation may differ some among various shells?
Correct! * Correct! ? Correct! [ ... ] Correct! { ... }
Which of the following are common shells for UNIX?
Correct! Bourne (/bin/sh) Correct! Korn (/bin/ksh) Correct! Bash (/bin/bash) Correct! C (/bin/csh)
sed uses 2 styles of addressing know as:
Correct! Line Addressing Correct! Context Addressing
Which of the following are file types?
Correct! Link (l) Correct! Files (-) Correct! Directories (d) Correct! Character Devices (c) Correct! Block Devices (b) Correct! Also, others not listed
Which of the following commands could you use to see variables available in the current shell (environmental and/or user-defined)?
Correct! env Correct! set
If you wanted to look at just the beginning or ending few lines of a file, which of the following commands might you use?
Correct! head Correct! tail
In many UNIX/Linux data and configuration files are "fields". Sometimes these fields are separated by:
Correct! tabs Correct! comma (,) Correct! colon (:)
Which of the following commands could you use to find singular and not repeated lines in a file?
Correct! uniq Correct! sort Correct! comm
Which of the following approaches could you use to add a new user to your UNIX/Linux operating system?
Correct! useradd command Correct! edit the /etc/passwd file using vi
Which of the following commands might you use to install software on your Linux operating system?
Correct! yum Correct! rpm
sed is a multipurpose tool that combines the work of several filters. sed performs noninteractive operations on a data stream. sed has a host of features that allow you ti select lines and run instructions on them.
True
To change the permissions associated with a file, use the ____________ command.
chmod
Which of the following commands can you use to compare each byte of two files and terminates the moment it encounters a difference?
cmp
Which mode does vi place you into when vi first starts?
command
While head and tail are used to slice a file horizontally, which of the following commands can you use to cut a file vertically?
cut
Which command would you use to print the contents of an environment variable to the screen?
echo
Which of the following commands would you use to print a string of text to the monitor?
echo
Which mode is used by vi for file handling and substitution?
ex or last line