1 / 11

CIS 240 Introduction to UNIX Instructor: Sue Sampson

CIS 240 Introduction to UNIX Instructor: Sue Sampson. CIS240 – Miscellaneous. Displaying contents of compressed files: zcat <options><filelist> cat test1.doc.gz $@test1.doc.t.lzv[sue@localhost testzip] zcat test1.doc.gz I’m testing this again… Mutiple pages?

missy
Télécharger la présentation

CIS 240 Introduction to UNIX Instructor: Sue Sampson

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. CIS 240 Introduction to UNIX Instructor: Sue Sampson

  2. CIS240 – Miscellaneous Displaying contents of compressed files: zcat <options><filelist> cat test1.doc.gz $@test1.doc.t.lzv[sue@localhost testzip] zcat test1.doc.gz I’m testing this again… Mutiple pages? Use: zmore <options><filelist>

  3. CIS240 – Miscellaneous Searching for Files: find command: Searches a list of directories that meet the criteria, searches recursively. (all subdirectories are also searched) If no directory is listed, starts in current directory. find directory-list expression Common criteria: -name pattern searches for matching files -print display pathnames of found files -user name search for files owned by name -inum N searches for matching files, useful for finding all the hard links to a file

  4. CIS240 – Miscellaneous $ find –name test3.doc -print ./testtar/test3.doc ./testres/test3.doc ./testzip/test3.doc $ find ~ –name test3.doc -print ./testtar/test3.doc ./testres/test3.doc ./testzip/test3.doc $find /usr . –inum 308375 –print ./sue/memo.txt ./sue/memo.hard

  5. CIS240 – Miscellaneous Searching for Commands: whereis command: Searches for a specific command, provides absolute path, allowing you to update your path statement. whereis [options] [filelist] Options: -b Search for binaries (exe’s) only -m Search for manual page on -s Search for source code only

  6. CIS240 – Miscellaneous $ whereis ftp ftp: /usr/bin/ftp /usr/share/man/man1/ftp.1.gz $ whereis –b cat cat: /bin/cat $whereis find compress tar find: /usr/bin/find /usr/share/man/man1/find.1/gz compress: tar: /bin/tar /usr/share/man/man1/tar.1.gz

  7. CIS240 – Miscellaneous Command History: history command: commands typed in at console are saved in a history list. The history command is used to display or manipulate the list. SET command is used to determine location and size of the history file, history [options] [filelist] Options: N Display only the last N commands -c Clears the history list -w [filename] Write the current history list to the file

  8. CIS240 – Miscellaneous $ set … … HISTFILE=/home/sue/.bash_history HISTFILESIZE=1000 **number of commands saved between sessions HISTSIZE=1000 **number of commands allowed in file … $ history … 487 whereis find compress tar 488 history 489 java –version 490 set $ history 2 489 java –version 490 set

  9. CIS240 – Miscellaneous Installing Packages: rpm: -- The RPM Package Manager (RPM) is a powerful command line driven package management system capable of installing, uninstalling, verifying, querying, and updating computer software packages. -- .rpm packages are available from a number of sites… Getting to gcc: ftp://ftp.openpkg.org/release/1.3/ Installing java tutorial: http://home.bredband.no/gaulyk/java/tutorial/javaredhat.html RPM tutorial:http://linuxexperience.com/articles/redhatrpm.php

  10. CIS240 – Miscellaneous Installing Packages: rpm [install-options] [package-file] Options: -v print routine progress information -h prints hash marks as install progresses -i install -U upgrading existing packages -e uninstalls package -- log in as root -- move to directory containing .rpm file -- rpm -i

  11. CIS240 – Miscellaneous Installing Packages: -- log in as root -- move to directory containing .rpm file rpm –i gcc-3.3-1.3.0.ix86-linux2.4-cw.rpm

More Related