Linux 1 Command Review Ch. 1 - 14

Ace your homework & exams now with Quizwiz!

/etc/updatedb.conf

A configuration file for the updatedb utility. In some implementations, updatedb.conf is a shell script that allows more flexibility in defining variables

screen

A full-screen software program that can be used to multiplex a physical console between several processes (typically interactive shells). It offers a user to open several separate terminal instances inside a one single terminal window manager. The screen application is very useful, if you are dealing with multiple programs from a command line interface and for separating programs from the terminal shell. It also allows you to share your sessions with others users and detach/attach terminal sessions.

fg

A job control command that resumes execution of a suspended process by bringing it to the foreground.

bg

A job control command that resumes the execution of a suspended process without bringing it to the foreground.

sed

A non-interactive editor that can be used to modify text.

man

An interface to the on-line reference manuals.

Bash

Bourne Again SHell - an sh-compatible command language interpreter that executes commands read from the standard input or from a file.

killall

Command similar to kill, but killall will allow a user to terminate a process by name as opposed to ID.

top

Command similar to ps, however top will display the curent real-time view of all running tasks and processes.

xz

Command that can compress or decompress .zx or .lzma files. xz is a general-purpose data compression tool with command line syntax similar to gzip(1) and bzip2(1). The native file format is the .xz format, but also the legacy .lzma format and raw compressed streams with no container format headers are supported.

mv

Command that can move files from one location to another, as well as renaming files.

gunzip

Command that decompress files created by gzip, zip, compress, compress -H or pack.

type

Command that indicates how a name would be interpreted if used as a command. When using the type utility, the path to the command will be displayed.

chmod

Command that is used to change the mode bits of a FILE. The chmod utility can be used to change the files permissions. For example setting the read, write, and execute bits.

chown

Command that is used to change the ownership of a FILE. The chown utility can also be used to change the primary group of a FILE as well.

chgrp

Command that is used to change the primary group of a file. Essentially it changes what group is the owner of the FILE.

whereis

Command that is used to locate source/binary and manuals sections for specified rules. This will locate binary, source, and manual pages for a command.

rmdir

Command that is used to remove empty directories in the filesystem.

jobs

Command that lists all active jobs in the current terminal or shell.

pgrep

Command that looks through the currently running processes and lists the process IDs that match the selection criteria.

fmt

Command that performs simple text formatting such as setting the line width.

egrep

Command that performs the same function as grep -E. This command has been deprecated, but is around for historical applications.

which

Command that returns the pathnames of the files, or links, which would be executed in the current environment. It does this by searching the PATH for executables matching the names of the arguments.

umask

Command that sets the calling process's file mode creation mask. The umask utility will set the default permissions for FILEs when they are created.

tar

Command that stores and extracts files from tape or disk archive. This is the GNU version of the tar archiving utility.

ls

Command that will list information about files. The current directory is listed by default.

uniq

Command to remove duplicate lines that are currently consecutive.

xargs

Command used to build and execute command lines from standard input.

touch

Command used to change the file timestamps. Touch will allow a user to update the access and modification times of each FILE to the current time.

renice

Command used to change the priority of a process while that process is running. The higher the value the lower the priority.

nice

Command used to change the priority of a process. The higher the nice value the lower the priority of a process. Nice values range from -20 to 20.

join

Command used to combine files together based on a common field between the files.

gzip

Command used to comperess or expand files. Gzip reduces the size of the named files using Lempel-Ziv coding (LZ77). Whenever possible, each file is replaced by one with the extension .gz, while keeping the same ownership modes, access and modification times. (The default extension is -gz for VMS, z for MSDOS, OS/2 FAT, Windows NT FAT and Atari.)

unexpand

Command used to convert spaces in a file into tab characters.

expand

Command used to convert tab characters in a file into spaces.

dd

Command used to copy and covert a file. The dd command is a simple, yet versatile and powerful tool. It can be used to copy from source to destination, block-by-block, regardless of the filesystem types or operating systems. A convenient method is to use dd from a live environment, as in a livecd.

cp

Command used to copy files and directories. cp will copy a SOURCE to a DEST, or multiple SOURCES to a DIRECTORY.

cpio

Command used to copy files into and out of archives. GNU cpio is a tool for creating and extracting archives, or copying files from one place to another. It handles a number of cpio formats as well as reading and writing tar files.

ln

Command used to create a link between two files. The ln utility can be used to create either symbolic links or hard links based on the parameters supplied.

mkdir

Command used to create directories, if they do not already exist.

file

Command used to determine the type of file. file tests each argument in an attempt to classify it. There are three sets of tests, performed in this order: filesystem test, magic tests, and language tests.

sort

Command used to display a file sorted on a specific field of data.

free

Command used to display the amount of free and used memory in the system. This utility will display both the physical and swap memory on the system as well as the buffers used by the kernel.

cut

Command used to extract fields of information from a text file.

grep

