Linux commands part II

In this post, we will discuss some more basic commands of linux. I hope you have already gone through Linux commands Part I.

  • df: it gives information about amount of free spaces in the filesystem.
    df command

  •  free: it gives information about free spaces and used spaces and swap space too.
free command

  •  cat: it shows the content of a file on command line.
e.g. lets make a file file.txt

touch file.txt

and put some content there.  then use cat command.


cat file.txt

  • wc: it shows the information about number of lines,words and characters in a file.

wc file.txt

There are mainy three opetions  in this command:
  1. wc -l
  2. wc -w
  3. wc -c

options in wc

  • grep: it helps in searching content in a file. 

grep file.txt

you can read more about grep at grep tutorial

  • cp: it is used to copy file and directories.

Synatx:
cp source destination  


we are going to copy file.txt to our desktop.
cp command example


Related Posts Plugin for WordPress, Blogger...