摘要:
1.) yum install -y vsftpd 2.) useradd -g ftp -s /sbin/nologin afcupload (默认生成/home/afcupload, 可使用 -d参数自定义主目录生成位置) 3.) passwd afcupload 4.) chgrp -R ft 阅读全文
摘要:
1.) 显示文件夹下各个文件大小(包含目录和文件) du -hs * 2.) shell校验日期格式有效性 阅读全文
摘要:
static unsigned char bcd_decimal(unsigned char bcd){return bcd-(bcd >> 4)*6;} static unsigned char decimal_bcd(unsigned char decimal){return (unsigned 阅读全文
摘要:
vc环境: 结构的首地址必须是结构内最宽类型的整数倍地址; 另外,结构体的每一个成员起始地址必须是自身类型大小的整数倍 ( 需要特别注意的是windows下是这样的,但在linux的gcc编译器下最高为4字节对齐) gcc、vc设置紧缩结构 #pragma pack(push, 1) typedef 阅读全文
摘要:
1 #include 2 #include 3 #include 4 5 using namespace std; 6 7 HANDLE sem_add, sem_subtract; 8 9 int val(0); 10 11 unsigned int __stdcall add(void* lpa) 12 { 13 printf("add\n"); 14... 阅读全文
摘要:
1 #include <iostream> 2 #include <stdio.h> 3 #include <sstream> 4 5 using namespace std; 6 7 int main(int argc, char **argv) 8 { 9 int ret(0); 10 11 s 阅读全文
摘要:
1 #include <iostream> 2 #include <sstream> 3 4 using namespace std; 5 6 int main(int argc, char **argv) 7 { 8 string line; 9 while (getline(cin, line) 阅读全文
摘要:
1 #include <stdio.h> 2 #include <string.h> 3 #include <errno.h> 4 5 #include <iostream> 6 7 #include <sys/socket.h> 8 #include <netdb.h> 9 #include <a 阅读全文
摘要:
1 #include <iostream> 2 #include <sstream> 3 #include <map> 4 5 #include <stdio.h> 6 #include <errno.h> 7 #include <string.h> 8 9 #include <sys/socket 阅读全文