磁盘粉碎机
磁盘文件粉碎机 - 豆丁网#Äã¿ÉÒÔ½«Ëü·Åµ½DOSĿ¼Ï£¬×÷ΪDOSµÄÍⲿÃüÁîʹÓᣠʹÓøñʽΪ£ºC:\\>XDEL ÎļþÃû¡´»Ø³µ¡µ XDELÊÇÒ»¸öÊ®·ÖΣÏÕµÄÃüÁʹÓÃʱÐèҪʮ·ÖСÐÄ£¬Ò»Ê§×㽫³Éǧ¹ÅºÞ!¹Ê´ËXDELÔÚÿɾ³ýÒ»¸öÎļþʱ¾ù¸ø³öÒ»¸öÈ·ÈÏÐÅÏ¢ÈçÏ£º Are you sure? ¼üÈëY±íʾɾ³ý£¬¼üÈëN±íʾ²»É¾³ý¡£ XDEL.CµÄÔ´³ÌÐòÈçÏ£º #include \"dos.h\" ª¤#include \"stdio.h\" ª¤#include \"stdlib.h\" ª¤#include \"io.h\" ª¤#include \"fcntl.h\" ª¤#include \"string.h\" ª¤#include \"mem.h\" ª¤#define SIZE 1024 ª¤main(int argc,char *argv) ª¤{ FILE *fp; ª¤ int fd,fsize,fnum; ª¤ char *buf; ª¤ int ch; ª¤ if(argc!=2) { printf(\"\\nUsage: c:\\\\>xdel filename.ext\\n\"); exit(1); ª¤ printf(\"\\nAre you sure?\"); ch=getce(); ª¤ if ((ch!=\'y\')&&(ch!=\'Y\')) exit(1); ª¤ if((access(argv,0))==-1) { printf(\"\\nFile %s does not exist.\\n\",argv); exit(1); ª¤ _chmod(argv,1,FA_HIDDEN); ª¤ if ((fd=_open(argv,O_RDWR))==-1) { printf(\"\\nCan not open file %s.\\n\",argv); exit(1); ª¤ fsize=filelength(fd); ª¤ fnum=fsize/SIZE+1; ª¤ memset(buf,\'\\0\',SIZE); ª¤ do { write(fd,buf,SIZE);--fnum; } while(fnum>0); ª¤ close(fd); ª¤ fp=fopen(argv,\"w\"); ª¤ fclose(fp); ª¤ rename(argv,\"@\"); ª¤ unlink(\"@\"); ª¤} ±¾³ÌÐòÔÚAST 386/25ÉÏTURBO C 2.0°æϵ÷ÊÔͨ¹ý¡£ (³É¶¼ ³ÉÎļÑ)。