Module 3 Exploring Linux Filesystems

¡Supera tus tareas y exámenes ahora con Quizwiz!

When working with the vi editor, other than pressing "I", pressing which another key will invoke the insert mode?

-a

Common Options to the ls Command:

-a , --all Lists all filenames -A , --almost-all Lists most filenames (excludes the . and .. special files) -C Lists filenames in column format --color=n Lists filenames without color -d , --directory Lists directory names instead of their contents -f Lists all filenames without sorting -F , --classify Lists filenames classified by file type --full-time Lists filenames in long format and displays the full modification time -l Lists filenames in long format -lh , -l , --human-readable Lists filenames in long format with human-readable (easy-to-read) file sizes -lG , -l , --no-group-o Lists filenames in long format but omits the group information -r , --reverse Lists filenames reverse sorted -R , --recursive Lists filenames in the specified directory and all subdirectories -s Lists filenames and their associated sizes in kilobytes (KB) -S Lists filenames sorted by file size (largest first) -t Lists filenames sorted by modification time (newest first) -U Lists filenames without sorting -x Lists filenames in rows rather than in columns

diff command

A Linux command that compares the contents of text files to identify any differences.

tac command

A Linux command that displays a file on the screen, beginning with the last line of the file and ending with the first line of the file.

file command

A Linux command that displays the file type of a specified filename.

head command

A Linux command that displays the first set of lines of a text file; by default, the ________ command displays the first 10 lines.

grep command

A Linux command that searches files for patterns of characters using regular expression metacharacters. The command name is short for "global regular expression print."

cd (change directory) command

A Linux command used to change the current directory in the directory tree.

cat command

A Linux command used to display (or concatenate) the entire contents of a text file to the screen.

more command

A Linux command used to display a text file page-by-page and line-by-line on the terminal screen.

less command

A Linux command used to display a text file page-by-page on the terminal screen; users can then use the cursor keys to navigate the file.

tail command

A Linux command used to display lines of text at the end of a file; by default, the ________ command displays the last 10 lines of the file.

od command

A Linux command used to display the contents of a file in octal format.

pwd (print working directory) command

A Linux command used to display the current directory in the directory tree.

ls command

A Linux command used to list the files in a given directory.

strings command

A Linux command used to search for and display text characters in a binary file.

Special device files

A ________ used to identify hardware devices such as hard disks and serial ports.

Tab-completion feature

A ______________ of the BASH shell that fills in the remaining characters of a unique filename or directory name when the user presses the Tab key.

subdirectory

A __________________ that resides within another directory in the __________________ tree.

gedit editor

A common text editor used within GUI environments.

home directory

A directory on the filesystem set aside for users to store personal files and information.

executable program

A file that can be executed by the Linux operating system to run in memory as a process and perform a useful function.

binary data files

A file that contains machine language (binary 1s and 0s) and stores information (such as common functions and graphics) used by binary compiled programs.

log files

A file that contains past system events.

text files

A file that stores information in a readable text format.

~

A metacharacter used to represent a user's home directory. (You can also use the metacharacter to refer to another user's home directory by appending a user name at the end)

socket file

A named pipe connecting processes on two different computers; it can also be represented by a file on the filesystem.

Emacs (Editor MACroS) editor

A popular and widespread text editor more conducive to word processing than vi. It was originally developed by Richard Stallman.

vi editor

A powerful command-line text editor available on most UNIX and Linux systems.

filename extensions

A series of identifiers following a dot ( . ) at the end of a ________________, used to denote the type of the file; the ________________ __________________.txt denotes a text file.

directory

A special file on the filesystem used to organize other files into a logical tree structure.

named pipe files

A temporary connection that sends information from one command or process in memory to another; it can also be represented by a file on the filesystem.

shell script

A text file that contains a list of commands or constructs for the shell to execute in order.

fgrep command

A variant of the grep command that does not allow the use of regular expressions.

egrep command

A variant of the grep command used to search files for patterns, using extended regular expressions.

ll command

An alias for the ls -l command; it gives a long file listing.

.bin

Binary executable program files (similar to .exe files within Windows)

(.jpg, .jpeg, .png, .tiff, .xpm, .gif) are all examples of:

Binary files that contain graphical images

.c

C programming language source code files

.cc, .cpp

C++ programming language source code files

.o, .ko

Compiled object files

