1/50
Looks like no tags are added yet.
Name | Mastery | Learn | Test | Matching | Spaced |
---|
No study sessions yet.
What are options used for?
used to modify the core behavior of a command
What are arguments used for?
used to provide additional information (such as a filename or a username)
What does the -l option of the ls command do?
results in a long listing, providing additional info about files that are listed
What does -r do?
prints results in reverse aphabetical order
what does -h do
puts file sizes into human-readable format. This option must be used with the -l
option.
in context of the history command, what does the ! character do?
executes the number of the command to execute it. for instance, if the third command listed by the history command was the date command, !3 would execute the date command again
what does the !-n command do?
executes the nth command from the bottom of the history list
what does !! do?
executes the most recent command
what executes the most recent iteration of a specific command?
! plus the name of the command
What does the export command do?
turns a local variable into an environment variable, and can also be used to make a variable an environment variable upon its creation by using the assignment expression as the argument
what do you use to change the value of an environment variable
use the assignment expression
what does the unset command do?
removes exported variables
What does the type command do?
determines info about the command type of the command that is attached to it in the command
what does the which command do?
displays the full path to the command in question by searching the path variable
what does the -a option of the type command do?
displays all locations that contain the command named
what do double quotes still allow for?
command substitution, variable substitution, and other metacharacters
what are backquotes used for?
used to specify a command within a command
what does the -f option of the man page command do?
searches for man pages by name
On most Linux distributions, the whatis
command does the same thing as man -f
. On those distributions, both will produce the same output.
what does the -k option of the man page command do?
searches both names and descriptions of the man pages for a keyword
On most Linux distributions, the apropos
command does the same thing as man -k
. On those distributions, both produce the same output.
why are man pages easily distinguished from commands?
they are typically compressed with a gzip, therefore they end in .gz
What does the locate command do?
searches a database of all files and directories that were on the system when the database was created, Any files created today will not be searchable with this command
what does updatebd do?
updates the locate database manually, if root is available
what does the -c option of the locate command do?
what does the -b option do?
finds out how many files match
this option only includes listings that have the search item in the basename of the filename
while in man pages and info documents, what does Shift+H, L, and Q do?
lists movement commands,
closes the help screen
quits the info or man page
what does the pwd command do?
prints the working directory
what does .. always represent?
represents one directory higher than the current directory/the parent directory
what does . always represent
always represents the current directory
what does the -a option to the ls command do?
lists hidden files
What are the 7 different file types?
| directory | A file used to store other files. |
| regular file | Includes readable files, images files, binary files, and compressed files. |
| symbolic link | Points to another file. |
| socket | Allows for communication between processes. |
| pipe | Allows for communication between processes. |
| block file | Used to communicate with hardware. |
| character file |
what does the -d option of the ls command do?
refers to the current directory, and not the contents within it. To use this option in a meaningful way requires the addition of the -l
option
What does the -R option of the ls command do?
performs a recursive listing
What does the -s option of the ls command do?
sorts files by size. it is most useful when used with -l option so the file sizes are visible
For more detailed modification time information you can use the --full-time
option to display the complete timestamp (including hours, minutes, seconds). It will assume the -l
option automatically:
What does the -t option of the ls command do?
sorts files based on the time they were modified
what does these commands do:
/etc/[gu]*
/etc/[a-d]*
/etc/*[0-9]*
matches any file that begins with either a g
or u
character and contains zero or more additional characters
matches all files that begin with any letter between and including a and d:
displays any file that contains at least one number:
The exclamation point !
character used in conjunction with the square brackets is used to do what?
negate a range
When listing with globs, what does the -d option of the ls command do?
tells the ls command to display the name of directories, instead of contents
what are the different options for the cp command and what do they do?
cat - view the contents of the file
-i - makes the command prompt the user before overwriting a file
-n - answers no to each interactive promt automatically. stands for no clobber/no overwrite
what does the -r option of the cp command do?
allows the command to copy both files and directories
why is there no -r option in the mv command?
the command moves directories by default
how can you delete a directory with the rm command?
use either -r or rmdir. rmdir can only be used if the directory’s empty
what gzip commands decompress a file?
gunzip and gzip -d
What does the tar command do?
takes in several files and creates a single output file that can be split up again into the original files on the other end of the transmission.
What does the -c option in the tar command do?
what does this command do: tar -cf alpha_files.tar alpha*
creates an archive
a tar file, also called a tarball, being created from multiple files. The first argument creates an archive called alpha_files.tar
. The wildcard option *
is used to include all files that begin with alpha
in the archive:
what does the -z option of the tar command do?
compresses/decompresses an archive using the gzip command and using .tar.gz
or .tgz
for compressed tarballs.
what does the -j option of the tar command do?
tells tar to use bzip2 compression instead of gzip compression and using .tar.bz2
, .tbz
, or .tbz2
as the file extension.
what does the -t option of the tar command do?
lists files in an archive
what does the -x option of the tar command do?
extracts files from an archive
What does the attribution (BY) condition mean?
All CC licenses require that the creator must be given credit, without implying that the creator endorses the use.
What does the sharealike (SA) condition mean?
This allows others to copy, distribute, perform, and modify the work, provided they do so under the same terms.
What does the non-commercial (NC) condition mean?
This allows others to distribute, display, perform, and modify the work for any purpose other than commercially.
What does the NoDerivatives (ND) condition mean?
This allows others to distribute, display, and perform only original copies of the work. They must obtain the creator’s permission to modify it.