File Systems, telnet and ftp - PowerPoint PPT Presentation

About This Presentation
Title:

File Systems, telnet and ftp

Description:

File Systems, telnet and ftp Sources and Resources: A Students Guide to UNIX, by Hahn Paula Davidson s Handout on UNIX Internet Applications: telnet For Remote ... – PowerPoint PPT presentation

Number of Views:59
Avg rating:3.0/5.0
Slides: 24
Provided by: SusanL50
Learn more at: https://www.cs.unca.edu
Category:
Tags: desktop | file | ftp | remote | systems | telnet

less

Transcript and Presenter's Notes

Title: File Systems, telnet and ftp


1
File Systems, telnet and ftp
  • Sources and Resources
  • A Students Guide to UNIX, by Hahn
  • Paula Davidsons Handout on UNIX

2
Internet Applicationstelnet For Remote Login
  • telnet remote_host_name
  • Internet application
  • Used to login to a remote computer
  • Allows your expensive PC to look like a dumb
    glass tty or asynchronous terminal
  • At UNCA, you will use telnet to login to the
    servers bulldog.unca.edu, candler.cs.unca.edu,
    and the engineering server.engr.unca.edu

3
Internet Applicationstelnet For Remote Login
  • Ways to access telnet
  • From a DOS window
  • From the run window in Windows
  • From a browser
  • telnet//login_name_at_server_name
  • telnet//reiser_at_candler.cs.unca.edu

4
Internet Applicationsftp For Moving Files
  • ftp remote_host_name
  • Internet application
  • Used to move files to or get files from a remote
    computer
  • At UNCA, you will use ftp to move files to the
    servers bulldog.unca.edu, candler.cs.unca.edu,
    and the engineering server.engr.unca.edu

5
Internet Applicationsftp For Moving Files
  • Ways to access ftp
  • From a DOS window
  • From the run window in Windows
  • From a browser
  • ftp//login_name_at_server_name
  • ftp//reiser_at_candler.cs.unca.edu
  • What would happen if you used
  • ftp//candler.cs.unca.edu

6
UNIX File System
  • Hierarchical
  • Contains files
  • Text files
  • Special files
  • Standard I/O Keyboard, Display
  • Device files
  • Directories

7
File Structure - Hierarchical
8
Paths
  • Relative
  • newDirectory
  • newDirectory/myFiles/homework1.doc
  • Absolute
  • /usr/users/reiser/newDirectory
  • /usr/users/reiser/newDirectory/myFiles/homework1.d
    oc

9
Commands mkdir
  • Make a directory
  • mkdir newDirectory
  • Makes a new directory named newDirectory as a
    child of the current directory

10
Commands rmdir
  • Remove a directory
  • rmdir newDirectory
  • Removes a directory named newDirectory.
  • If specified as a relative path (not beginning
    with a /) the directory to be removed must be in
    the current working directory.

11
Commands ls
  • List contents of a directory
  • ls newDirectory
  • Lists the contents of newDirectory
  • ls
  • Lists the contents of the current working
    directory
  • ls a
  • Lists all the contents of the current working
    directory, even the hidden files

12
Commands ls
  • List contents of a directory
  • ls l
  • Lists all the contents of the current working
    directory in a long listing which displays the
    file permissions as well as the owner, group,
    size in bytes, modification date

13
Commands cd
  • Change directory
  • cd // sets current working directory
  • // to your home directory
  • cd otherDirectory
  • // sets current working directory
  • // to otherDirectory

14
Commands cd
  • Change directory
  • cd .. // sets current working directory
  • // to the parent directory or moves
  • // one level up the hierarchy
  • cd ../..
  • // sets current working directory
  • // to 2 levels up the hierarchy

15
Commands mv
  • Move or rename a file
  • mv file1.txt file1.html
  • // renames file1.txt to file1.html
  • mv file1.txt newDirectory/file1.html
  • // moves file1.txt to newDirectory/file1.html

16
To do
  • telnet into your account
  • Display your home directory. What directories
    exist in your home directory?
  • Do you have a public_html directory?
  • If not, create a directory under your home
    directory and call it public_html

17
To do
  1. Change directories into your public_html
    directory.
  2. Change back to your home directory.
  3. Change to the root directory.
  4. Change back to your home directory.
  5. Create a subdirectory called junk
  6. Change into junk and create two subdirectories
    j1 and j2.
  7. Remove j1, j2 and junk.

18
File Permissions
  • The various flavors of UNIX including LINUX and
    OS/X store permissions for every file.
  • There are three independent permissions
  • Read
  • Write
  • Execute
  • You can change permissions for your files.

19
File Permissions for Directories
  • The various flavors of UNIX including LINUX and
    OS/X store permissions for every directory.
  • There are three independent permissions
  • Read - read names in a directory
  • Write - make changes (create, move, copy, remove)
  • Execute - search the directory (cd into it)
  • You can change permissions for your directories.

20
Permissions an octal representationchmod
permissions file
  • Read 4 100
  • Read Write 6 110
  • Read Execute 5 101
  • Read Write Execute 7 111
  • Write 2 010
  • Write Execute 3 011
  • Execute 1 001

21
chmod permissions file
  • Each file has three sets of permissions
  • Permission modes exist for
  • you your_group world
  • rwx rwx rwx
  • chmod 777 myWideOpenFile
  • chmod 744 myOtherFile
  • chmod 700 mySecretFile

22
Displaying File Permissions
  • ls -l
  • -rw-r--r-- 1 mmasuser staff 20788 15 Dec
    1414 Adobe SVG 3.0 Installer Log
  • drwx------ 19 mmasuser staff 646 21 Jan
    1453 Desktop
  • drwx------ 21 mmasuser staff 714 16 Jan
    1513 Documents
  • drwx------ 29 mmasuser staff 986 11 Nov
    1409 Library
  • drwx------ 17 mmasuser staff 578 27 Nov
    1955 Movies
  • drwx------ 4 mmasuser staff 136 9 Oct
    1352 Music
  • drwx------ 5 mmasuser staff 170 19 Dec
    1927 Pictures
  • drwxr-xr-x 4 mmasuser staff 136 9 Oct
    1330 Public
  • drwxr-xr-x 5 mmasuser staff 170 9 Oct
    1330 Sites

23
In class
  • Do you have a directory under your home directory
    named public_html?
  • If not, create a directory under your home
    directory and call it public_html
  • Set file permissions for public_html
  • chmod 755 /public_html
  • Change directories into your public_html
    directory. Create a new directory named 172.
  • Create 3 subdirectories of 172 Assignment1,
    Assignment2, and Assignment3.
Write a Comment
User Comments (0)
About PowerShow.com