Вы находитесь на странице: 1из 3

ls list files and directories ls -a list all files and directories mkdir dirname make a directory cd dirname directory

tory change to named directory cd change to home-directory cd ~ change to home-directory cd .. change to parent directory i.e one level up pwd display the path of the current directory cp srcfile destfile to copy contents of src file to dest file (ex: % cp /vol/examples/tutorial/science.txt . indicates copy science.txt to current directory keeping the name same ) mv srcfile destfile only one file at the end rm filename rmdir dirname only empty directories can e removed in !"#$ clear clear the screen cat filename display the complete contents of a file on the screen less filename %he command less writes the contents of a file onto the screen a page at a time. &ress the 'space-bar( if you want to see another page) and type ' q( if you want to *uit reading. +s you can see) less is used in preference to cat for long files. ,ead filename displays first ten lines tail filename displays last ten lines cat it reads the standard input (the key oard)) and on receiving the -end of file(^D)) copies it to the standard output (the screen). .at / filename redirects the output from the standard input (key oard until ctrl0d is pressed and then writes into file filename) .at // filename appends the standard input contents until ctrl0d is pressed to file filename

.at file1 file2 / newfile write contents of file1 and file2 into newfile 3ort sort the contents from key oard in ascending order 3ort 4 filename sort the contents of file and redirect to screen 3ort 4 inputfile/ output file sort the contents of input file and redirect to output file 5ho to know who is on the system now 3ort 6 who 6 is called pipe used to com ine oth functionalities Wildcards : (7used for multiple charectors and 8 for single charector) ls list7 %his will list all files in the current directory starting with list.... ls 7list %his will list all files in the current directory ending with ....list
?ouse will match files like house and mouse, but not grouse man command to read the manual page for a particular command

whatis wc gives a one-line description of the command) ut omits any information a out options etc apropos keyword 5hen you are not sure of the exact name of a command ls 9l to find the access rights of a file chmod changing a file mode
Symbol u g o a r w x user group other all read write (and delete) execute (and access directory) Meaning

+ -

add permission take away permission

&s displays a list of processes along with their &#: ; used to send a process to ackground <illing processes : %o kill a =o running in the foreground) type >. (control c) kill %=o num er %o kill a suspended or ackground process kill &#: