Lecture 2 CSCI 510 - the Stat structure
Aug 25 Links
- Previous Lecture -
- Index -
- Next Lecture -
-
- The string library
- /usr/include/string.h
- strings in C
- strlen
- strcmp
- strncmp
- strcat
- strncat
- strcpy
- strchr
- strstr
- strpbrk
- strspn
- strcspan
- strtok
- strerror
- close
- unlink
- creat
- stdio.h
- getchar macro
- file sharing
- dup and dup2
- < Stat Structure (stat.h) >
- st\_mode
- < filetype >
- < stat, fstat, lstat system calls >
- [Readings:]
-
- [Assignment:]
- Create a file with a hole in it and check the file size with "ls -s".
- Get a copy of hole.c, compile and run it.
- cp /class/csci510/Examples/hole.c . // copy files
- cp /class/csci510/Examples/ourhdr.h .
- cc hole.c // Compile the program
- a.out // Create the file file.hole
- Use man to see what "ls -s" tells you.
- Use "ls -s file.hole.
- Use "cp file.hole file2" to create another copy and then use "ls -s file2".
- Use "wc" (wordcount on both of these files.
- Previous Lecture -
- Index -
- Next Lecture -
URL = http://www.cs.sc.edu/~matthews/Courses/784/Lectures/lec2.html