Computer Literacy Lecture 3: Basic Commands of UNIX - PowerPoint PPT Presentation

1 / 18
About This Presentation
Title:

Computer Literacy Lecture 3: Basic Commands of UNIX

Description:

(the character '&' here indicates that the mule. editor will be open in another window) ... Save and exit mule. Check whether the file was successfully created ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 19
Provided by: JUS9
Category:

less

Transcript and Presenter's Notes

Title: Computer Literacy Lecture 3: Basic Commands of UNIX


1
Computer LiteracyLecture 3 Basic Commands of
UNIX
Fall 2005
UEC Academic Skills I
  • International Student Center
  • The University of Electro-Communications
  • Tokyo Japan
  • 2005

2
Basic Commands in Unix
  • pwd ? Shows the current working
  • directory

3
Basic Commands in Unix
  • ls al ? List all folders and files with
  • details

4
Basic Commands in Unix
  • more file_name ? View a file page by page (Use
    q
  • to quit)
  • cat file_name ? View the content of a file at
    once
  • less file_name ? View the content of a file
  • (Use q to quit)
  • cd dir_name ? Change directory
  • mkdir dir_name ? Make directory
  • rmdir dir_name ? Remove directory
  • rm file_name ? Remove/delete file

5
Basic Commands in Unix
  • finger ? List all users that are logged in.
  • (this command works at Hawk at IPC use the
    command who)

hawk.fedu.uec.ac.jp finger
6
Basic Commands in Unix
  • List all users that are logged in at IPC use the
    command who

echo-1 who
7
Basic Commands in Unix
  • finger user_name ? Show information about the
    users accounts that contain the specified name
    as part of the real-name of the user

hawk.fedu.uec.ac.jp finger suzuki
8
Redirection command (gt, gt!, gtgt)
Another way to use more command
9
Task 1 finger user_name more
  • -  Login to hawk server using ssh command
  • - finger suzuki gt s1.txt
  • (check the file s1.txt using more).

10
Task 1 finger user_name more
  • - finger Bing gtgt s1.txt
  • (check the file s1.txt using more).

11
Task 1 finger user_name more
  • - finger lu gt! s1.txt
  • (check the file s1.txt using more).

12
File Transfer Protocol (FTP)
The two main commands in FTP -  get copy one
file from a remote computer (ftp server). -  put
copy one file from your current location to a
remote computer (ftp server).
Fig 1 FTP commands usage
13
File Transfer Protocol (FTP)
Note -  to use a ftp server, should have a user
account at that server -  After
transferring files, close the ftp session by
typing bye -  del delete remote file
14
Task 2 Create file ipc_ftp_1.txt using the
mule editor at IPC
  • ipcmule ipc_ftp_1.txt
  • (the character here indicates that the
    mule
  • editor will be open in another window).
  • - Type any text in the ipc_ftp_1.txt file.
    Save and exit mule
  • Check whether the file was successfully
    created
  • ipcls al
  • Check the content of file ipc_ftp_1.txt
  • ipcless ipc_ftp_1.txt

15
Task 3 Transfer a file from IPC to hawk
  • -Put the created file (ipc_ftp_1.txt) into hawk
    server.
  • ipcftp hawk.fedu.uec.ac.jp
  • (type your username and password)
  • ftpgt put ipc_ftp_1.txt
  • ftpgt bye (or quit)
  • -Login to hawk and check if the file was
    successfully transferred.
  • ipcssh -l f05 hawk.fedu.uec.ac.jp
  • hawkls al
  • hawkless ipc_ftp_1.txt

16
Task 4 Create a file in hawk
  • Login to hawk server ssh -l f04
    hawk.fedu.uec.ac.jp
  • Create the file finger gt! hawk_ftp_1.txt
  • Check the content of the created file less hawk
    _ftp_1.txt
  • Task 5 Transfer a file from hawk to IPC
  • Get the file, hawk_ftp_1.txt from hawk
  • ftp hawk.fedu.uec.ac.jp (type your username and
    password)
  • ftpgt get hawk_ftp_1.txt
  • ftpgt bye (or quit)
  • Check if the file was successfully transferred to
    IPC and check its content.
  • ls al
  • less hawk_ftp_1.txt

17
Task 6 Transfer the file hawk_ftp_1.txt with
its name changed to hawk_ftp_2.txt from hawk to
IPC.
  • Task 6-A
  • Make the following changes in the file just
    transferred to IPC (hawk_ftp_1.txt)
  • Write Modified file as the title of the file
    hawk_ftp_1.txt using the mule editor.(modify the
    file at hawk)
  • mule hawk_ftp_1.txt
  • Save the changes and leave mule editor. Also
    logout from hawk

18
Task 6-B Get file hawk_ftp_1.txt from hawk
  • ftp hawk.fedu.uec.ac.jp
  • ftpgtget hawk_ftp_1.txt hawk_ftp_2.txt
  • ftpgtbye (or quit)
  • Check whether the file was successfully
    transferred to IPC and check its content.
  • ls al
  • less hawk_ftp_2.txt
  • Check the difference between the two files
    hawk_ftp_1.txt and hawk_ftp_2.txt using,
  • diff hawk_ftp_1.txt hawk_ftp_2.txt
Write a Comment
User Comments (0)
About PowerShow.com