Command Line Flashcards
What is a CLI?
Command Line Interfaces
What is a GUI?
Graphical User Interface
Give at least one use case for each of the commands listed in this exercise.
-man
man: is an interface to the system reference manuals.
man cat
will show you the name, synopsis and description of that said command.
Give at least one use case for each of the commands listed in this exercise.
-cat
cat: concatenate files and print on the standard output.
man
cat file1.txt file2.txt file3.txt > newfile.txt
newfile.txt will contain all the contents from file1, file2, and file3.
Give at least one use case for each of the commands listed in this exercise.
-ls
ls: list information about the FILEs (the current directory by default). .Sort entries alphabetically if none of
ls -a folder1
will show all the contents (including all files with the ‘.’)
Give at least one use case for each of the commands listed in this exercise.
-pwd
pwd: print the full filename of the current working directory
pwd: will show you how to get to the location that you are currently.
home/dev/repos/c0-solutions/command-line-basics
Give at least one use case for each of the commands listed in this exercise.
-echo
Echo the STRING(s) to standard output
echo will create text within the command line
echo ‘Hello, World!’ > hello.txt
this will save the ‘Hello, World!’ text into a new file called hello.txt
Give at least one use case for each of the commands listed in this exercise.
-touch
Update teh access and modifcation times of each FILE to the current time. A FILE argument that does not exist is created empty, unless -c or -h is supplied.
Give at least one use case for each of the commands listed in this exercise.
-mkdir
Create the DIRECTORY(ies), if they do not already exist.
mkdir parents
will create a new directory called ‘parents’
Give at least one use case for each of the commands listed in this exercise.
-mv
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY
if you want to move certain files to a new directory, if the new directory DOES NOT EXIST, it will rename the selected directory
mv pokiemans pokemon
will rename the pokiemans dir to pokemon
Give at least one use case for each of the commands listed in this exercise.
-mv
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY
if you want to move certain files to a new directory, if the new directory DOES NOT EXIST, it will rename the selected directory
mv pokiemans pokemon
will rename the pokiemans dir to pokemon
Give at least one use case for each of the commands listed in this exercise.
-rm
remove files or directories. (removes cannot be undone WITHOUT Git)
Give at least one use case for each of the commands listed in this exercise.
-cp
copy files and directories
-top
display Linux processes (it acts like a task manager)
top program provides a dynamic real-time view of a running system. It can display system summary informration as well as a list of processes or threads currently being managed by the Linux kernal.