Linux LinkedIn Learning

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

What symbol is often used to redirect the standard output or standard error into a file or other location?

>

How would you alter this command using octal notation to give read, write, and execute permissions to the file's owner, members of the file's designated group, and all other users for the file poems.txt? chmod poems.txt

chmod 777 poems.txt

You want to make a copy of the poems.txt file. Which command would you use?

cp poems.txt poems2.txt

If a file path has a space in it, you can wrap the path in quotes, or you can _____ the space with a \ character.

escape

What can you write to find files in Alice's home directory with report in the name?

find /home/alice -name "*report*"

To view only the first eight lines of the file report.txt, you could write _____.

head -n8 report.txt

You enter the command list and receive an error containing suggestions for alternate commands. Why did this happen?

list is not a valid command.

You are trying to list the contents of a directory, but you forget the options you can add to ls. What shows you a brief amount of information about the command you entered?

ls --help

Which command shows a long listing, including file sizes and ownership information?

ls -l

How would you find the manual page for the command ip?

man ip

You need to use superuser privileges to _____.

modify system settings and software

Many command-line tools are intended to be used in pipelines with other commands because they are _____.

modular

What could you write to rename the file report.txt to output.txt?

mv report.txt output.txt

File permissions can be set using two modes. What are they?

octal and symbolic

File permissions let us control who can _____.

read, write, and execute a file

What can you write to delete a directory called Photos which contains many subdirectories?

rm -r Photos

What is the highest level of the filesystem hierarchy called?

root

The _____ is where we use the command line interface.

shell

You have come across an unknown file named myfile.txt. Which command would you type to display ownership or modification information about this file?

stat myfile.txt

If you we want to execute using superuser privileges, what command do you use in front of another command?

sudo

A symbolic link using a relative path will break if _____.

the link or the referenced file is moved

To recall a previous command in Bash, you can use _____.

the up arrow

Unless it's been modified, the shell's prompt string usually shows _____.

the username, the host name, and the current working directory

The find command lets us look for files by name, size, etc., _____.

wherever the user who runs it has permission to view

To extract files from a tar file, use the option _____.

x

Which character represents a UNIX pipe?

|

Why would a normal user not do any harm by trying to change system files and directories?

Normal users do not have sufficient permissions to modify these files and directories.

What purpose do zip files serve in Linux?

They allow us to combine files in a space-saving way, and are commonly used when we exchange files with other platforms or across the internet.

How can the UNIX Philosophy be summed up?

Tools should do one thing well, and communicate with each other using text.

You redirect output to a specific file but when you open it, you find the file is missing its original contents. Why are the original contents gone?

You used a single > sign, which overwrites the contents of the file.

In the statement df -h /home/alice/Documents, the characters -h represent _____.

an option

To help you look up a command by its description rather than its name, you can use _____.

apropos

The _____ shell is available on many platforms.

bash

The rmdir command _____.

can only delete an empty directory

What command allows you to change to another directory?

cd

If your current working directory is /home/alice/Documents/Financial, and you want to change it to /home/alice, you can use the command _____.

cd ../../

What does the command tar -cf docs.tar Documents/ do?

It creates an archive of the Documents directory, called docs.tar, with no compression.

In most shells, what is the significance of the ~ character?

It represents the path to the current user's home directory.

What will happen when you type part of a command, and then select Tab?

It will autocomplete based on the part of the command you typed.

You want to find any files that start with Po and end with e. Which character would you insert between o and e to match any number of every possible character?

*

While all other users' home directories are kept in /home/, the superuser's home directory is stored at _____.

/root

The following string will list all files in the /usr/bin directory. Which part of this string is the argument? ls -lh /usr/bin

/usr/bin

Which of these is an absolute path?

/var/lib/mysql

Input and output streams are numbered. Which of these represents the standard error?

2

What does the command ln -s outcome.txt report.txt create?

A symlink named report.txt that refers to outcome.txt.

How can you move to the beginning of a line of text?

CTRL + A

How can you cancel a command you've typed but don't want to run?

CTRL + C

What does the mkdir command do?

Creates a directory

You have downloaded a program from the web, and when you try to run it, you receive the error: -bash: ./newprogram: Permission denied How would you attempt to resolve this problem?

Run the command chmod u+x newprogram to add execute permissions to the file.

Why isn't the statement /home/alice ls -l valid?

The command always needs to come first, so this should read ls -l /home/alice


Ensembles d'études connexes

Chapter 5 Intermediate Accounting: Questions

View Set

study guide for the test on thrusday on Unit 6

View Set

SS Option C1 Hypokinetic Disease

View Set

Exponential Growth and Decay: District 7

View Set

AP World History Unit 6 Questions

View Set