Test2 Flashcards
Which of the following programs on a Linux system could you use as a replacement for Adobe Photoshop?
Gimp
Gimp is the open-source created competitor to Adobe Photoshop. It is a full-featured program, like Photoshop, but is completely free to use. It can read and write to Photoshop formatted files, too!
Which of the following answers is true for cloud computing?
Cloud Computing provides new tools to manage IT resources
Cloud computing empowers organizations to process larger workloads and offers enhanced collaboration and improved mobility for employees. This also allows for better management of IT resources and provides many new tools that can be used to manage IT resources.
Which of the following is the UNIX device name for a physical or virtual terminal connection?
tty
A tty is the Unix device name for a physical or virtual terminal connection. It essentially represents a singular text/computer interface. On Linux, there are multiple tty interfaces (tty0, tty1, tty2, etc.). tty7 is the graphical interface.
Which is NOT a Linux distribution?
Torvalds
CentOS, openSUSE, and Debian are popular Linux distros. Torvalds is the last name of Linus Torvalds, a Finnish software engineer who is the creator and, historically, the Linux kernel’s principal developer, which is the kernel for Linux.
Which of the following programs on a Linux system could you use as a replacement for Microsoft PowerPoint?
Impress
Impress is the LibreOffice equivalent of Microsoft PowerPoint. It can even read and write to PowerPoint files directly from within Impress.
Which of the following is the on-demand availability of computer system resources, especially data storage and computing power, without direct active management by the user?
Cloud Computing
Cloud computing is the on-demand availability of computer system resources, especially data storage and computing power, without the user’s direct active management. The term is generally used to describe data centers available to many users over the Internet. Large clouds, predominant today, often have functions distributed over multiple locations from central servers.
Which Linux distribution is used as a basis for the creation of Ubuntu Linux?
Debian
Ubuntu is a free and open-source Linux distribution based on Debian.
Which command is used to rename a file on Linux?
mv
The mv command is used to move a file or rename a file in Linux.
Which of the following is true about environment variable names by convention?
Contains all uppercase letters
By convention, all environmental variable names should contain only uppercase letters.
Which command can be used to display the contents of multiple files to the screen at once?
cat
The cat command can display the contents of multiple files to the screen at once. For example, “cat file1 file2” will display the contents of file1 and then file2 to the screen before ending the command.
What symbol can be used to represent none, one, or multiple characters within search criteria?
*
The * is used to represent no, one, or multiple characters within search criteria. This process is known as globbing.
What does the “rm -rf” command do in Linux?
Remove all the files in the directory and subdirectories
The rm command is a UNIX and Linux command line utility for removing files or directories on a Linux system. When you combine the -r and -f flags, it means that recursively and forcibly remove a directory (and its contents) without prompting for confirmation. You should always keep in mind that “rm -rf” is one of the most dangerous commands, that you should be extremely careful when running on a Linux system, especially as root.
Which of the following commands increases the number of files within a directory?
touch newfile
The command touch is used to create a new file in the current directory. The command touch newfile will create a new empty textfile in the current directory. The ls and rmdir commands will not create a newfile in the directory. The command create here is not a valid command.
Which command would a user type to create a new file within the current directory?
touch
The touch command is a standard command used in Linux to create a new file. If the file or directory already exists specified by the user in the touch command, then the timestamp of it will be changed or modified.
Which command is used to copy files from one directory to another?
cp
The cp command stands for copy.
Which of the following is true about a recursive directory listing?
It includes the content of sub-directories
A recursive directory listing includes the content of sub-directories. Some of the other options provided may be true if you include the right switches and additional ls command options. By default, though, just using ls -R, you will get a list of the files within the current directory and any files within subdirectories.
What keyword should be used to fill in the blank in the following segment of the given shell script? for i in *; _____ cat $i done
do
The for loop lets you iterate or ‘do’ over a series of ‘words’ within a string.
You have been asked to create a script will present the user with a onboard menu in which they can select 4 different commands to run by entering 1, 2, 3, or 4. Which of the following statements should you use to create the simplest and most effective method of choosing the command to run based on the user’s input?
case
A case statement uses a variable, and each pattern shown before the right parenthesis is a possible value of that variable. If the user’s entry is equal to the value before the parenthesis, the case is run. Using a series of nested if-then-else statements will work, but it is rather clumsy and confusing to understand. A case statement is a much more efficient choice.
How is it possible to determine if an executable file is a shell script read by Bash?
The first line starts with #!/bin/bash.
The first line of the script should start with #!/bin/bash. Most shell scripts will end with a .sh by convention, but it is not required. Remember, in Linux, file extensions are only useful to the end-user, but the operating system completely ignores them.
Which of the following options is used to gzip a file called filename?
gzip filename
The syntax for using gzip is “gzip filename”. By default, when you compress a file or folder using the gzip command, it will have the same file name as before but with the extension .gz.
Which of the following statements may be used to access the second command line argument to a script?
$2
Inside a script, the $1 variable references the first argument from the command line and $2 is the second argument, and so on. The variable $0 references to the current script.
Which command line tool is used to compress a single file using the Burrows-Wheeler algorithm?
bzip2
bzip2 is a free and open-source file compression program that uses the Burrows-Wheeler block sorting text compression algorithm and Huffman coding. It only compresses single files and is not a file archiver.
Which command can be used to display the contents of multiple files to the screen at once?
cat
The cat command can display the contents of multiple files to the screen at once. For example, “cat file1 file2” will display the contents of file1 and then file2 to the screen before ending the command.
Which string should you add to put the date into the prompt of the shell?
\d
The \d option would be added to add the date to the prompt in the shell.