1 / 11

Learning basic Unix command

Learning basic Unix command. It 325 operating system. 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

camdyn
Download Presentation

Learning basic Unix command

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

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 • % mkdirunixstuff • 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” • rmfilename • remove a file (delete it)

  8. Displaying Text Files 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

More Related