Visualizzazione dei risultati da 1 a 4 su 4

Discussione: [C] Ricerca

  1. #1

    [C] Ricerca

    Sto cercando di capire come si fa in C a cercare i nomi esatti di dei file ed, eventualmente, eseguirli. Al limite, mi basta sapere come fare per la questione della ricerca, grazie a chi risponde
    Powered by Linux

    "Windows cerca di fare Unix e ci riesce male, Red Hat cerca di fare Windows e ci riesce benissimo" (Jimmy Olgeni)

  2. #2
    Utente di HTML.it L'avatar di pdpmpd
    Registrato dal
    Jan 2003
    Messaggi
    448
    per vedere i file in una directory devi "leggere" la directory con readdir (questo lo trovi su linux, su win non so) o scandir (è un po' più complesso).
    se vuoi eseguire un binario devi forkare ed usare execve.
    tutto questo funziona su linux (e su unix in generale), su winzozz non so.
    Drug misuse is not a disease, it is a decision, like the decision to step out in front of a moving car. [...] In this particular life-style the motto is "be happy now because tomorrow you are dying", but the dying begins almost at once, and the happiness is a memory.

  3. #3
    Utente di HTML.it L'avatar di pdpmpd
    Registrato dal
    Jan 2003
    Messaggi
    448
    con readdir ti devi fare tutto il ciclo di lettura, con scandir gli passi una funzione con cui controllare i files.
    Drug misuse is not a disease, it is a decision, like the decision to step out in front of a moving car. [...] In this particular life-style the motto is "be happy now because tomorrow you are dying", but the dying begins almost at once, and the happiness is a memory.

  4. #4
    Grazie 1000
    Powered by Linux

    "Windows cerca di fare Unix e ci riesce male, Red Hat cerca di fare Windows e ci riesce benissimo" (Jimmy Olgeni)

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.