All commands in
Linux are case sensitive , so the “ LS “command will be perceived differently
by “ ls ”.Now we start with the basic commands that are commonly used in Linux
:
ls
This command is a command to display the contents of a directory . This command is similar to the dir command in DOS .
There are several ways to use this command , for example :
# ls
# ls - l
To find out more about the ls command , please refer to the manual with the command man ls .
more
more commands can be used to view the contents of a text file to the screen by screen . more to get out of the view by pressing button ‘ q ‘.
cat
This command is used to display the contents of a file to the screen without a screen per-screen display facilities .
Usually used in conjunction with a pipeline or redirection . For example to display the contents of the file / etc / passwd and / etc / group , use the command :
# cat / etc/passwd/ etc/group
cd
This command is similar to the DOS cd command is used to move to a particular directory . Example commands :
# cd /home/whal
To go back to the /home directory , then use the command :
# cd ..
cp
This command is used to copy a file or directory . for example :
# cp whal whal2
The above command will copy the files whal to files whal2 . To copy the entire directory using the command :
# cp - R/home/whal /home/gue
mv
This command is used to move a file to another location or with a different name . example :
# mv contoh1.php contoh2.php
# mv contoh1.php /home/whal/contoh2.php
rm
This command is used to delete directories or files . This command is similar to the DOS del command . In order to use this command carefully because there is no command in Linux undelete or unerase . Example of use rm as follows :
# rm contoh1.php
To delete a directory, use the command :
# rm /home/whal/temp
mkdir
This command is used to create directories . For example :
# mkdir whal
Pipeline
On Linux and UNIX , the output of a process program can be given as inputs to other processes . For example :
# ls - l /home/whal | more
grep
grep command is used to download the filter input and display in the form of lines corresponding to the pattern you want . example :
# ps ax |grep wvdial
redirection
In Linux or UNIX , you can turn swung standard input , standard output or error toward another goal .
For example, you can skew the standard output of a program to a file or standard input deflect a program from a file .
Distorting the process is called redirection and in UNIX we used ‘ > ’ symbols ( to deflect the standard output to a file ) and the symbol ‘ < ’ ( to deflect from the standard input file ) . example :
To save the contents of the entire display directory /etc to a file , use the command :
# ls - lR /etc > content-etc
To add the contents of the file contents etc with other data , use the symbol >> ( append ) the redirection , for example :
# ls - lR /home/whal >> content-etc
To make the sorting order of data contained in the file contoh.txt can use the command :
# sort < contoh.txt
The above commands are commands that are often used in Linux or UNIX . If you still have trouble please read the manual first. Because it is very important to read the manual if you frequently “ oprek “ Linux or UNIX . from the manual book we can get the solution of the problems.
ls
This command is a command to display the contents of a directory . This command is similar to the dir command in DOS .
There are several ways to use this command , for example :
# ls
# ls - l
To find out more about the ls command , please refer to the manual with the command man ls .
more
more commands can be used to view the contents of a text file to the screen by screen . more to get out of the view by pressing button ‘ q ‘.
cat
This command is used to display the contents of a file to the screen without a screen per-screen display facilities .
Usually used in conjunction with a pipeline or redirection . For example to display the contents of the file / etc / passwd and / etc / group , use the command :
# cat / etc/passwd/ etc/group
cd
This command is similar to the DOS cd command is used to move to a particular directory . Example commands :
# cd /home/whal
To go back to the /home directory , then use the command :
# cd ..
cp
This command is used to copy a file or directory . for example :
# cp whal whal2
The above command will copy the files whal to files whal2 . To copy the entire directory using the command :
# cp - R/home/whal /home/gue
mv
This command is used to move a file to another location or with a different name . example :
# mv contoh1.php contoh2.php
# mv contoh1.php /home/whal/contoh2.php
rm
This command is used to delete directories or files . This command is similar to the DOS del command . In order to use this command carefully because there is no command in Linux undelete or unerase . Example of use rm as follows :
# rm contoh1.php
To delete a directory, use the command :
# rm /home/whal/temp
mkdir
This command is used to create directories . For example :
# mkdir whal
Pipeline
On Linux and UNIX , the output of a process program can be given as inputs to other processes . For example :
# ls - l /home/whal | more
grep
grep command is used to download the filter input and display in the form of lines corresponding to the pattern you want . example :
# ps ax |grep wvdial
redirection
In Linux or UNIX , you can turn swung standard input , standard output or error toward another goal .
For example, you can skew the standard output of a program to a file or standard input deflect a program from a file .
Distorting the process is called redirection and in UNIX we used ‘ > ’ symbols ( to deflect the standard output to a file ) and the symbol ‘ < ’ ( to deflect from the standard input file ) . example :
To save the contents of the entire display directory /etc to a file , use the command :
# ls - lR /etc > content-etc
To add the contents of the file contents etc with other data , use the symbol >> ( append ) the redirection , for example :
# ls - lR /home/whal >> content-etc
To make the sorting order of data contained in the file contoh.txt can use the command :
# sort < contoh.txt
The above commands are commands that are often used in Linux or UNIX . If you still have trouble please read the manual first. Because it is very important to read the manual if you frequently “ oprek “ Linux or UNIX . from the manual book we can get the solution of the problems.
0 komentar:
Posting Komentar