Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial Unix Command & Makefile CIS 5027

Similar presentations


Presentation on theme: "Tutorial Unix Command & Makefile CIS 5027"— Presentation transcript:

1 Tutorial Unix Command & Makefile CIS 5027
Professor: Dr. Shu-Ching Chen TA: Yimin Yang

2 Outline Log in Unix Basic Commands Shell script Makefile

3 How to log in Download putty from download.html PuTTY is a free implementation of Telnet and SSH for Windows and Unix platforms

4 Connect to the server The host is margay.cs.fiu.edu 1 2 3 4

5 Log in / Account information
Login as : Your FIU username Password : Your first initial + PantherID + Your last initial For exmaple, Steven Jackson with PID should have password s j

6 Commands about Files (1)
ls : list the contents of your current directory. Format Options -a : list all the files include the hidden ones -l : list not only the files name but also the related info -t : list the contents by modified date ls [option] [directory][file]

7 Commands about Files (2)
pwd : print out the current working directory cd : change directory cd . (.) means the current directory C (..) means the parent of current directory Cd cd with no argument will return you to your home directory cd . cd .. cd Use the commands cd, ls and pwd to explore the file system.

8 Commands about Files (3)
cp : copy files Format Options -i : It can be used to avoid overwriting the original file -r : Copy the folder and all the files and subfolders under it. mv : move a file from one place to another or rename a file. cp [option] File1 File2 mv File1 File2

9 Commands about Files (4)
mkdir : making directory Format rm : remove files or directories Option -i : ask before actually delete -r : delete the folders and all the files and subfolders under it mkdir Directory_name rm [option] file1 file2 file3…

10 Commands about Files (5)
test : A command in Unix that evaluates conditional expressions. Format or The functions will return true if the object exist or the condition specified is true. File functions -d Filename : Filename is a directory -s Filename : Filename has a size greater than 0 -f Filename : Filename is a regular file test expression [ expression ]

11 Commands about File’s contents (1)
cat : display the contents of a file on the screen Format head : display the first ten lines of a file to the screen tail : display the last ten lines of a file to the screen cat file1 head –n file1 tail –n file1

12

13 Commands about File’s contents (2)
wc : word count Format Options -w : find out how many words the file has -l : find out how many lines the file has wc [options] file

14 Commands about File’s contents (3)
grep : It searches files for the specified words or patterns. Format: Options: -c : Display the number of columns which satisfied the pattern. -i : Ignore case distinctions in both the PATTERN and the input files. -v : Invert the sense of matching, to select non-matching lines. grep [options] [pattern] file

15 Pipe : It cause the execution of multiple processes from one single line
A | B | C

16 Commands about File’s contents (4)
sort : sort lines of text files Format sort [option] file


Download ppt "Tutorial Unix Command & Makefile CIS 5027"

Similar presentations


Ads by Google