This command outputs the name of the current working directory
pwd
The are used to modify the behavior of commands.
options
This command outputs the contents of a specified file
cat
This command takes the standard output of the command on the left and appends (adds) it to the file on the right.
>>
Ex. $ cat deserts.txt >> forests.txt
This is a command line text editor.
nano
Fill in the blank. The _____ command allows you to create keyboard shortcuts, or aliases, for commonly used commands.
alias
This command lists all files and directories in the working directory
ls
This command lists all contents of a directory, including hidden files and directories
ls -a
This command copies files or directories. Below, we copy the contents of a source file into a destination file
The _______ command redirects the standard output to a file
Fill in the blanks. A _____ ________ is a file used to store environment settings for your terminal,
A bash profile is a file used to store environment settings for your terminal, and it’s accessible by the name ~/.bash_profile.
This is where you would save your alias commands.
Bash profile
This command switches you into the directory you specify
cd
This statement lists files and directories in order by the time they were last modified
ls -t
Special characters like * (which is used to select groups of files), are called____.
Wildcards
True or False. The statement "cat deserts.txt > forests.txt" would overwrite the contents of forests.txt with the content of deserts.txt.
True
What intent of storing the command export PS1=">> " is stored in the ~/.bash_profile?
Changing the default command prompt from $ to >>.
True or False. We can add as many aliases as we want in a bash profile.
True.
This command creates a new directory in the working directory
mkdir
Files starting with this character are normally hidden, and don't appear when using ls alone
dot " . "
This command is used to remove directories
True or False. The "uniq" command filters out all duplicate lines in a file.
False, "uniq" filters out ADJACENT duplicate lines in a file.
This command returns a list of the environment variables for the current user.
env
Environment variables are variables that can be used across commands and programs and hold information about the environment.
What command would run using "hy" assuming the alias hy="history" has been set up propery and the source /.bash_profile command has been executed.
history
This command creates a new file inside the working directory
touch
This command lists all contents, including hidden files and directories, in long format, ordered by the date and time they were last modified.
ls -alt
To rename a file, use the ______ command, with the ________ as the first argument and the _______ as the second argument.
mv, old file, new file
To rename a file, use mv command with the old file as the first argument and the new file as the second argument.
What is happening in this command?
cat volcanoes.txt | wc | cat > islands.txt
Here the standard output of cat volcanoes.txt is “piped” to the wc command. The standard output of wc is then “piped” to cat. Finally, the standard output of cat is redirected to islands.txt.
What command should we use to activate the changes made in ~/.bash_profile for the current session?
source ~/.bash_profile
To make it so when you type la, the ls -a command will run you must ________ .
Enter alias la="ls -a" in your bash profile