Reference no: EM132216509
Write a UNIX command compsize that takes two files as input, compares their sizes and determines which fie has bigger size than the other by printing out a message: "file1 is greater than file2."
please write full C lanugae code using unix command and use command line argument.
Note: int stat(const char *pathname, struct stat *buf);
struct stat {
dev_t st_dev; /* ID of device containing file */
ino_t st_ino; /* inode number */
mode_t st_mode; /* file type and mode */
nlink_t st_nlink; /* number of hard links */
uid_t st_uid; /* user ID of owner */
gid_t st_gid; /* group ID of owner */
dev_t st_rdev; /* device ID (if special file) */
off_t st_size; /* total size, in bytes */
blksize_t st_blksize; /* blocksize for filesystem I/O */
blkcnt_t st_blocks; /* number of 512B blocks allocated */
........
};