Unix Operating system - PowerPoint PPT Presentation

1 / 6
About This Presentation
Title:

Unix Operating system

Description:

points to a top directory (root) Pathname points to a specific file or directory: /home/s/sao1 ... ls -a lists a directory including the hidden files ... – PowerPoint PPT presentation

Number of Views:29
Avg rating:3.0/5.0
Slides: 7
Provided by: csN4
Learn more at: https://cs.nyu.edu
Category:
Tags: lists | operating | system | top | unix

less

Transcript and Presenter's Notes

Title: Unix Operating system


1
(No Transcript)
2
Unix Operating system
  • You need to use secure telnet application to
    connect or login to a remote computer/machine
    and use i5.nyu.edu
  • / points to a top directory (root)
  • Pathname points to a specific file or directory
  • /home/s/sao1
  • Absolute path starts from the root directory
  • /home/s/sao1
  • Relative pathname points to
  • a file or directory relative to your working
    directory
  • (navigate up or down based on the current working
    directory you are in)
  • cd .. Going back one level (up one level)
  • cd ../.. Two levels up

3
Summary of Unix Commands used in class
  • Ls lists a directory of your files
  • ls -l lists a directory with more information
    about the files
  • ls -a lists a directory including the hidden
    files
  • chmod modifies the permissions on a directory
  • mkdir ltdirectory namegt creates a new directory
    (e.g. mkdir pictures creates a directory
    called "pictures")
  • rmdir ltdirectory namegt removes an empty directory
    (e.g. rmdir pictures removes a directory called
    "pictures" as long as that directory is empty)
  • cp ltcurrent filenamegt ltnew file namegt copy (e.g.
    cp cats1.jpg cats2.jpg makes a copy of the
    picture "cats1.jpg" and calls it "cats2.jpg")
  • rm ltfilenamegt remove (or delete) a file (e.g. rm
    cats1.jpg deletes the file "cats1.jpg")
  • cd ltdirectory namegt change directory
  • Cd .. change directory up one level to the
    parent directory
  • man This is the on-line Unix help documentation
    (as in "manual").
  • Type "man" the command (e.g. "man ls") for a
    detailed explanation of the command.

4
File and directory permission in UNIX
  • R read permissions, you can look at a files
    content
  • W write permissions, you can change or delete
    file or content
  • X execute permissions, you can rum files as a
    program
  • Lets look at permissions more closely on the next
    slide!

5
File and directory permission in UNIX
Permissions Decimal Binary --- 0 000 ( all
bits off- no access) --x 1 001 ( only first
bit on- execute ) -w- 2 010 (Only second bit
on- write) -wx 3 011 (first and second bits
on- you can write execute) R-- 4 100 (third
bit is on- read) R-x 5 101 (third and first
bits on- read execute Rw- 6 110 (third and
second bits on- read and write) Rwx 7 111 (all
bits on- read, write and execute) Examples Chmod
755 public_html (rwx r-x r-x what
permissions?) Chmod 644 index.html (rw- r-- r--
what permissions?)
6
File permission in UNIX
  • To set permissions for the web
  • Chmod 755 filename
  • You can issue ls l to find out file permissions
  • - rwx r-x r-x sana.jpg
  • Image file for the web was set to 755
  • Directory permissions
  • drwx r-x r-x images
Write a Comment
User Comments (0)
About PowerShow.com