• Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

Card Range To Study

through

image

Play button

image

Play button

image

Progress

1/63

Click to flip

Use LEFT and RIGHT arrow keys to navigate between flashcards;

Use UP and DOWN arrow keys to flip the card;

H to show hint;

A reads text to speech;

63 Cards in this Set

  • Front
  • Back

time {command}

Will tell you how long the system took to execute the {command} command.

pwd

Displays the current working directory.

set

Used to customize the shell options for the Linux shell.

exec {program}

Used to execute a command when you want the command to replace the shell process. When the program terminates if will terminate the shell.

./{program}

Will run a program {program} inside of your current working directory.

Shell Shortcuts: Ctrl+R

Allows you to search the .history file.

Shell Shortcuts: Ctrl+S

Searches forward in the command history.

Shell Shortcuts: Ctrl+G

Terminates the search function (Esc does the same thing).

Shell Shortcuts: Ctrl+P

Does the same thing as the up arrow.

Shell Shortcuts: Ctrl+N

Does the same thing as the down arrow.

Shell Shortcuts: Ctrl+A

Move cursor to start of line.

Shell Shortcuts: Ctrl+E

Move cursor to end of line.

Shell Shortcuts: Ctrl+B

Move backward within a line.

Shell Shortcuts: Ctrl+F

Move forward within a line.

Shell Shortcuts: Ctrl+D

Deletes characters and moves down the line.

Shell Shortcuts: Ctrl+K

Deletes the entire line.

Shell Shortcuts: Ctrl+X+Backspace

Deletes all characters from cursor's current position back.

Shell Shortcuts: Ctrl+T

Transpose text - move characters down the line.

Shell Shortcuts: Esc+c

Converts the letter above the cursor to uppercase.

Shell Shortcuts: Esc+u

Converts the entire word above the cursor to uppercase.

Shell Shortcuts: history -c

Will clear all of your history. Good for trying to hide command line passwords entered.

Shell Customization: User

Each user home directory contains .bashrc and .profile as the main configuration files in bash.

Shell Customization: Global

/etc/profile and /etc/bash.bashrc are the global customizations for all user shells.

export

Used to set environmental variables at the command line (export VARIABLE={whatever})

env

Used to view all environmental variables.

unset

Used to delete an environmental variable (unset {VARIABLE NAME})

Redirection Operators: <>

Specified file will be used for standard input and standard output.

Redirection Operators: <<

Takes text as standard input.

Redirection Operators: &>

Creates a new file (or overwrites existing) for both standard output and standard error.

Redirection Operators: 2>>

Appends standard error to an already existing file. If the file does not exist it is created.

Redirection Operators: 2>

Creates or overwrites a file for standard error.

Redirection Operators: >>

Appends standard output to a file or creates the file if it does not currently exist.

Redirection Operators: >

Creates a new file or overwrites an existing file for standard output.

Data Pipes: I

A pipe will redirect the first program's standard output to the second program's standard input.

tee

Used to read from standard input and write to standard output and files (program | tee file.txt).

xargs

Build and execute command lines from standard input. Example: ls | grep test | xargs rm (will remove all files named test in the folder).

cat

Concatenate (combine) files.

cat -n

Number the lines of a file.

join

Used to join lines of two files on a common field.

join -t {character}

Use {character} as input and output field separator.

join -1 {field}

Join on this field of file 1.

join -2 {field}

Join on this field of file 2.

join -i

Ignore case when using the join command.

paste

Merge lines of files.

expand

Convert tabs to spaces.

od

Dump files in octal and other formats.

sort

Sort lines of text files. By default the sort command uses the first field. You can use -k option, separated by commas to change what field it sorts on.

split

Split a file into pieces. Example: split -l 2 file1.txt name (splits the file.txt file every two lines and places them in files starting with name (namea, nameb, namec) for number of lines by 2.

tr

Translate, squeeze, and/or delete characters from standard input, writing to standard output. Example: tr test blah < file.txt (replaces all the words 'test' to 'blah' in the file, and displays to standard output).

unexpand

Convert spaces to tabs.

uniq

Report or omit repeated lines.

nl

Print number of lines in a file

head

Output the first part of a file; echoes first 10 lines of the file by default.

head -c

Specify the number of bytes to view at the beginning of a file.

head -n

Specify the number of lines to view at the beginning of a file.

tail

Output the last part of a file; echoes the last 10 lines of the file by default.

tail -c

Specify the number of bytes to view at the end of a file.

tail -n

Specify the number of lines to view at the end of a file.

less

Used to page through files.

cut

Print selected parts of lines from each file to standard output.

wc

Word count of a selected file.

sed

A stream editor, used to perform basic text transformations on an input stream (a file or input from a pipeline).




While in some ways similar to an editor which permits scripted edits (such as ed), sed works by making only one pass over the input(s), and is consequently more efficient.

$FCEDIT $EDITOR

Environment variables that define the default text editors.