Command used to print lines matching a specific pattern. grep searches the named input FILE for lines containing a match to a given PATTERN.

tee

Command used to read from standard input and write to standard output and files.

rm

Command used to remove files or directories. By default the rm command will not remove directories.

ps

Command used to report a snapshot of the current processes. Different options are available with ps to report more specific information.

locate

Command used to search for files by name. Locate reads one or more databases prepared by the updatedb utility and writes file names matching at least one of the PATTERNs to standard output.

find

Command used to search for files in a directory hierarchy. Find searches the directory tree rooted at each given file name by evaluating the given the expression from left to right.

split

Command used to take one file and break it into multiple parts. By default it breaks the file up into 1000 line sections.

kill

Command used to terminate a process. There are specific signals that can terminate a process in different ways. If no signal is provided the TERM signal will be sent to the process.

tr

Command used to translate one set of characters to another.

bzip2

Compresses files using the Burrows-Wheeler block sorting text compression algorithm, and Huffman coding. Compression is generally considerably better than that achieved by more conventional LZ77/LZ78-based compressors, and approaches the performance of the PPM family of statistical compressors.

set

Display all variables (local and environment).

cat

Displays the contents of one or more files (concatenate) to standard output.

echo

Echo the STRING(s) to standard output. Useful with scripts.

.bash_history

File used to store the current history list when the shell is closed.

export

Makes an assigned variable available to sub-processes.

paste

Merge the lines of one or more files, line by line, separating the output by tabs by default.

od

Performs an octal dump of data by default. Often used to display the contents of files with non-printable characters.

pr

Prepares a file for printing breaking the file into pages and printing a header at the top of each page.

nl

Prepend a number to the lines of a file incrementing each line by 1 by default.

History

Print a list of previously executed commands or "re-execute" previously executed commands.

env

Print a list of the current Environment variables or change to an alternate environment.

uname

Print certain system information such as kernel name, network node hostname, kernel release, kernel version, machine hardware name, processor type, hardware platform, and operating system, depending on options provided.

wc

Print newline, word, and byte counts for each FILE, and a total line if more than one FILE is specified.

pwd

Print the name of the current working directory.

head

Prints the first ten lines of a file by default. The number of lines can be set to any desired value.

tail

Prints the last ten lines of a file by default. The number of lines can be set to any desired value.

regex(7)

Regular expression. This is a term used to describe a codified method of searching for text , or other strings in text.

unset

Remove one or more variables.

pkill

Sends a specified signal (SIGTERM by default) to each process instead of listing them on stdout.

uptime

The command that will display how long a system has been running. uptime gives a one line display showing the current time, how long ths system has been running, how many users are logged in, and the system load averages for the pas 1, 5 and 15 minutes.

fileglobbing

The glob() function searches for all the pathnames matching pattern according to the rules used by the shell.

c, d, p, y, dd, yy

These are used to cut, copy, replace and paste text when in command mode. c is used to change a line from the the current cursor location to the end of the line with whatever the user types. d is used to cut one alphabetic word, where as dd is used to cut an entire line of text. y is used to copy one one alphabetic word, where as yy is used to copy and entire line at a time. If a number preceeds either dd or yy, this will copy that number of lines. For example if 3dd is typed this will cut 3 lines at a time.

h, j, k, l

These keys are used for basic cursor movement in vi when in command mode. h moves left one character, j moves down one line, k moves up one line, and l moves right one character.

ZZ, :w!, :q!, :e!

These keys are used to exit the vi editor from command mode. ZZ is used to save and quit the file. It must be done for each file. :e! is used to restore the original file allow the user to start over. :w! will force the writing of the current file. :q! will exit the editor without saving changes to the current file.

/, ?

This is used to search for text while in command mode. the / is used to start searching. Enter a key term and press enter to begin searching the file for the text entered. If the user would like to search backwards in the document, a ? can be used instead of the /.

&

When used with a process will immediately background the process or task in a terminal. This will allow the terminal to be freed up for additional tasks.

fgrep

command that performs the same function grep -F. This command has been deprecated, but is around for historical applications.

nohup

command used to run a command immune to hangups, with output to a non-tty. If standard input is a terminal, it can be redirected from /dev/null. If standard output is the terminal, append the ouptput to nohup.out. This should be located in the user's home directory.

i, o, a

i, o, and a are used to enter insert mode from command mode. i will allow a user to start inserting text at the current location of the cursor. o will allow a user to start inserting text a line below the current location of the cursor, and a will allow a user to insert text one position after the current location of the cursor.

vi

screen-oriented text editor originally created for Unix operating systems. vi is also known as a modal editor in which the user must switch modes to create, edit, and search text in a file.

updated

updatedb creates or updates a database to be used by the locate utility.


Related study sets

Federal Tax Considerations for Life Insurance (Ch.6)

View Set

Health Issues: Chapter 8 - Rejecting Tobacco Use

View Set

The respiratory system test bank

View Set

Trading Markets Orders/Practices

View Set