2013年7月23日

cp命令

摘要: #include #include #include #define BUFFERSIZE 4096#define COPYMODE 0644void oops(char *, char *);main(int ac, char *av[]){ int in_fd, out_fd, n_chars; char buf[BUFFERSIZE]; if ( ac != 3) //check args { fprintf(stderr, "usage: %s source destination\n", *av); exit(1); } //open files if ((in_ 阅读全文

posted @ 2013-07-23 17:25 wolflion 阅读(444) 评论(0) 推荐(0) 编辑

who命令

摘要: who1.c#include #include #include #include #define SHOWHOST /*include remote machine on output*/show_info(struct utmp *utbufp){ printf("% -8.8s", utbufp->ut_name);//the logname printf(" ");//a space printf("% -8.8s", utbufp->ut_line);//the tty printf(" ") 阅读全文

posted @ 2013-07-23 15:00 wolflion 阅读(416) 评论(0) 推荐(0) 编辑

导航