1 / 3

Basic Unix commands (vs. DOS)

Basic Unix commands (vs. DOS). cat file Concatenate or type out a file cat file1 file2 ... Type out a number of files cd directory1 Change current directory to directory1 cd /usr/bin Change current directory to /usr/bin cd Change back to your home directory

julie
Download Presentation

Basic Unix commands (vs. DOS)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Basic Unix commands (vs. DOS) • cat file Concatenate or type out a file cat file1 file2 ... Type out a number of files • cd directory1 Change current directory to directory1 cd /usr/bin Change current directory to /usr/bin cd Change back to your home directory • clear Clear the current screen • cp file1 file2 Copy file1 to file2 cp file1 file2 ... dir Copy a number of files to a directory • ls List the files in the current directory ls /usr/bin List the files in the /usr/bin directory • lpr file1 Print file1 out lpr file1 file2 ... Print a number of files out • more file Look at the content of a file with paging, use ‘q’ to get out • mkdir directory Create a directory • mv file1 file2 Move file1 to file2, like rename. mv file1 file2 ... dir Move a number of files into a directory mv dir1 dir2 Move or rename a directory

  2. 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 • rm file Remove a file rm file1 file2 ... Remove a number of files rm -r directory Remove a directory include the sub-directory • rmdir directory Remove a directory

  3. Who, When, Why, What and Where? • man cp Display on-line manual for the “cp” command man -k keyword Display manual help file related to the keyword • passwd Change your login password • pwd Display the path name of where you are • uptime Tell you how long the machine has been up and running • users Tell you who is logging in • who Tell you who is logging-in in detail • w Tell you who is logging in and doing what! • whoami Show you the owner of this account • finger user Find out the personal information of a user finger name Try to find the person’s info. by his/her name finger email-address Try to find the person’s info across the network • write user Write a message on somebody’s screen • talk user Talk to the person logging in the same system with you • talk email-address Talk to somebody logging in the network • date Display today’s time and date • cal year Display the calendar of the specified year (e.g. 1997)

More Related