command-line-basics Flashcards
What is a CLI?
command-line interface
What is a GUI?
graphic user interface
Give at least one use case for each of the commands listed in this exercise.
man
cat
ls
pwd
echo
touch
mkdir
mv
rm
cp
man - To view the manual page for a command, for example “man ls” to view the manual page for the “ls” command.
cat - To concatenate and display the contents of one or more files, for example “cat file1.txt” to display the contents of “file1.txt” in the terminal.
ls - To list the files and directories in a directory, for example “ls /home” to list the files and directories in the “/home” directory.
pwd - To display the current working directory, for example “pwd” to display the full path of the current directory.
echo - To display a message or the contents of a variable, for example “echo Hello World” to display the message “Hello World” in the terminal.
touch - To create an empty file, for example “touch newfile.txt” to create an empty file named “newfile.txt” in the current directory.
mkdir - To create a new directory, for example “mkdir newfolder” to create a new directory named “newfolder” in the current directory.
mv - To move or rename a file or directory, for example “mv oldfile.txt newfile.txt” to rename “oldfile.txt” to “newfile.txt” or “mv file.txt /home/folder” to move “file.txt” to the directory “/home/folder”.
rm - To remove a file or directory, for example “rm file.txt” to remove the file “file.txt” or “rm -r folder” to remove the directory “folder” and its contents.
cp - To copy a file or directory, for example “cp file.txt /home/folder” to copy “file.txt” to the directory “/home/folder” or “cp -r folder1 folder2” to copy the contents of “folder1” to “folder2”.
What are the three virtues of a great programmer?
Attention to detail: A great programmer pays close attention to every detail of their code and is diligent in finding and fixing bugs.
Problem-solving ability: A great programmer is able to break down complex problems into smaller, manageable parts and develop solutions that are efficient and effective.
Adaptability: A great programmer is able to adapt to new technologies, programming languages, and development methodologies as the field evolves over time.