1 / 11

Help session: Unix basics

Help session: Unix basics. Keith 9/9/2011. Login in Unix lab. User name: ug0xx Password: ece321 (initial) The password will not be displayed on the screen. Open the console program to input commands use command 'passwd' to change your password Make sure to change the password!.

Télécharger la présentation

Help session: Unix basics

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. Help session:Unix basics Keith 9/9/2011

  2. Login in Unix lab • User name: ug0xx Password: ece321 (initial) • The password will not be displayed on the screen. • Open the console program to input commands • use command 'passwd' to change your password • Make sure to change the password!

  3. Remotely connect to Unix and file transfer • Install Secure Shell Clientsand X-Win32 available at: http://softweb.cc.sunysb.edu/ • Use ssh with the assigned account to remotely connect to the unix server. If a graphic interface is needed, check the “Tunnel X11 connections” option in the tunneling tab and open x-win on your local computer. • Use ssh file transfer client or ftp to transfer files to or from unix server (cyclops.ee.sunysb.edu).

  4. Directory structure • Tree-like directory structure. • The root directory is /. • Every user has a private working directory with full permission. • When you login, you're under your working directory. • Absolute path and relative path A: /home/home2/ug001/ R: ./

  5. permissions • Read / Write / Execute • View permissions ls -l /directory/file -rwxr--r-- 1 owner group ... ( 7 4 4 ) • Set permissions (Owner only) chmod 700 /directory/file

  6. Commands • cd: change working directory cd go to $HOME directory cd .. go to parent directory cd - go to previous directory • ls: list contents of the directory • -a do not hide entries starting with . • -l use a long listing format • -t sort by modification time • mkdir: create a directory

  7. Commands • cp: copy files • mv: move files • rm: remove files • Files will be permanently removed • -i prompt before any removal • touch: change file timestamps, can be used to create a dummy file • cat: concatenate and display files

  8. Search Commands • grep: text search • Basic usage: grep ‘pattern’ file • Regular expression: describe complex patterns in texts • An example, pattern for email address ‘\b[A-Z0-9._%+-]+@[A-Z0-9.-]+\.[A-Z]{2,4}\b’ • find: search for files Search in the current directory and all sub directories: find . -name “filename"

  9. Commands • tar: store and extract files from an archive, can also compress or decompress an archive. • .tar • tar xvf FileName.tar • tar cvf FileName.tar DirName • .tar.gz • tar zxvf FileName.tar.gz • tar zcvf FileName.tar.gz DirName • man: display the online manual pages

  10. Text editor: vi • vi or vi filename to start editor • command mode and input mode • enter input mode: a or i • ‘Esc’ to command mode • delete: x (single character) dd (a line) • number for repeating action • u for undo • exit editor • :wq (save and exit) • :q! (exit without saving) • q (exit, maynot work)

  11. For more information • TA’s webpage: http://www.ic.sunysb.edu/stu/xdeng • Search on the Internet • Office hour

More Related