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

1 / 17
About This Presentation
Title:

Computer Literacy Lecture 3: Basic Commands of UNIX

Description:

Computer Literacy. Lecture 3: Basic Commands of UNIX. UEC Academic Skills I ... The University of Electro-Communications. Tokyo Japan. 2005. Basic Commands in Unix ... – PowerPoint PPT presentation

Number of Views:67
Avg rating:3.0/5.0
Slides: 18
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
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 allows to
get one file from a remote computer (ftp
server). -  put allows to put one file from your
current location to a remote computer (ftp
server). Note-1 To use a ftp server, should
have a user account at that server Note-2
After transferring files, close the ftp session
by typing bye.
Fig 1 FTP commands usage
13
Task 2 Create file ipc_ftp_1.txt using the
mule editor at IPC
  • mule ipc_ftp_1.txt (because of command
    prompt can be used without closing the opened
    file).
  • - Type any text in the ipc_ftp_1.txt file.
    Save and exit mule
  • - Check whether the file was successfully
    created with ls al
  • - Check the content of the file ipc_ftp_1.txt
    with less ipc_ftp_1.txt

14
Task 3 Transfer a file from IPC to hawk
  • -Put the created file (ipc_ftp_1.txt) into hawk
    server.
  • ftp 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.
  • ssh -l f04 hawk.fedu.uec.ac.jp
  • ls al
  • less ipc_ftp_1.txt

15
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

16
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

17
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