1 / 27

Chapter 1

Chapter 1. Linux/Unix Environment and basic commands Digital Image Processing Instructor: Dr. Cheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated: 21 September 2003. Introduction. References Teach yourself UNIX in 24 hours, SAMS

abena
Download Presentation

Chapter 1

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. Chapter 1 Linux/Unix Environment and basic commands Digital Image Processing Instructor: Dr. Cheng-Chien Liu Department of Earth Sciences National Cheng Kung University Last updated: 21September 2003

  2. Introduction • References • Teach yourself UNIX in 24 hours, SAMS • Linux Mandrake 9.1 實務應用,旗標 • History of UNIX • History of Linux • Why UNIX • Why Linux • Where to get Linux • How to install Linux

  3. Start • No power on/off • login • logout • passwd • whoami • id • users • who • w

  4. Start (cont.) • time • date • hostname • exit

  5. Move • ls • ls –C -F • ls –a • Dot files • Directory • / • . • .. • cd

  6. File system • Directory • bin • dev • etc • lib • lost+found • mnt • sys • tmp • usr • users

  7. Shell environment variables • echo $VARIABLE • PATH • HOME • SHELL • TERM • MAIL • LOGNAME • TZ • pwd • Take a look around

  8. Move further • Directory • bin • dev • etc • lib • lost+found • mnt • sys • tmp • usr • users

  9. Help • man • help • -h • -? • whatis

  10. ls • Flag • -l • -a • -C • -d • -F • -l • -m • -r • -R • -s

  11. Permission • ls -l • Permission • Type • Owner • Group • Other • Permission mode • r • w • x

  12. Change Permission • chmod • Symbol • ugoa • +- • rwx • Digit • --- 0 • --x 1 • -w- 2 • -wx 3 • r-x 5 • rw- 6 • rwx 7

  13. Change Permission • Permission • Type • Owner • Group • Domain • e.g. ls -l • Access permission • r • w • x • e.g. everybody can access

  14. Some useful commands • touch • du • df • compress • umask

  15. Manage files • mkdir • cp • mv • rmdir • rm • -i • -r

  16. Manage files (cont.) • file • Not accurate • No need to open files • head • tail • cat • more

  17. Filters and pipes • Redirection • > • >> • < • << • | • wc • -l • -w • -c

  18. Filters and pipes (cont.) • uniq • -u • -d • -c • sort • -b • -d • -f • -n • -r

  19. grep • Difference between * and ? • Use echo to test • Regular expression • c • \c • ^ • $ • . • [xy] • [^xy] • c*

  20. grep (cont.) • Difference between * and ? • Use echo to test

  21. Text Editor • emacs • vi • Basic commands • http://www.badmagicnumber.com/vi/

  22. C shell • echo $SHELL • ls –a • cat .cshrc • vi .cshrc • stty erase ^H • history • alias • g77

  23. Telnet • telnet 140.116.24.47 • Setup your password • logout • telnet again using your new password

  24. ftp • ftp 140.116.24.47 • Basic commands • pwd • ls • cd • lcd • ascii (a) • binary (bin) • get • put

  25. ftp (cont.) • Basic commands (cont.) • mget • mput • bye • Anonymous FTP • Username: anonymous • Password: (email address)

  26. Supplements • http://www2.stat.tku.edu.tw/document/Linux/unix.PDF • http://packet.int.hit.edu.tw/jychen/Course/SiteManage/PPT/UnixCMD.ppt • http://www.ccu.edu.tw/center/ycnet/seminar/unix90.pdf

  27. Exercises • Setup your best shell environment • (alias, path, erase, …) • Make yourself familiar with basic commands of vi • Find the location of files by their name or contexts • Manage your own directory and files • Change permission • Use telnet and ftp

More Related