Orientation for fresh VDTT students introduce to linux

34 161 0
Orientation for fresh VDTT students introduce to linux

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

Embedded Systems Group IIT Delhi S l i d e 1 Orientation for fresh VDTT Students Introduction to UNIX July 28, 2001 Anup Gangwar Embedded Systems Group IIT Delhi S l i d e 2 Overview • Prerequisites and goals of this course • Differences between UNIX and Windows • Overview of unices • Basic UNIX commands and utilities • Lunch Break • File editors in UNIX • Programming and Shell Scripting • Document formatting using UNIX • References and further study • Thank You Embedded Systems Group IIT Delhi S l i d e 3 Prerequisites and Goals • What you should know – Basic familiarity with computers – Working Knowledge of atleast one operating system – A will to learn • What you will know – This is not a complete UNIX tutorial – Don’t try to learn the whole UNIX in one day – How to do the most common set of tasks with UNIX – Self-Help is the best help – Pointers for further information Embedded Systems Group IIT Delhi S l i d e 4 Differences: UNIX and Windows • The UNIX and Windows philosophies • Client-Server model of Computation • Multi-User and Multi-Tasking. Login? • Concept of the Kernel and User Shell • Concept of file ownership and groups • GUI on UNIX and X windows • Tips: – UNIX is the most used OS in scientific and industrial community – Instead of avoiding UNIX take it heads on – Learning UNIX now will help you save precious time later on Embedded Systems Group IIT Delhi S l i d e 5 Overview of Unices-1 • The ?original? UNIX • The AT&T SVR and BSD • Others: HP-UX, Solaris, Linux, AIX, IRIX etc. • Why are there so many unices? Vendor Wars! • How do I understand all of them? POSIX! • Tips: – Learn the common set of commands for all the unices – Linux utilities will contain enhancements not found in others – Try to clear trivial doubts like command syntax yourself Embedded Systems Group IIT Delhi S l i d e 6 Overview of Unices-2 • HP-UX – Processors: HP PA-RISC and Intel Itanium – Vendors: HP – Markets: High End Servers and Workstations • Solaris/SunOS – Processors: Sun Ultra Sparc – Vendors: Sun Microsystems – Markets: All ranges of Servers and Workstations Embedded Systems Group IIT Delhi S l i d e 7 Overview of Unices-3 • Linux/GNU Systems – Processors: Intel 386 and up, Sun Ultra Sparc, IBM PowerPC etc. – Vendors: Free/GNU GPL – Markets: Low End Servers and Workstations • AIX (Advanced UNIX) – Processors: IBM Power PC – Vendors: IBM – Markets: All ranges of Servers and Workstations Embedded Systems Group IIT Delhi S l i d e 8 Overview of Unices-4 • IRIX – Processors: MIPS – Vendors: SGI (Silicon Graphics International) – Markets: High End Graphics Servers and Workstations • Others – BeOS, FreeBSD etc. – RTOS’s: PSoS, QNX, RTEMS, ?RTLinux? etc. Embedded Systems Group IIT Delhi S l i d e 9 What we have • Philips VLSI Design Lab – HP Server running HP-UX – Sun Workstation – Linux Workstations • VDTT Lab – Linux Workstations – Windows NT Workstations • New VLSI Lab – Sun Workstations – Windows NT Workstations Embedded Systems Group IIT Delhi S l i d e 1 0 Basic UNIX Commands and Utilities-1 • Files and Directories – File Types: Windows and UNIX – File and Directory creation (Editors, mkdir, ln etc.) – Listing contents of a directory (ls) – File and Directory deletion (rmdir, rm etc.) – File and Directory permissions (chmod) – File and Directory ownership (chown, chgrp) – Organizing your work in directories (mv) • Tips: – UNIX doesn’t have a recycle bin! – Try not to make the mistake of rm -rf * command [...]... • Emacs is not available by default on all unices Editors in UNIX-3 • Pico: Is there really a need? – Pico and Pine – Editor Keys • Joe?, Nedit? – Keys similar to Norton Editor – Nedit has some features similar to Emacs • Tips: Embedded Systems Group IIT Delhi Slide 18 – Don’t fall for Pico or Nedit – Learn Vi and Emacs if you really want to get into UNIX – In the end it is a matter of choice Programming... WYSWYG front-end Lyx Other text formatters: ?troff? How to make Presentations? Slides? Tips: Embedded Systems Group IIT Delhi Slide 30 – PowerPoint is still the best software for making presentations – It is easy to convert PowerPoint slides to html Text formatting using UNIX-2 • LaTeX – origin: LaTeX and TeX – usage – LaTeX tutorials and manuals • A not so short introduction to LaTeX • The LaTeX manual... • Learn the keypad scroll key combinations instead of arrow keys • Vi is fast, try to make the best use of its capabilities Editors in UNIX-2 • Emacs: Much more than an editor? – Why learn Emacs? History, Tutorial – Getting in and out? – Basic keys for editing • • • • Moving around, deleting a line Search and replace Formatted text, postscript spooling mail in emacs – Syntax highlighting and templates... Slide 14 – Instead of asking someone try man -k – It is a good practice to stick to one shell (csh is available on all) Embedded Systems Group IIT Delhi Slide 15 Lunch Break Editors in UNIX-1 • What all is available, Vi, Emacs, Pico, Joe?, Nedit? • Vi: The king of all editors? Tutorial? – Why learn vi? – Getting in and out? – Basic keys for editing • Moving around, deleting, joining lines • Repeating commands... Programming-1 • • • • What is the need for shell programming? Bourne shell (sh, ksh, zsh and bash) c shell (csh, tcsh) Examples of shell programming – Moving all a.{i}.txt files to a.{i+1}.txt – Cleaning up your directory at the end of a day • Tips: Embedded Systems Group IIT Delhi Slide 27 – Perl just might be a better option – Don’t forget ?sed? and ?awk? Introduction to Shell Programming-2 • Moving files... #!/bin/csh -f # Assume that ps, pdf etc directories are present set FILE_LIST=`ls` foreach CURR_FILE ( $FILE_LIST ) set TST=`echo $CURR_FILE | grep \.pdf\$ ` if( $TST != "" ) then mv $CURR_FILE pdf endif set TST=`echo $CURR_FILE | grep \.ps\$ ` if( $TST != "" ) then mv $CURR_FILE ps endif end Text formatting using UNIX-1 • • • • • • • What is the need for text formatting? WYSWYG or NOT? LaTeX & Emacs PS... front-ends to gdb: emacs, xxgdb, mxgdb etc • Not every system will have gdb, you just might have to use ?dbx? Programming on UNIX-5 • Gmake or GNU make • What is the need for a Makefile? – – – – – – Dependencies Targets in a makefile Patterns in makefile Automatic variables in a makefile Pattern substitution Common target names: all, clean, docs • Tips: Embedded Systems Group IIT Delhi Slide 23 – Never forget... to LaTeX • The LaTeX manual • LaTeX by Lesslie Lamport • Lyx a WYSWIG interface to LaTeX • Emacs ps-renderer and troff • Tips: Embedded Systems Group IIT Delhi Slide 31 – For small formatted text Emacs is still the best Before wrapping up Embedded Systems Group IIT Delhi Slide 32 Any questions/doubts which you would like to clarify? Wrapping up • Self help is the best help! – The UNIX man pages ?Manual... command line interface to your programs • Using a GUI is slow Programming on UNIX-8 • Java – What is really different with the windows version? – Is Jfc, Java2D, Java3D available? – IDE’s for Java over UNIX? • Tips: Embedded Systems Group IIT Delhi Slide 26 – Don’t try to use a %.class dependency with make – If you run Java from a server, graphics would be slow Introduction to Shell Programming-1 •... FILE_LIST=`ls | grep "\.[0-9]\." ` for CURR_FILE in $FILE_LIST; do FIRST_NM=`echo $CURR_FILE | cut -d'.' -f1` NUM=`echo $CURR_FILE | cut -d'.' -f2 ` SECOND_NM=`echo $CURR_FILE | cut -d'.' -f3` NUM_PLUS=`expr $NUM + 1 ` mv -i $CURR_FILE $FIRST_NM.$NUM_PLUS.$SECOND_NM Embedded Systems Group IIT Delhi Slide 28 done Introduction to Shell Programming-3 • Cleanup directory script Embedded Systems Group IIT . 1 8 Editors in UNIX-3 • Pico: Is there really a need? – Pico and Pine – Editor Keys • Joe?, Nedit? – Keys similar to Norton Editor – Nedit has some features similar to Emacs • Tips: – Don’t fall for. Embedded Systems Group IIT Delhi S l i d e 1 Orientation for fresh VDTT Students Introduction to UNIX July 28, 2001 Anup Gangwar Embedded Systems Group IIT Delhi S l i d e . fast, try to make the best use of its capabilities Embedded Systems Group IIT Delhi S l i d e 1 7 Editors in UNIX-2 • Emacs: Much more than an editor? – Why learn Emacs? History, Tutorial – Getting

Ngày đăng: 24/10/2014, 10:53

Mục lục

    Orientation for fresh VDTT Students Introduction to UNIX

Tài liệu cùng người dùng

Tài liệu liên quan