Learn the Command Line
The command line- a Text interface for your computer.
- Navigate through files and folders on your computer
- the command line is fully text-based.
- run programs
- Write scripts to automate common tasks
- Use terminal
- Combine simple commands to handle difficult tasks – making it an important programming tool.
What I did today...
$---shell prompt---appears when the terminal is ready to accept a commandls
, the command line looks at the folder you are in, and then "lists" the files and folders inside it. It also gives the range of years and the type of files in the next line.pwd
stands for "print working directory"
>>outputs the name of the directory you are currently in, called the working directory.
cd
stands for "change directory"---switches you into the directory you specify. When a file, directory or program is passed into a command, it is called an argument.
EXAMPLE:
Here the 2015 directory is an argument for the
cd
command.cd ..
navigates up from jan/memory/ to jan/.mkdir
command stands for "make directory"---takes in a directory name as an argument, and then creates a new directory in the current working directory.touch
command creates a new file inside the working directory---takes in a filename as an argument, and then creates an empty file in the current working directory.EXAMPLE:
Here we used
touch
to create a new file named keyboard.txt inside the 2014/dec/ directory.- A filesystem organizes a computer's files and directories into a tree structure. It starts with the root directory. Each parent directory can contain more child directories and files.
And it turns into the following in the computer.
What I learned today...
I've learned five commands commonly used to navigate the filesystem from the command line. Which is pwd, ls, cd, mkdir, and touch. With all the commands that I've learned, it allows me tonavigate through files and folders on the computer in different ways.
What I'll be doing tomorrow...
No comments:
Post a Comment