Presentation is loading. Please wait.

Presentation is loading. Please wait.

Learning basic Unix command It 325 operating system.

Similar presentations


Presentation on theme: "Learning basic Unix command It 325 operating system."— Presentation transcript:

1 Learning basic Unix command It 325 operating system

2 Making Directories mkdir (make directory) We will now make a subdirectory in your home directory to hold the files you will be creating. To make a subdirectory called unixstuff in your current working directory type % mkdir unixstuff To see the directory you have just created, type: % ls

3 Changing to a different directory cd (change directory) The command cd directory means change the current working directory to 'directory'. The current working directory may be thought of as the directory you are in, i.e. your current position in the file-system tree. To change to the directory you have just made, type % cd unixstuff Type ls to see the contents (which should be empty)

4 Changing to a different directory (..) means the parent of the current directory, so typing % cd.. will take you one directory up the hierarchy (back to your home directory). Note: typing cd with no argument always returns you to your home directory. This is very useful if you are lost in the file system.

5 print working directory pwd (print working directory) % pwd

6 Some Utilities The Arrow Keys : Use to retrieve previous commands. History : ( %history ) Use to get a list of the commands you have used most recently "!10" to repeat command number 10. "!n". This will re-issue the most recent command that begins with the prefix “n". Note that the prefix can be of any length Find: Find the path name of a file (% find / -name filename )

7 Some Utilities Rmdir remove directory. example :Rmdir /home/user/new will remove “new” directory. cp filename1 filename2 copy a file or directory( this command will copy “filename1” content to “filename2” rm filename remove a file (delete it)

8 Displaying Text Files CommandDescription less a new and improved version that allows backward paging as well with the up- arrow, down-arrow, Page Up, and Page Dn. headshow the first few lines of a file tailshow the last few lines of a file we saw that cat can be used for this purpose, but it is most useful for short files that can be viewed all on one screen. what about large file?

9 The Manual Linux includes an on-line help system, called the manual. Type: "man cat" to read about cat

10 Directomary and File Permissions File user's are divided into three categories: User, group and everyone else They might have permission to read a file, write or modify a file and execute a file. Setting Permissions: You can set the permissions of the files using the chmod 4 for read, 2 for write, 1 for execute. 6 = 4+2 (read plus write permission) 7 = 4+2+1 (all three permissions added together) chmod 755 file  the user has full permissions while the others can read and execute but not write.

11 Summary ls list files and directories mkdir make a directory cd directory change to named directory cd change to home directory cd.. change to parent directory pwd display the path of the current directory cat display a file rmdir remove directory cp copy a file or directory rm remove a file (delete it)


Download ppt "Learning basic Unix command It 325 operating system."

Similar presentations


Ads by Google