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