1 / 15

ATS Programming Short Course I

ATS Programming Short Course I. INTRODUCTORY CONCEPTS. Essential Unix Commands. …the second half. Tuesday, Feb 3 rd , 2009. df -. Disk space Free. Shows amount of free disk space. Examples:. (1)>. (2)>. (3)>. df –k /dev/ devicename. Command example 2. Command example 3.

eara
Download Presentation

ATS Programming Short Course I

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. ATS Programming Short Course I INTRODUCTORY CONCEPTS Essential Unix Commands …the second half Tuesday, Feb 3rd, 2009

  2. df - Disk space Free Shows amount of free disk space. Examples: (1)> (2)> (3)> df –k /dev/devicename Command example 2 Command example 3 Report the amount of free space in kilobytes on the specified device. Command example 2 description. Command example 3 description.

  3. du - Disk Usage Show how much disk space is being used. Examples: (1)> (2)> (3)> du –k directoryName Command example 2 Command example 3 Display the amount of space used by directoryName in kilobytes. Command example 2 description. Command example 3 description.

  4. ps - ProcesS Show processes. Examples: (1)> (2)> (3)> ps -ef Command example 2 Command example 3 List all processes in long format. Command example 2 description. Command example 3 description.

  5. kill - KILL a command Terminates a running job/process. Examples: (1)> (2)> (3)> kill processID1 kill -9 processID6 Command example 3 Kills the command identified by processID1. Kills processID6 forcefully. Ie, if processID6 is not responding to the kill signal, the -9 give the kill signal a bit more weight. Command example 3 description.

  6. tar - Tape ARchive Bundle (tar) files together. Examples: (1)> (2)> (3)> tar cvf dir1.tar ./dir1 tar rvf filename.tar ./dir3 tar xvf filename.tar Creates a tar file called dir1.tar with the contents of dir1. verbose. Appends contents of dir3 in already existing tar file, filename.tar. Verbose. Extracts contents of filename.tar. The output is structured as it was put in.

  7. gzip - Gnu(?) ZIP Zip a file (compress) Examples: (1)> (2)> (3)> gzip filename.tar Command example 2 Command example 3 Compresses filename.tar, resulting in the file filename.tar.gz Command example 2 description. Command example 3 description.

  8. gunzip - Gnu(?) UNZIP Unzip a gzipped file. Examples: (1)> (2)> (3)> gunzipfilename.tar.gz Command example 2 Command example 3 Uncompresses the above file. Leaves filename.tar Command example 2 description. Command example 3 description.

  9. man - MANuel page Show the manuel page for a command. Examples: (1)> (2)> (3)> man ls Command example 2 Command example 3 Display lots of information about the ls command. Command example 2 description. Command example 3 description.

  10. lpq - Line Printer Queue Display the items in the printer queue. Examples: (1)> (2)> (3)> lpq –P printerName Command example 2 Command example 3 Displays queue information (jobID’s) for printer printerName. Command example 2 description. Command example 3 description.

  11. lpr - Line PRinter Send a job (file) to be printed. Examples: (1)> (2)> (3)> lpr –P printerNamefileName Command example 2 Command example 3 Send fileName to be printed on the printer PrinterName. Command example 2 description. Command example 3 description.

  12. lprm - Line Printer ReMove Remove a job that has been sent to a printer. Examples: (1)> (2)> (3)> lprm –P printerNamejobID Command example 2 Command example 3 Removes the print job identified by jobID from printerName’s queue. Command example 2 description. Command example 3 description.

  13. echo - ECHO to output Display to screen. Examples: (1)> (2)> (3)> echo ${SHELL} Command example 2 Command example 3 Displays the value of the variable ${SHELL} Command example 2 description. Command example 3 description.

  14. find - FIND files Search for files by filename. Examples: (1)> (2)> (3)> find . \! –name ‘[A-Z]*’ -print find /work –name chapter1 -print Command example 3 Find all files in the current directory that don’t begin with a capital letter. Find all files under the directory /work that are named chapter1. Command example 3 description.

  15. grep - ? Look for files containing text patterns (Note: text patterns in the file contents as opposed to filename). Examples: (1)> (2)> (3)> grep –l ‘^#include’ /usr/include/* Command example 2 Command example 3 List all files under /usr/include that contain at least one #include directive. Command example 2 description. Command example 3 description.

More Related