Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[RISOLTO] Gestione file linux
View unanswered posts
View posts from last 24 hours
View posts from last 7 days

 
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano
View previous topic :: View next topic  
Author Message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Mon Dec 19, 2011 8:52 am    Post subject: [RISOLTO] Gestione file linux Reply with quote

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
Back to top
View user's profile Send private message
darkmanPPT
Veteran
Veteran


Joined: 13 Apr 2006
Posts: 1069
Location: vi/bo

PostPosted: Mon Dec 19, 2011 10:53 am    Post subject: Reply with quote

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
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Mon Dec 19, 2011 10:55 am    Post subject: Reply with quote

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

Uso ext4!
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Mon Dec 19, 2011 12:27 pm    Post subject: Reply with quote

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:
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Mon Dec 19, 2011 12:31 pm    Post subject: Reply with quote

Quote:
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...
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Mon Dec 19, 2011 12:38 pm    Post subject: Reply with quote

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:
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Mon Dec 19, 2011 12:42 pm    Post subject: Reply with quote

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!
Back to top
View user's profile Send private message
djinnZ
Advocate
Advocate


Joined: 02 Nov 2006
Posts: 4831
Location: somewhere in L.O.S.

PostPosted: Mon Dec 19, 2011 1:15 pm    Post subject: Reply with quote

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:
Back to top
View user's profile Send private message
UnoSD
Apprentice
Apprentice


Joined: 27 Jun 2011
Posts: 273

PostPosted: Mon Dec 19, 2011 1:21 pm    Post subject: Reply with quote

Tutto chiaro, grazie ancora!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Forum italiano (Italian) Forum di discussione italiano All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum