Title: Computer Literacy Lecture 4: UNIX Commands
1Computer Literacy Lecture 4 UNIX Commands
UEC Academic Skills I
- International Student Center
- The University of Electro-Communications
- Tokyo Japan
- 2005
2Objectives.
- Learn to use Unix OS efficiently
- Create multiple windows and do multiple tasks
simultaneously - Transfer multiple files at once rather than one
by one - Improve the security by using secured shell (ssh
command) - Improve the article writing skills
- Learn to use the network printer
3Creating an extra window.
Command xterm
4Task 1 Create files in IPC and transfer to hawk
- Create files
- IPC date gt IPC_ftp_2.txt
- IPC who gt IPC_ftp_3.txt
5Task 1 Create files in IPC and transfer to hawk
- Check the contents of each file.
- IPC less IPC_ftp_2.txt
- IPC less IPC_ftp_3.txt
6Task 1 Create files in IPC and transfer to hawk
- Put created files (.txt) into hawk using mput
- ipc ftp hawk.fedu.uec.ac.jp
- (enter user name and password)
- ftpgt mput .txt
- ftpgt by (or quit)
7Put created files (.txt) into hawk using mput
8Task 1 Cont.
- Check if the files were successfully transferred
- ssh to hawk
- ipc ssh l user_id hawk.fedu.uec.ac.jp
- hawk ls al
- Check the content of the transferred files
- hawk less IPC_ftp_2.txt
- hawk less IPC_ftp_3.txt
9Task 2- Create files in hawk and transfer them to
IPC using mget
- ssh to hawk, create two files and logout from
it - ftp to hawk and get those two files using mget
command. - Note Follow steps similar to Task 1
10Secure Shell Commands
- Login to a remote server ssh -l user_id
host_name - hawk ssh l suzuki hotel-1.edu.cc.uec.ac.jp
Commands to transfer files to the remote
server (similar to put in ftp) scp
file_name user_id_at_host_name from the remote
server (similar to get in ftp) scp
user_id_at_host_namefile_name new_file_name
11Secure Shell Commands
- Important
- To access IPC servers (hotel-1,2,35,and
golf-1,2,35) from another system different to
IPC system (like hawk), you should use the
following hostname pattern(It is possible to
use any of the above server names at IPC instead
of hotel-1 below) - Â hotel-1.edu.cc.uec.ac.jp
12- Task 3
- Copy file IPC_ftp_2.txt with name changed to
IPC_ftp_2_new.txt (in hawk) and transfer it to
IPC using scp - hawk cp IPC_ftp_2.txt IPC_ftp_2_new.txt
- hawk scp IPC_ftp_2_new.txt user_id_at_host_name
- Task 4
- Transfer the file IPC_ftp_3.txt, from IPC to
hawk, with the name changed to IPC_ftp_3_new.txt
using scp. - hawk scp user_id_at_host_name IPC_ftp_3.txt IPC
_ftp_3_new.txt
13Task 5 Write two articles about Your first
impression of UEC and Your first impression of
Japan
- Count the number of words in the article use
- wc file_name
14Print the Content of a File
- Commands
- ipc lpr Pname_of_the_printer file_name
- This will print the file to the desired printer.
- Ex printing a file using the printer at the IPC
room 2 - ipc lpr Plp2a file_name
- ipc lpr Plp2b file_name
- ipc lpq Pname_of_the_printer
- This will show the list of jobs in the queue for
the printer including the job numbers and size of
the files. - Ex ipc lpq Plp2a
15Print the Content of a File
- ipc lprm Pname_of_the_printer job_number
- This will remove the indicated pending job from
the queue of a particular printer.
- Task 6
- Submit the hard copies of the 2 articles Your
first impression of UEC and Your first
impression of Japan.