• 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/35

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;

35 Cards in this Set

  • Front
  • Back

who command options

whoami - see which acct you are using


am I - info about your session


H- show column headings


u- show idle time for each user


q- quick list of logged in users


b- verify when the system was last booted

The /bin Directory

-Contains binaries, or executables


-Programs needed to start the system and perform other essential system tasks


-Holds many programs that all users need to work with UNIX/Linux

The /sbin Directory

-Reserved for the system administrator


Stores:


–Programs that start the system


–Programs needed for file system repair


–Essential network programs

The /boot Directory

Normally contains:


–Files needed by the bootstrap loader


•The


bootstrap loader


is the utility that starts the OS

The /dev Directory

Files here reference system devices (i/o, etc)

ls– l

Use ls–l to see the device type

The /etc Directory

Contains configuration files that the system uses


when the computer starts

The /home Directory

Used to offer disk space for users, such as on a


system that has multiple user accounts

The /root Directory

Home directory for the root user (system admin)

The /mnt Directory

mounting info, points

The /media Directory

In newer distributions of UNIX/Linux, mount points for removable storage are in /media

The /tmp Directory

Many programs need a temporary place to store


data during processing cycles - /tmp

mount command

-t - specify a filesystem to mount

pwd

"print working directory"

chmod

changes file permissions

Use > and >> to

redirect output.

Use < and <<

redirect input

Two simple ways to create files:

> accountsfile



touch accountsfile2

touch [ -option] (filename)

options


-a: updates the access time only


-m: updates the last time the file was modified


-c: prevents the touch command from creating a file if it does not already exist

rm

removes a file


-i: displays a warning prompt before file deletion


-r: recursively deletes files and directories (CAREFUL!!)

rmdir

removes an EMPTY directory

cp

-i: provides a warning


-s: creates a symbolic link


-u: prevents cp from copying over a newer existing file

mv

moves a file


-i: prompts before overwriting a file with the same name


-u: overwrites destination file if the source file is newer than the one in the destination

cat

used to combine files

paste

combines the contents of a file to the screen or to a file



-d: enables you to specify a different seperator (other than tab) between columns


-s: causes files to be pasted one after the other instead of in parallel

sort

-k n: sorts on the field specified by n


-t: indicates that a specified character seperates the fields


-m: merges input files that have been previously sorted


-o: redirects output to a specified file


-d: sorts in alphanumeric order


-g: sorts by numeric (general) order


-r: sorts in reverse order

Awk

pattern-scanning and processing language


-F: field seperator is a colon

diff

compares two files and determines which lines differ.



-b: ignores blanks that repeat


-B: does not compare for blank lines


-i: ignores case


-c: shows lines surrounding the line that differs (for context)


-y: displays the differences side-by-side in columns

grep

Selects lines or rows


-i: ignores case


-l: lists only file names


-c: only counts the number of lines matching the pattern instead of showing them


-r: searches through files under all subdirectories


-n: includes the line number for each line found


-v: displays only lines that don't contain the search pattern

pr

formats a specified file


-d: double spaces the output


-h: customizes the header line


-l n: sets the number of lines per page

sed

specifies an editing command or a script file containing sed commands


a\ appends text after a line


p: displays lines


d: deletes specified text


s: substitutes specified text


-e: specifies multiple commands on one line


-n: indicates line numbers on which to work

sh

executes a shell script


tr

translates characters



-d: deletes input characters found in string1 from the output


-s: checks for sequences of string1 repeated consecutive times

uniq

removes duplicate lines to create unique output



-u: outputs only the lines from the source file that are not duplicated


-d: outputs one copy of each line that has a duplicate, and does not show unique lines.


-i: ignores case


-c: starts each line by showing the number of each instance


wc

counts the number of lines, bytes, or words in a file


-c: counts the number of bytes or characters


-l: counts the number of lines


-w: counts the number of words