1 / 18

Basic of UNIX

Basic of UNIX. For fresh members of SPARCS eungkyu@sparcs. What is UNIX?. AT&T ’ s UNIX Ken Thompson and Dennis Ritchie BSD and System V Release Solaris, AIX, IRIX, HP-UX, FreeBSD, … Linux. Features of UNIX. Multi-user, Multitasking Written in C – portability Simple and elegant

carson
Download Presentation

Basic of UNIX

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. Basic of UNIX For fresh members of SPARCS eungkyu@sparcs

  2. What is UNIX? • AT&T’s UNIX • Ken Thompson and Dennis Ritchie • BSD and System V Release • Solaris, AIX, IRIX, HP-UX, FreeBSD, … • Linux

  3. Features of UNIX • Multi-user, Multitasking • Written in C – portability • Simple and elegant • Very good at networking server

  4. Basic Commands of UNIX • Please help me!!! • Using file system • Permissions • Compression and archiving • Displaying system information

  5. Basic Commands of UNIX – cont. • Searching and find • Job control • Redirection and pipe • Various utilities • Using network

  6. Please help me!!! • man – to see on-line reference manual • $ man man • $ man ls • info – for reading documentation (GNU) • $ info info • $ info ls • -h, --help option

  7. Using file system • All in UNIX is file • Tree structure • ls – listing directory contents • $ ls -al • cp, mv – copying, moving files • $ cp file1 file2 • $ mv file1 file2 directory

  8. Using file system – cont. • rm – removing files • $ rm file1 file2 • $ rm -rf directory • mkdir, rmdir, cd– making, removing, changing directory • $ mkdir directory; cd directory • $ cd ..; rmdirdirectory • pwd – printing working directory

  9. Permissions • UNIX is multi-user system • user, group, other • rwxrwxrwx – 777 • chmod – changing file access permissions • $ chmod 644 file1 file2 • $ chmod go-rw file3 • chown, chgrp (for superuser)– changing user, group ownership

  10. Compression and archiving • gzip, bzip2 – compress or expand files • $ gzip file1 file2 • $ bzip2 -d *.bz2 • tar – archiving files • $ tar cvf files.tar file1 file2 • $ bzip2 files.tar • $ tar xzvf directory.tar.gz directory • $ tar xjvf directory.tar.bz2 directory

  11. Displaying system information • du, df – displaying usage of space • w, who – show who is logged in • finger – lookup user information • whoami – who am I • id – printing real eUID and GID

  12. Searching and find • which, whereis, type– simple searching utilities • find – finding files • $ find directory [expression] … • $ find / -name hanterm • $ find . -name “*~” -exec rm -f {} \; • $ man find

  13. Redirection and pipe • $ command > file • $ command < file • $ command1 | command2 • Ask details to netj

  14. Various functions • kill – sending signal to process • ps – printing process status • cat – to see file (?) • more, less – paging text file to see • grep, egrep – print line matching pattern • $ grep pattern [file] …

  15. Various functions • head, tail – see head, tail of files • cut, sort – cut or sort text file • write – send message to other user • Mail alias • Xmanager – required

  16. Using network • telnet – telnet client • mutt, pine – Mail User Agent • ftp, ncftp – ftp client • wget - a utility to retrieve files • lynx, w3mmee – text web browser • talk

  17. For C/C++ programming • Use ‘:set cindent’ in vim • gcc, g++ - C/C++ compiler • $ gcc -o target1 source1.c source2.c … • $ g++ -o target2 source1.cc source2.cc … • make– very good program using Makefile

  18. Simple example of Makefile

More Related