CLI THE INTIAL STEP OF PROGRAMING
INTERACTION WITH COMMAND LINE INTERFACE
In general days we interact with Computers i.e (working with Microsoft office,opening of directories,copying files, searching etc.) with the help of mouse pointer on the operating system Windows /Mac OS, this type interaction with computer is know as Graphical user Interface "user friendly".
COMMAND LINE INTERFACE(TEXT BASED USER INTERFACE)
Interaction with the computers using commands(mixture of characters and special characters) is what is know as CLI(command line interface).
The program which handle the interface is called a command line interpreter or command line processor.
x
As you can see string of characters "C:\Users> " is called the prompt. commands are typed after the prompt and executed to perform task.
The white rectangular block after the prompt is the cursor that allows you to edit commands on your CLI, you can also move the cursor back and forth using your arrow keys, just like when you use it to play video games.
And so, we can get a idea what is the difference between these two interface (GUI and CLI).
WHY A PROGRAMMER NEEDS TO KNOW CLI ?
While you are thinking of programming you should start with CLI, CLI is one of the fundamental idea of programming, Learning programming with the interaction with CLI makes learning more curious and learning programming becomes easy by usage of commands.
Installation and configuration of programs is quite ease on using CLI, so more time can be spent on building logic of the code.
In DEEP, CLI allows you to do manipulation with your system internals and with code in a much more fine-tuned way.
COMMANDS FOR THE COMMAND LINE INTERFACE
Every command line command is actually a little computer program, the basic structure of the command line interface is [command] [options] [arguments], not every commands require these three structures.
Two basic commands of the command line interface such as 'clear' and 'echo'.
Clear[command] - which requires none of the two structure [options] [arguments], the commands cleans up the terminal.
echo[command] - which requires the structure [arguments] like echo 'hello world !' when typed(without braces) and ran on the CLI it outputs #hello world!
NAVIGATION OF FILES AND FOLDERS USING CLI
When using the command line interface, we list folders, files in the current directory we use the command dir.
When we want enter into a directory we use the command 'cd' [arguments] as name of the directory.
When we want to exit from the current directory and get back to the previous directory we using the command 'cd ..'
When we want to know the location where we are at i.e(in which directory) we use the command 'path'(print working directory).
CREATION OF FOLDERS, FILES
We know how to navigate through through files, folders using CLI, and now we will know how to create and edit them using CLI.
When we want to create a folder(i.e directory) we use the command 'mkdir' [arguments] as name of the directory. mkdir(make directory)
When we want to create a file using CLI we use the command 'Notepad' [arguments] as name of the file.
Comments
Post a Comment