(.tar.gz, .tgz, .tar.bz2, .tar.xz, .tar.Z) are all examples of:

Compressed archived files

(.gz, .bz2, .xz, .Z ) are all examples of:

Compressed files

.conf, .cfg

Configuration files (contain text)

.ps

Files formatted for printing with postscript

.html, .htm

HTML (Hypertext Markup Language) files

? Regular expression

Matches 0 or 1 occurrences of the previous character (extended)

*

Matches 0 or more characters in a filename

* Regular expression

Matches 0 or more occurrences of the previous character

?

Matches 1 character in a filename

[!a-e]

Matches 1 character in a filename—provided this character is NOT an a, b, c, d, or e

[a-e]

Matches 1 character in a filename—provided this character is either an a, b, c, d, or e

[aegh]

Matches 1 character in a filename—provided this character is either an a, e, g, or h

( . ) Regular expression

Matches 1 character of any type

+ Regular expression

Matches 1 or more occurrences of the previous character

{ } Regular expression

Matches a specific number or range of the previous character

(... | ...) Regular expression

Matches either of two sets of characters

[^...] Regular expression

Matches one character NOT from the range specified within the braces

[...] Regular expression

Matches one character from the range specified within the braces

^ Regular expression

Matches the following characters if they are the first characters on the line

$ Regular expression

Matches the previous characters if they are the last characters on the line

command mode

One of the two modes in vi; it allows a user to perform any available text-editing task that is not related to inserting text into the document.

insert mode

One of the two modes in vi; it allows the user to insert text into the document but does not allow any other functionality.

.pl

PERL (Practical Extraction and Report Language) programs

.so

Shared object (programming library) files

.txt

Text files

wildcard metacharacter

The __________________________ used to match certain characters in a file or directory name; they are often used to specify multiple files.

parent directory

The directory that is one level closer to the root directory in the directory tree relative to your current directory.

Linked files

The files that represent the same data as other files.

absolute pathname

The full pathname to a certain file or directory starting from the root directory.

concatenation

The joining of text together to make one larger whole. In Linux, words and strings of text are joined together to form a displayed file.

relative pathname

The pathname of a target directory relative to your current directory in the tree.

file globbing

The process of using wildcard metacharacters within a command to match multiple files or directories.

text tools

The programs that allow for the creation, modification, and searching of ________ files.

regular expressions (regexp)

The special metacharacters used to match patterns of text within text files; they are commonly used by text tool commands, including grep.

filenames

The user-friendly identifier given to a file.

.tcl

______ (Tool Command Language) programs

The @ symbol indicates:

a linked file

the = character indicates:

a socket

the / indicates:

a subdirectory

cd /var/cache or cd /etc are examples of an

absolute path

Filenames are typically composed of:

alphanumeric characters, the underscore ( _ ) character, the dash ( - ) character, and the period ( . ) character.

the * symbol indicates:

an executable file

If you need to visit the Documents directory in the home directory of the user Administrator, what would be the correct command?

cd /home/administrator/Documents

What is the relative path to get into the Documents directory?

cd Documents/

Which command will take you back to the home directory?

cd ~

Filenames that start with a period ( . ) are referred to as:

hidden files. You need to use a special command to display them in a file list.

the | file type character:

indicates a named pipe.

Text editors come in two varieties:

ones that can be used on the command line (such as vi (vim), nano, and Emacs) and ones that can be used in a GUI environment (such as Emacs (graphical version) and gedit.)

cd .. , cd ../backups , and cd Documents/ are examples of

relative path

The b or c file type characters:

represent special device files

The d character:

represents a directory.

The n file type character:

represents a named pipe.

The s file type character:

represents a socket.

The l file type character:

represents a symbolically linked file

.shShell

scripts (contain text that is executed by the shell)

directories themselves are actually files. What do they do exactly?

they are special files that serve as placeholders to organize other files.

To refer to a directory one step closer to the root of the tree (also known as a parent directory):

use two dots (..)


Conjuntos de estudio relacionados

Systems Design, Implementation, and Operation

View Set

Ancient Greece Section 1,2,3 Study Guide

View Set

Development of School-age child and safety

View Set

Chapter 21: Ethnicity and Cultural Assessment Questions

View Set

Boise State Bio 100 Exam 2 (Ch. 5, 6, 7, M2, 8)

View Set