Linux 103 - Chapter 1 Flashcards
In Bash, inserting 1>&2 after a command redirects
Standard output to standard error
What characters can be combined with a separator string in order to read from the current input source until the separator string, which is on a separate line and without any trailing spaces, is reached?
<
What command will print to standard out only the lines that do not begin with # in the file foobar?
/bin/grep -v ^# foobar
Which command sets the Bash variable named TEST with the content FOO?
TEST=”FOO”
When given the following command line.
echo “foo bar” | tee bar | cat
What output is created?
foo bar
Give two examples of valid stream redirection operators within Bash? (Two answers)
< ;»_space;
Which command shows the definition of a given shell command?
type
Which shell built-in command can be used to create a shortcut or pseudonym for a longer command in a shell such as Bash?
alias
Which command line redirection character instructs the shell to read from the current input source until a specific word, on a separate line and without and trailing spaces, is reached?
<
Which file, located in the user home directory, is used to store the Bash history?
.bash_history
Which shell redirection will write standard output and standard error output to a file named filename?
> filename 2>&1
Which Bash environment variable defines in which file the user history is stored when exiting a Bash process? (Specify ONLY the variable name.)
HISTFILE