Shared Flashcard Set

Details

Linux Command Line
Flashcards for Linux Command Line book
190
Computer Science
Graduate
05/25/2015

Additional Computer Science Flashcards

 


 

Cards

Term
shell
Definition
program that takes keyboard commands and passes to OS to carry out
Term
bash
Definition
Bourne Again SHell
Term
terminal emulator
Definition
used to interact with shell in graphical environment

KDE - konsole
GNOME - gnome-terminal
Term
date
Definition
displays current time and date
Term
cal
Definition
displays calendar of current month
Term
df
Definition
free space on disk drives
Term
virtual terminals
Definition
terminal sessions running behind graphical desktop, access by pressing CTRL-ALT-F1 through F6
Term
pwd
Definition
print name of current working directory
Term
cd
Definition
change directory
Term
ls
Definition
list directory contents
Term
absolute pathname
Definition
pathname that begins with root directory and follows filesystem tree to desired directory/file
Term
relative pathname
Definition
pathname that begins in working directory and uses . (working dir) and .. (working dir's parent directory) to specify location of destination
Term
free
Definition
shows statistics on system memory
Term
file
Definition
determine file type
Term
less
Definition
view file contents
Term
"ls -a" or "ls --all"
Definition
list all files including hidden (beginning with period)
Term
"ls -A" or "ls --almost-all"
Definition
list all files except .. (parent dir) and . (working dir)
Term
"ls -d" or "ls --directory"
Definition
list directories\show directory details with -l
Term
"ls -F" or "ls --classify"
Definition
appends indicator characters
Term
"ls -h" or "ls --human-readable"
Definition
file size in human readable format
Term
"ls -l"
Definition
results in long format
Term
"ls -r" or "ls --reverse"
Definition
results in reverse order
Term
"ls -S"
Definition
results sorted by size
Term
"ls -t"
Definition
results sorted by modification time
Term
page up or b (less)
Definition
(less) scroll back one page
Term
page down or space (less)
Definition
(less) scroll forward one page
Term
up arrow (less)
Definition
(less) scroll up one line
Term
down arrow (less)
Definition
(less) scroll down one line
Term
G (less)
Definition
(less) Move to the end of the text file
Term
1G or g (less)
Definition
(less) move to the beginning of the text file
Term
/ (less)
Definition
(less) Search forward to next occurence of
Term
n (less)
Definition
(less) Next occurence of previous search
Term
h (less)
Definition
(less) display help screen
Term
q (less)
Definition
(less) quit less
Term
/
Definition
root directory
Term
/bin
Definition
contains binaries that are needed for system to boot/run
Term
/boot
Definition
contains kernel, RAM disk image, and boot loader
Term
/dev
Definition
device nodes; list of all devices kernel understands on system
Term
/etc
Definition
system wide config files and shell scripts which start system services at boot
Term
/home
Definition
contains user directories; only place regular users can write files
Term
/lib
Definition
shared library files
Term
/lost+found
Definition
used in case of partial recovery from file system corruption
Term
/media
Definition
mount points for removable media
Term
/mnt
Definition
mount points for removable devices mounted manually
Term
/opt
Definition
optional software/commercial software installed here
Term
/proc
Definition
contains files with information on system hardware/how kernel views system
Term
/root
Definition
home dir for root account
Term
/sbin
Definition
system binaries
Term
/tmp
Definition
temporary files created by programs; some configs empty after reboot
Term
/usr
Definition
programs/support files used by regular users
Term
/usr/bin
Definition
executable programs installed by linux distro (Ch. 3)
Term
/usr/lib
Definition
shared libraries for progs in /usr/bin (Ch. 3)
Term
/usr/local
Definition
programs not included with distro but intended for systemwide use (Ch. 3)
Term
/usr/sbin
Definition
more system administration progs (Ch. 3)
Term
/usr/share
Definition
shared data used by programs in /usr/bin (Ch. 3)
Term
/usr/share/doc
Definition
documentation for packages (Ch. 3)
Term
/var
Definition
databases, spool files, mail, logs; any files that change regularly (Ch. 3)
Term
/var/log
Definition
log files (i.e. messages) (Ch. 3)
Term
cp
Definition
copy files/directories (Ch. 4)
Term
mv
Definition
move/rename files/directories (Ch. 4)
Term
mkdir
Definition
create directories (Ch. 4)
Term
rm
Definition
remove files/directories (Ch. 4)
Term
ln
Definition
create hard/symbolic links (Ch. 4)
Term
*
Definition
wildcard; matches any characters (Ch. 4)
Term
?
Definition
wildcard; matches single character (Ch. 4)
Term
[characters]
Definition
matches any character that is member of set "characters" (Ch. 4)
Term
[!characters]
Definition
matches any character not member of set "characters" (Ch. 4)
Term
[:alnum:]
Definition
matches any alphanumeric character (Ch. 4)
Term
[:alpha:]
Definition
matches any alphabetic character (Ch. 4)
Term
[:digit:]
Definition
matches any numeral (Ch. 4)
Term
[:lower:]
Definition
matches any lowercase letter (Ch. 4)
Term
[:upper:]
Definition
matches any uppercase letter (Ch. 4)
Term
-a, --archive (cp)
Definition
(cp) copies files/directories and all attributes including ownership/permissions (Ch. 4)
Term
-i, --interactive (cp, mv, rm)
Definition
(cp, mv, rm) before overwriting or deleting existing file will prompt for confirmation (Ch. 4)
Term
-r, --recursive (cp, rm)
Definition
(cp, rm) recursively copy/delete directories and contents; when copying/deleting directory it (or -a for cp) is required (Ch. 4)
Term
-u, --update (cp, mv)
Definition
(cp, mv) only copy/move files that don't exist or are newer than destination (Ch. 4)
Term
-v, --verbose (cp, mv, rm)
Definition
(cp, mv, rm) display informative messages while processing (Ch. 4)
Term
-f, --force (rm)
Definition
(rm) ignore nonexistent files and do not prompt when deleting; overrides -i (Ch. 4)
Term
symbolic link (ln -s link_file target_file)
Definition
file that points to target file or directory; can point to files on different filesystems or to directories (Ch. 4)
Term
hard link (ln link_file target_file)
Definition
old link method. additional directory entry that references an original file (same exact blocks of data); cannot reference anything outside its file system or reference a directory (Ch. 4)
Term
inode
Definition
number referencing chain of disk blocks that is associated with hard links, invoked with ls -i (Ch. 4)
Term
type
Definition
indicate how a command name is interpreted (Ch. 5)
Term
which
Definition
display whyich executable program will be executed (Ch. 5)
Term
help
Definition
get help for shell builtins (Ch. 5)
Term
man
Definition
display a command's manual page (Ch. 5)
Term
apropos
Definition
display a list of approrpiate commands (Ch. 5)
Term
info
Definition
display a command's info entry (Ch. 5)
Term
whatis
Definition
display very brief description of a command (Ch. 5)
Term
alias
Definition
create an alias for a command (Ch. 5)
Term
excecutable program
Definition
like files in /usr/bin. within this categorty programs can b ecompiled binaries, or programs written in scripting languages. (Ch. 5)
Term
command built into shell
Definition
bash supports a number of commands internally called shell builtins; i.e. cd command. (Ch. 5)
Term
shell function
Definition
miniature shell scripts incorporated into environment. (Ch. 5)
Term
alias
Definition
commands we can define, built from other commands.
syntax: alias name='string' (Ch. 5)
Term
? (info)
Definition
(info) Display command help (Ch. 5)
Term
PgUp or Backspace (info)
Definition
(info) display previous page (Ch. 5)
Term
PgDn or Spacce (info)
Definition
(info) Display next page (Ch. 5)
Term
n (info)
Definition
(info) Next- display the next node (Ch. 5)
Term
p (info)
Definition
(info) Previous - display the previous node (Ch. 5)
Term
u (info)
Definition
(info) up- display the parent node of the currently display ed node, usually a menu (Ch. 5)
Term
Enter (info)
Definition
(info) Follow the hyperlink at the cursor location (Ch. 5)
Term
q (info)
Definition
(info) quit (Ch. 5)
Term
unalias
Definition
remove an alias (Ch. 5)
Term
cat
Definition
concatenate files (Ch. 6)
Term
sort
Definition
sort lines of text (Ch. 6)
Term
uniq
Definition
report or omit repeated lines
uniq -d (shows duplicates)(Ch. 6)
Term
grep
Definition
print lines matching pattern (Ch. 6)
Term
wc
Definition
print newline, word, and byte counts for each file.
wc -l (# of lines)(Ch. 6)
Term
head
Definition
outpot the first part of a file
head -n N (output N lines)(Ch. 6)
Term
tail
Definition
output the last part of a file
tail -n N (output N lines)
tail -f (show last lines as updated)(Ch. 6)
Term
tee
Definition
read from standard input and write to standard output and files | tee | grep (Ch. 6)
Term
>
Definition
redirect standard output (overwrites) (Ch. 6)
Term
>>
Definition
redirect standard output (append) (Ch. 6)
Term
2>
Definition
redirect standard error (Ch. 6)
Term
> 2>&1
Definition
redirect standard output and standard error to one file (order is important!) (Ch. 6)
Term
&>
Definition
redirect standard output and standard error to one file streamlined (overwrite) (Ch. 6)
Term
&>>
Definition
redirect standard output and error to one file (append) (Ch. 6)
Term
> /dev/null
Definition
dispose of unwanted output (change redirect as needed) (Ch. 6)
Term
|
Definition
pipeline operator; standard output of one command goes into standard input of another. command1 | command2 (Ch. 6)
Term
echo
Definition
display a line of text (Ch. 7)
Term
echo *
Definition
expands * into list of files/directories in current working dir (Ch. 7)
Term
echo ~ or echo ~
Definition
expands into home directory of current or specified user (Ch. 7)
Term
echo $((expression))
Definition
performs arithmetic expression and gives output (Ch. 7)
Term
+ (arithmetic)
Definition
(arithmetic) addition (Ch. 7)
Term
- (arithmetic)
Definition
(arithmetic) subtraction (Ch. 7)
Term
* (arithmetic)
Definition
(arithmetic) multiplication (Ch. 7)
Term
/ (arithmetic)
Definition
(arithmetic) division (Ch. 7)
Term
% (arithmetic)
Definition
(arithmetic) Modulo/"remainder" (Ch. 7)
Term
** (arithmetic)
Definition
(arithmetic) exponentiation (Ch. 7)
Term
brace expression
Definition
echo {list of letters/integers}
echo {A,B,C}
echo {1..5}
echo {Z..A} (Ch. 7)
Term
parameter expansion
Definition
echo $VARIABLE; expands variable (Ch. 7)
Term
list of available variables
Definition
printenv | less (Ch. 7)
Term
command substituation
Definition
$(); can use pipelines
i.e. echo $(ls)
file $(ls -d /usr/bin/* | grep zip)(Ch. 7)
Term
" " (double quotes)
Definition
word-splitting, pathname expansion, tilde expansion, brace expansion suppressed within quotes except for "$", "\", "`" (Ch. 7)
Term
' ' (single quotes)
Definition
suppress all expansions (Ch. 7)
Term
\a (escape sequence)
Definition
causes computer to beep (Ch. 7)
Term
\b (escape sequence)
Definition
backspace (Ch. 7)
Term
\n (escape sequence)
Definition
new line (Ch. 7)
Term
\r (escape sequence)
Definition
carriage return (Ch. 7)
Term
\t (escape sequence)
Definition
tab (Ch. 7)
Term
clear
Definition
clear the screen (Ch. 8)
Term
history
Definition
display contents of history list (Ch. 8)
Term
ctrl-a
Definition
move cursor to beginning of line (Ch. 8)
Term
ctrl-e
Definition
move cursor to end of line (Ch. 8)
Term
ctrl-f
Definition
move cursor forward one character (Ch. 8)
Term
ctrl-b
Definition
move cursor backward one character (Ch. 8)
Term
alt-f
Definition
move cursxor forward one word (Ch. 8)
Term
alt-b
Definition
move cursor backward one word (Ch. 8)
Term
ctrl-l
Definition
clear screen and move cursor to top left corner (Ch. 8)
Term
ctrl-d
Definition
delete character at cursor location (Ch. 8)
Term
ctrl-t
Definition
transpse character at cursor location with one preceding it (Ch. 8)
Term
alt-t
Definition
transpose word at cursor location with one preceding it (Ch. 8)
Term
alt-l
Definition
convert characters from cursor location to end of word to lowercase (Ch. 8)
Term
alt-u
Definition
convert characters from cursor location to end of word to uppercase (Ch. 8)
Term
ctrl-k
Definition
kill text from cursor to end of line (Ch. 8)
Term
ctrl-u
Definition
kill text from cursor to beginning of line (Ch. 8)
Term
alt-d
Definition
kill text from cursor to end of current word (Ch. 8)
Term
alt-backspace
Definition
kill text from cursor to beginning of current word. If cursor is at beginning of word, kill previous word. (Ch. 8)
Term
ctrl-y
Definition
yank text from kill-ring and inset at cursor location (Ch. 8)
Term
tab completion
Definition
press tab when typing a command (Ch. 8)
Term
alt-?
Definition
display list of possible completions (or press tab 2nd time) (Ch. 8)
Term
alt-*
Definition
insert all possible completions (Ch. 8)
Term
!
Definition
history expansion; will expand ! into contents of line in history list. (Ch. 8)
Term
ctrl-p (history)
Definition
(history) move to previous history entry (Ch. 8)
Term
ctrl-n (history)
Definition
(history) move to next history entry (Ch. 8)
Term
alt-< (history)
Definition
(history) move to beginning of history list (Ch. 8)
Term
alt-> (history)
Definition
(history) move to end of history list (Ch. 8)
Term
ctrl-r (history)
Definition
(history) reverse incremental search (Ch. 8)
Term
alt-p (history)
Definition
(history) reverse search, non-incremental. Type in search string and press enter before search is performed. (Ch. 8)
Term
alt-n (history)
Definition
(history) forward search, non-incremental. (Ch. 8)
Term
ctrl-o (history)
Definition
(history) execute current item in history list and advance to next one (Ch. 8)
Term
!! (history)
Definition
(history) repeat last command (Ch. 8)
Term
!string (history)
Definition
(history) repeat last history list item starting with string (Ch. 8)
Term
!?string (history)
Definition
(history) repeat last history list item containing string (Ch. 8)
Term
script
Definition
records an entire shell session and stroes it in a file
script [file] (Ch. 8)
Term
id
Definition
display user identity (Ch. 9)
Term
chmod
Definition
change a file's mode/permissions (Ch. 9)
Term
umask
Definition
set default file permissions (Ch. 9)
Term
su
Definition
run a shell as another user (Ch. 9)
Term
sudo
Definition
execute a command as another user (Ch. 9)
Term
chown
Definition
Change a file's owner (Ch. 9)
Term
chgrp
Definition
change file's group ownership (Ch. 9)
Term
passwd
Definition
change user's password (Ch. 9)
Term
- (attribute)
Definition
(attribute) a regular file (Ch. 9)
Term
d (attribute)
Definition
(attribute) directory (Ch. 9)
Term
l (attribute)
Definition
(attribute) a symbolic link; remaining attributes are always rwxrwxrwx (Ch. 9)
Term
c (attribute)
Definition
(attribute) character special file, refers to device that handles data as a stream of bytes (Ch. 9)
Term
b (attribute)
Definition
(attribute) block special file, refers to device that handles data in blocks (Ch. 9)
Term
r (permission attribute)
Definition
(permission attribute) files: allows file to be opened/read
directories: allows directory contents to be listed if execute attribute is also set (Ch. 9)
Term
w (permission attribute)
Definition
(permission attribute) files: can be written/truncated but not renamed/deleted.
directory: files can be created/deleted/renamed if exec attrib is set (Ch. 9)
Term
x (permission attribute)
Definition
(permission attribute) file: can be executed
directory: can be entered (cd directory) (Ch. 9)
Supporting users have an ad free experience!