[GRASS-dev] Hardlinking raster map files

Nikos Alexandris nik at nikosalexandris.net
Thu May 24 09:57:58 PDT 2018


* Helmut Kudrnovsky <hellik at web.de> [2018-05-22 23:54:32 -0700]:

>NikosAlexandris wrote
>> Dears,
>>
>> before creating the HPC related Wiki,
>>
>> I would like to ask for your advise on hard-linking raster maps files.
>>
>> Soeren suggested this as a tip, I understand to save time and space.
>> Hard-linking was also mentioned inside the JEODPP (JRC) team at some
>> point.
>>
>> I have implemented hard-linking raster maps in
>> https://gitlab.com/NikosAlexandris/r.internal.sh.
>> It's a shell script, does not compile. Will convert in Python, if useful.
>>
>> If you hard-link files, how do you perform it?
>> If of your interest, what do you think about it?
>> What would be important considerations to pay attention to?
>> Would you name such a module differently?
>> Would you consider soft-linking in addition or instead of?
>> Would you add  a "dry-run" option (as in "don't do anything, just show
>> what you want to do")?
>>
>> Thank you, Nikos
>>
>> _______________________________________________
>> grass-dev mailing list
>
>> grass-dev at .osgeo
>
>> https://lists.osgeo.org/mailman/listinfo/grass-dev
>>
>> signature.asc (235 bytes)
>> <http://osgeo-org.1560.x6.nabble.com/attachment/5365206/0/signature.asc>
>
>Would this be portable to other operating systems than linux Like e.g.
>windows?

I wouldn't know, it depends (also) on the underlying file system.
While it works for my purpose, I would like to avoid common wrong-doings.

Reading about it (Wikipedia and else), I understand that it is doable.
The Python 2 function `os.link()` [0] is marked with
"Availability: Unix.". I don't know how easy it is to implement it.
Support for Windows was added after 3.2 [1]. I guess it concerns
NTFS.

[0] https://docs.python.org/2.7/library/os.html?highlight=os%20link#os.link
[1] https://docs.python.org/3.5/library/os.html?highlight=os.link#os.link

I regret for not writing in Python. It seems to me harder to implement
and maintain such a in Bash. Will convert for sure as soon as I find the time.

Cheers, Nikos
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20180524/7091635c/attachment.sig>


More information about the grass-dev mailing list