Basic Unix Commands

1,413 views

Published on

Published in: Technology
1 Comment
2 Likes
Statistics
Notes
No Downloads
Views
Total views
1,413
On SlideShare
0
From Embeds
0
Number of Embeds
24
Actions
Shares
0
Downloads
0
Comments
1
Likes
2
Embeds 0
No embeds

No notes for slide

Basic Unix Commands

  1. 1. Basic Unix commands (vs. DOS) <ul><li>cat file Concatenate or type out a file </li></ul><ul><li>cat file1 file2 ... Type out a number of files </li></ul><ul><li>cd directory1 Change current directory to directory1 </li></ul><ul><li>cd /usr/bin Change current directory to /usr/bin </li></ul><ul><li>cd Change back to your home directory </li></ul><ul><li>clear Clear the current screen </li></ul><ul><li>cp file1 file2 Copy file1 to file2 </li></ul><ul><li>cp file1 file2 ... dir Copy a number of files to a directory </li></ul><ul><li>ls List the files in the current directory </li></ul><ul><li>ls /usr/bin List the files in the /usr/bin directory </li></ul><ul><li>lpr file1 Print file1 out </li></ul><ul><li>lpr file1 file2 ... Print a number of files out </li></ul><ul><li>more file Look at the content of a file with paging, use ‘q’ to get out </li></ul><ul><li>mkdir directory Create a directory </li></ul><ul><li>mv file1 file2 Move file1 to file2 , like rename. </li></ul><ul><li>mv file1 file2 ... dir Move a number of files into a directory </li></ul><ul><li>mv dir1 dir2 Move or rename a directory </li></ul>
  2. 2. <ul><li>rm file Remove a file </li></ul><ul><li>rm file1 file2 ... Remove a number of files </li></ul><ul><li>rm -r directory Remove a directory include the sub-directory </li></ul><ul><li>rmdir directory Remove a directory </li></ul>DOS Command Unix Command Descriptions CD cd Change directory CHKDSK du Disk usage CLS clear Clear the current screen COPY cp Copying files DEL rm Removing files or directories DIR ls File listing of directories MD mkdir Create a directory MORE more Type out a file with paging PRINT lpr Print out a file RD rmdir Remove a directory RENAME mv Moving files around TYPE cat Type out files
  3. 3. Who, When, Why, What and Where? <ul><li>man cp Display on-line manual for the “cp” command </li></ul><ul><li>man -k keyword Display manual help file related to the keyword </li></ul><ul><li>passwd Change your login password </li></ul><ul><li>pwd Display the path name of where you are </li></ul><ul><li>uptime Tell you how long the machine has been up and running </li></ul><ul><li>users Tell you who is logging in </li></ul><ul><li>who Tell you who is logging-in in detail </li></ul><ul><li>w Tell you who is logging in and doing what! </li></ul><ul><li>whoami Show you the owner of this account </li></ul><ul><li>finger user Find out the personal information of a user </li></ul><ul><li>finger name Try to find the person’s info. by his/her name </li></ul><ul><li>finger email-address Try to find the person’s info across the network </li></ul><ul><li>write user Write a message on somebody’s screen </li></ul><ul><li>talk user Talk to the person logging in the same system with you </li></ul><ul><li>talk email-address Talk to somebody logging in the network </li></ul><ul><li>date Display today’s time and date </li></ul><ul><li>cal year Display the calendar of the specified year (e.g. 1997) </li></ul>

×