Today, we will first discuss why should we use commands instead of GUI and then we will discuss more about commands.
So, should we use commands?
Well, for that we need to know the difference. First of all, GUI is very easy but with commands, we have to remember many commands and their syntax, uses and many more.
But what if we have to perform it 100 times?!
For example,
What if you want to create a directory. easy! isn't it! But what if I tell you to create 1000 dir at once?
With the help of commands, it can be done with only 2 words! Doesn't you fell awesome after knowing that!
The command line can be used to increase efficiency and less time consumming.
We will discuss some more commands that are often used. List of the commands that we are going to cover in this blog are
- cp ---------- copy
- mv ---------- move
- grep ---------- to find some word in a content
- whoami ---------- to find out with what user you are logged in
- ls ---------- list the content of current or any specific dir
1) cp {the file to be coppied} {to the location where you want to copy}
leo@nemesis:~$ cp /home/leo/Pictures/hulk.jpg /home/leo/Downloads/
2)mv {the file to be coppied} {to the location where you want to copy}
leo@nemesis:~$ mv /home/leo/Pictures/hulk.jpg /home/leo/Downloads/
3)grep {word you want to find} {file/file location}
leo@nemesis:~$ grep for /home/leo/lgo/for.go
for j := 7; j <= 9; j++ { <--- output
4)whoami
leo@nemesis:~$ whoami
leo
5) ls {without argumant/or dir location }
leo@nemesis:~$ ls ./lgo/
blank_identifier.go function.go loop.go reminder.go
constants.go hello_worlds.go nil.go rune.go
exercise home.go print.go switchcase.go
for.go if_statement.go README.md variables.go
In many commands we can have added option, like
This is all for today's blog, feel free to ask for queries.
:)
Comments
Post a Comment