Gerador de number list v2
Publicado por Thiago Gallo 29/03/2005
[ Hits: 4.864 ]
Esse é um simples gerador de number list de 6 digitos, peguei o código original do in54no e fiz algumas modificações, pra deixar ele mais pratico :P
#include <stdio.h> #include <sys/stat.h> int arqExiste(char*); // by t6 int main ( int argc, char **argv ) { FILE *pFile; int i; char key; if ( argc != 2 ) { printf("%s: creates a 6 digit number list in an output file.\nfile argument missing\nusage: %s FILE.\n", argv[0], argv[0]); exit(-1); } if ( arqExiste(argv[1]) ) { printf("ERROR: file \"%s\" already exists, overwrite? (y/n): ", argv[1]); while ( (tolower(key) != 'y') && (tolower(key) != 'n') ) key = getchar(); if ( tolower(key) == 'n' ) exit(-1); } if ( (pFile = fopen(argv[1],"w+")) == NULL ) { printf("ERROR on file opening, could not create output file\n"); exit(-1); } for ( i = 0; i <= 999999; i++) fprintf( pFile, "%06d\n", i ); printf("list created\n"); fclose(pFile); return(0); } int arqExiste ( char *nomeArq ) { struct stat argEstado; return( stat(nomeArq, &argEstado) == 0 ); }
Listando processos via /proc/PID
Dangerous Tux Game com gráficos
Gerenciamento de Área de Alocação Dinâmica (Listas Encadeadas)
Nenhum coment�rio foi encontrado.
Comparação entre os escalonadores BFQ e MQ-Deadline (acesso a disco) no Arch e Debian
Conciliando o uso da ZRAM e SWAP em disco na sua máquina
Servidor de Backup com Ubuntu Server 24.04 LTS, RAID e Duplicati (Dell PowerEdge T420)
Visualizar câmeras IP ONVIF no Linux sem necessidade de instalar aplicativos
Como instalar o Telegram Desktop no Ubuntu 24.04
Overclocking Permanente para Drastic no Miyoo Mini Plus
Problemas de chaves (/usr/share/keyrings) no Debian
Converter os repositórios Debian para o novo formato com as chaves
Primeiras impressões do Debian 13 (8)
como resolver o problema de som do linux mint mate (4)