Thumb

Linux terminal commands for beginner


6/13/2016 12:00:00 AM

Linux top command:

=>>go to your expected directory using

cd  Desktop

 

=>>provide your expected file name like

cat> filename.txt                       //[after providing filename hit enter]

[Now you can write something then press “ctl+d”  to save the txt to your “filename.txt”]

 

=>>show all text of “filename.txt” using

cat  filename.txt

=>>go to your expected directory where you want to create a new folder

cd Desktop            //[I want to create a new folder to my desktop]

 

=>>make your directory

mkdir  NewfolderName             //[replace your foldername to NewfolderName]

 

=>>you can preview your list of content of your current directory

ls

=>> list recursively directory tree

ls -R

=>>to go your newly created folder

cd NewfolderName

 

=>>provide your expected file name like

cat> filename2.txt                                 //[after providing filename hit enter]

[Now you can write something then press “ctl+d”  to save the txt to your “filename2.txt”]

 

=>>show all text of “filename2.txt” using

cat  filename2.txt

 

=>>copy “filename.txt” text to “filename2.text”

cp  filename.txt   filename2.txt

 

=>>move “filename.txt” text to “filename2.txt”

mv  filename.txt   filename2.txt

Ctl+d  [to save all last activity]

 

=>>to remove file

rm filename2.txt

 

=>>to remove folder(but remove file from folder first)

rmdir NewfolderName

 

=>>to write file

chmod  a+w filename.txt

 

=>>to execute file

chmod  a+x

 

=>>to all select

chmod  755*

 

About Teacher

Reza Karim

Software Engineer

More about him