随笔分类 - 工作中遇到的函数
摘要:.tar: 只打包,不压缩文件。 解包:tar xvf Name.tar 打包:tar cvf Name.tar dirName .gz: 只压缩,不打包文件 解压:gunzip Name.gz 解压2:gzip -d Name.gz 压缩:gzip Name .tar.gz: 打包压缩文件 解包:
阅读全文
摘要:在普通的挂载里面都正常,但是挂载到阵列上面就报错:stat: Value too large for defined data type 解决办法:在项目的所有的头文件之前加 #define _FILE_OFFSET_BITS 64
阅读全文
摘要:创建一个文本文件,写入一下内容 DEL /F /A /Q \\?\%1RD /S /Q \\?\%1 修改位暴力删除.bat 使用:把想删除的文件拖到暴力破解.bat上面
阅读全文
摘要:#include <io.h>#include <stdio.h>#include <iostream>using namespace std;int ReadStationID(char(*id)[50]){ struct _finddata_t c_file; long hFile; char
阅读全文
摘要:vasprintf pthread_getspecific pthread_once pthread_key_delete thread_setspecific pthread_key_create strdup realloc
阅读全文
摘要:time(2) #include <time.h> time_t time(time_t *timep);//获取当前时间距离1970-01-01 00:00:00 经历的秒数 p = struct tm *localtime(const time_t *timep);//根据上边timep的值计算
阅读全文
摘要:pthread_create()创建的线程没有执行,试了好几遍。非常郁闷。后来发现主线程没有睡眠,新创建的线程还没来的及执行主线程就退出了,所以没有执行。
阅读全文
摘要:sem_init() #include <semaphore.h> int sem_init(sem_t *sem, int pshared, unsigned int value); SEE ALSO sem_destroy(3), sem_post(3), sem_wait(3), sem_ov
阅读全文
摘要:tcgetattr() tcsetattr() tcflush() tcgetattr, tcsetattr, tcsendbreak, tcdrain, tcflush, tcflow, cfmakeraw, cfgetospeed, cfgetispeed, cfsetispeed, cfset
阅读全文
摘要:RAND_MAX 指的是 C 语言标准库 <stdlib.h> 中定义的一个宏。经预编译阶段处理后, 它展开为一个整数类型的常量表达式。RAND_MAX 是 <stdlib.h> 中伪随机数生成函数 rand 所能返回的最大数值。 ISO IEC 9899 2011 (C11)标准中未规定 RAND
阅读全文
摘要:F_GETFL 我的理解是file get flag #include <stdio.h>#include <fcntl.h>#include <unistd.h> int main(){ int flag; int fd = open("2.txt",O_RDWR); if(-1 == fd) p
阅读全文