Linux Environment Variables and Shell Scripting Flashcards
how to display a list of all the env variables
printenv or env
what does echo $HOME do
The absolute path of the home directory
what does echo $PATH
The value of the command search path.
what does echo $PS1 RETURN
The value of the primary prompt.
what does echo $PS2 RETURN
The value of the secondary prompt
what does echo $PWD RETURN
The absolute path of the current work directory.
WHAT DOES echo $SHELL RETURN
The absolute path of the login shell.
WHAT DOES echo $USER RETURN
name of current user logged in
Two processes connected by a pipe run in ________
parallel
what does ls | wc mean
ls is the producer
wc is the consumer of this output
how to look for all txt files
ls | grep txt
how to count number of lines in linux
wc -l
how to count number of characters in linux
wc -m
how to count number of bytes in linux
wc -c
how to view contents of a file
cat filename