Exam 2 Flashcards
(99 cards)
Absolute pathname
Absolute pathname: refers to the complete path of a directory or file starting from the root directory (/). It
specifies the exact location of the directory or file in the filesystem hierarchy.
For example, /home/user/documents/file.txt is an absolute pathname. It starts from the root directory
(/) and specifies the complete path to the file file.txt
Relative pathname
specifies the location of a directory or file relative to the current working directory.
. (dot) represents the current directory.
.. (dot-dot) represents the parent directory.
~ (the tilde character) is a shorthand representation of the current user’s home directory.
!
not
$
Following string is a variable (should be all CAPS)
;
chains commands together
&
if one command errors. The next command will not run
`` backquote
substitutes whatever command is on the inside with its output
‘ ’ single quote
protects everything
“ ” double quotes
protects most things except \ = protects everything
*
represents unknown 0-255 char
?
represents only 1 char
[]
represents only 1 char and can contain numbers and a range of numbers and char and a range of char
[! ]
represents only 1 char and searches for anything not including the range/char/number indicated
apropos
search with a keyword
same as man -k command
cal
display current month’s calendar
option for calendar year
-y
cal -3
calendar for 3 months: previous, current, next
cd
change directory with an absolute or relative pathname
clear
clear the screen
date
display/change the system date and time
echo
display or echo output to the terminal screen
echo -e
utilize escape sequence
echo -n
newline
file
determine file type and display the detail information