1 / 15

Lecture 4: Utilities ( ch 3)

Lecture 4: Utilities ( ch 3). IT244 - Introduction to Linux / Unix Instructor: Bo Sheng. Outline. Basic utilities ( ch 3) Homework 1. Basic Utilities. Record shell display ( script ) script / exit script ls cat months exit cat typescript. Compress/decompress Files. bzip2

laban
Download Presentation

Lecture 4: Utilities ( ch 3)

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. Lecture 4: Utilities (ch 3) IT244 - Introduction to Linux / Unix Instructor: Bo Sheng

  2. Outline • Basic utilities (ch 3) • Homework 1

  3. Basic Utilities • Record shell display ( script ) • script / exit • script • ls • cat months • exit • cat typescript

  4. Compress/decompress Files • bzip2 • bzip2 –v linux • ls –l (compare the file sizes) • bunzip2 linux.bz2 • ‘-k’ keeps the original file • bzip2 –vklinux • bzcat linux.bz2

  5. Compress/decompress Files • gzip (GNU zip) • gzip, gunzip, zcat • gziplinux • ls -l • zcat linux.gz • gunzip linux.gz

  6. Compress/decompress Files • Try multiple files • gzip days months linux • gunzipdays.gzmonths.gzlinux.gz • bzip2 … • bunzip2 …

  7. Compress/decompress Files • tar is for archiving not compressing • tar –cvf all.tar days months • ls –l (compare file sizes) • tar –tfall.tar(list files) • tar –xvfall.tar(extract files) -c:create, -v:verbose, -f:specify filename

  8. Compress/decompress Files • tar is for archiving not compressing • Compress .tar files using bzip2 and gzip • .tar.gz, .tgz, .tar.bz2, .tbz • tar –cvfall.tar months days linux • gzip –vall.tar http://www.kernel.org/pub/linux/kernel/v2.6/

  9. Compress/decompress Files • Decompresstar.gz files • gunzipall.tar.gz • ls –l • tar –xvf all.tar • gunzip –c all.tar.gz | tar –xvf - • tar –zxvfall.tar.gz

  10. Locating Utilities/Commands • which and whereis • Multiple copies of utilities • which checks search path and display the first result • which tar • which wc • whereischecks standard directories • whereis tar • whereiswc

  11. Locating Utilities/Commands • which and whereis • Built-in utilities • whereis echo • which echo • type echo • type cd

  12. User and System Info • date • date • Format the display • date +‘%A %B %d’ • who ( list users on the system) • who • who am i

  13. User and System Info • finger( list users on the system ) • finger your username • finger it244 • finger sheng • cd /home/your username • echo “***” > .plan • echo “***” > .project • finger your username

  14. User and System Info • w • Comparison table (Pg73)

  15. Summary • Shell record (script / exit) • Compress/Archive files • bzip2, gzip, tar • User/System info • date, which/whereis, locate, type • who, finger, w

More Related