store file permissions and apply them elsewhere

asdf asdf vindicator00 at gmail.com
Sat Jan 5 23:49:24 EET 2008


apoti eida h python exei interfacing me chmod opote
8a einai eftikto . Oso gia ta perierga file names sthn prokeimenh periptwsh
den me apasxolei toso
ka8ws 8elw polu default files kai sunepws polu default pathnames .thnx


On Jan 5, 2008 1:33 PM, Giorgos Keramidas <keramida at ceid.upatras.gr> wrote:

> On 2008-01-05 12:58, asdf asdf <vindicator00 at gmail.com> wrote:
> > H erwthsh einai :
> >
> > an uparxei tropos na apo8hkeusei kapoios ta file permissions enos
> > system kapou kai katopin na ta metaferei kai na ta kanei apply se
> > kapoio allo susthma ( pou trexei paromoio distro )
> >
> > Yparxei kapoio etoimo tool gia na to kanei auto ?  H kalutera na
> ftiaxtei
> > kapoio script ?
>
> Είναι εύκολο να γράψεις ένα Python script που το κάνει αυτό.
>
> Θα μπορούσε π.χ. να είναι ένα script που «μετασχηματίζει» μια λίστα από
> filenames σε μία λίστα από tuples:
>
>    [ filename ] -> [ (filename, uid, gid, mode) ]
>
> Ενας εύκολος τρόπος να τρέξει ένα τέτοιο script θα ήταν:
>
>    tiamat# find /etc | filemeta.py > /root/filemeta.dat
>    tiamat# scp /root/filemeta.dat marduk:
>
>    marduk# cat /root/filemeta.dat | filemeta.py -R
>
> Το serialization από τα filenames στην output λίστα θα έχει λίγο γέλιο,
> αν θες να υποστηρίξεις οποιοδήποτε χαρακτήρα στο filename αλλά δεν είναι
> κάτι αδύνατον.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.hellug.gr/pipermail/linux-greek-users/attachments/20080105/86cf5b07/attachment.htm>


More information about the Linux-greek-users mailing list