Você está na página 1de 3

Unix Notes

Unix is the case sensitive.. All commands normally in lower case... unless noted
...
Commands
-----------------------1.ls List of files in particular Unix directory
--If normally type the ls command show the file in working directory
Ls commands having the additional information..
ls the result will be the current working file or directory in alphabetica
l order wise...
2. ls -l the result will long list of the file in directory additionally show t
he following information
File name ....shows the protection information......File owner......Number of
character in file.....date and time to the last change to the file information
3. ls -a all your file listed bigin with the period ( ie.Hidden files)
4. man ls For more information about the ls commands..
=======================================================
DISPLAYING AND CONCATENATING(COMBINING) FILES
1. more
2.more newfile
.
3.man more

Display the content of the newfile one screen (page) at a time

for the more information about this command in Unix system prompt

4.cat Display the content of the file in terminal


5. cat newfile display the contents of the newfile
6. cat newfile oldfile
y

Display the contents of the two file contineous displa

7. ctl+c to interupt the file while running in unix prompt


ctl+s display the file and processing of the command
ctl+q interupt command display lines at the point which processing was int
erupted
------------------------------------------------------Cat command also used to combine file put into another file

1. cat fileone filetwo filethree >newfile


newfile

Those three file contents placed to

2. man cat for more information


================================================================
COPYING FILES
1. cp make copy files from one directories to another directories
vice to another devices
2. cp fileone filetwo

or

one de

copies the contents of fileone to named filetwo

3. cp /usr/neighbor/testfile .
copies the testfile from /usr/neighbor to your Unix account the period(.) e
nd of the command line indicate the file to be copie to the your current working
directory and name will remain same..
-------------------------------------------To copy a file from another user directory on UNIX, you must know the person us
er name.
1. cp ~username/file1 yourfile
ry)

copy the file1 to yourfile(working user directo

2. man cp For more information about cp command.


===============================================
DELETING FILES
1.rm Delete the specific file .
We can delete the more than one file specification on a command line by sepe
rating the file specification with spaces..
2.rm newfile Delete the file named newfile
3. rm newfile oldfile delete two file

newfile and oldfie

4. rm new* Delete all files that begin with prefix new


5. man rm

For more information

=================================================
RENAMING FILES
1.mv

this command changes the identification

2.mv oldfile newfile changes the name of file oldfile to newfile only one file
will exist
3.mv oldfile bin/newfile
ile

oldfile data will be changed to directory bin in newf

4. man mv For more information

=====================================
PRINTING FROM UNIX

Você também pode gostar