Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index International Gentoo Users Forum italiano (Italian) Forum di discussione italiano
  • Search

[RISOLTO] Gestione file linux

Tutte le discussioni direttamente correlabili all'informatica e/o a GNU/*nix.

Moderator: ago

Post Reply
  • Print view
Advanced search
9 posts • Page 1 of 1
Author
Message
UnoSD
Apprentice
Apprentice
Posts: 273
Joined: Mon Jun 27, 2011 12:45 am

[RISOLTO] Gestione file linux

  • Quote

Post by UnoSD » Mon Dec 19, 2011 8:52 am

Salve a tutti,

so che è una domanda un po' sciocca, ma non me la sono mai fatta prima d'ora e adesso non trovo risposta su internet:

Come funziona la gestione dei file su Linux? Perché se apro un file e mentre lo sto visualizzando, lo cancello, riesco ancora a vederlo fino alla fine?

È perché ho solo cancellato il nome dell'i-node e il programma continua a leggere dal disco? Se è così, se io sovrascrivo quell'area mentre lo sto guardando cosa succede?

Grazie.
Last edited by UnoSD on Mon Dec 19, 2011 1:21 pm, edited 1 time in total.
Top
darkmanPPT
Veteran
Veteran
User avatar
Posts: 1069
Joined: Thu Apr 13, 2006 2:18 pm
Location: vi/bo

  • Quote

Post by darkmanPPT » Mon Dec 19, 2011 10:53 am

Linux in realtà non c'entra un bel niente.
quel che c'entra è il Filesystem che stai usando!

ext3, ext2, FAT, FAT32, ntfs, xfs, etc... si comportano tutti in modo diverso.
c'è chi ha gli Inode e chi non gli ha.
chi ha una struttura ad albero e chi è sequenziale (leggasi FAT).

ordunque, rispondere alla tua domanda non è semplice.
ti interessa sapere qualcosa in particolare su qualche filesystem?

in generale, ti dico, wikipidia è ben fatta sui filesystem più importanti (come descrizione e funzionamento).
se invece stai cercando dei tool, esattamente cosa vorresti?
Darkman
Top
UnoSD
Apprentice
Apprentice
Posts: 273
Joined: Mon Jun 27, 2011 12:45 am

  • Quote

Post by UnoSD » Mon Dec 19, 2011 10:55 am

È vero, ho dimenticato l'elemento fondamentale... È stata una distrazione, non ignoranza :)

Uso ext4!
Top
djinnZ
Advocate
Advocate
User avatar
Posts: 4831
Joined: Thu Nov 02, 2006 12:47 pm
Location: somewhere in L.O.S.
Contact:
Contact djinnZ
Website

  • Quote

Post by djinnZ » Mon Dec 19, 2011 12:27 pm

CONFIG_FHANDLE=Y
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Top
UnoSD
Apprentice
Apprentice
Posts: 273
Joined: Mon Jun 27, 2011 12:45 am

  • Quote

Post by UnoSD » Mon Dec 19, 2011 12:31 pm

If you say Y here, a user level program will be able to map file names to handle and then later use the handle for different file system operations. This is useful in implementing userspace file servers, which now track files using handles instead of names. The handle would remain the same even if file names get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2) syscalls.
Io non l'ho settata però i file li legge lo stesso anche quando li cancello...
Top
djinnZ
Advocate
Advocate
User avatar
Posts: 4831
Joined: Thu Nov 02, 2006 12:47 pm
Location: somewhere in L.O.S.
Contact:
Contact djinnZ
Website

  • Quote

Post by djinnZ » Mon Dec 19, 2011 12:38 pm

era per metterti sulla strada.
A quel che ricordo il descrittore ed il lock restano associati all'inode anche dopo la cancellazione.
Più che dal filesystem (inteso come struttura) dipende dal caching del kernel, impostazioni come fhandle e dal codice che lo gestisce (mantenere di fatto l'area del file bloccata aumenta la frammentazione).
Prova ad aprire un file video di una ventina di GB e cancellalo. Vedrai che dopo un poco si blocca.
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Top
UnoSD
Apprentice
Apprentice
Posts: 273
Joined: Mon Jun 27, 2011 12:45 am

  • Quote

Post by UnoSD » Mon Dec 19, 2011 12:42 pm

Ah, ok, quindi era come immaginavo!

Ma come mai funziona se nel mio kernel non è settata? (non settata la mette lui automaticamente a y?)

Grazie della risposta comunque!
Top
djinnZ
Advocate
Advocate
User avatar
Posts: 4831
Joined: Thu Nov 02, 2006 12:47 pm
Location: somewhere in L.O.S.
Contact:
Contact djinnZ
Website

  • Quote

Post by djinnZ » Mon Dec 19, 2011 1:15 pm

Se la usi ti consente di non avere problemi se rinomini il file o se lo sposti.

Altrimenti è come quando li cancelli adesso e continui ad accedere solo fino a che le informazioni raccolte te lo consentono.
scita et risus abundant in ore stultorum sed etiam semper severi insani sunt:wink:
mala tempora currunt...mater stultorum semper pregna est :evil:
Murpy'sLaw:If anything can go wrong, it will - O'Toole's Corollary:Murphy was an optimist :wink:
Top
UnoSD
Apprentice
Apprentice
Posts: 273
Joined: Mon Jun 27, 2011 12:45 am

  • Quote

Post by UnoSD » Mon Dec 19, 2011 1:21 pm

Tutto chiaro, grazie ancora!
Top
Post Reply
  • Print view

9 posts • Page 1 of 1

Return to “Forum di discussione italiano”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic