filefrag


Namefilefrag JSON
Version 0.0.2 PyPI version JSON
download
home_pageNone
Summaryexamine fragments of files in the filesystem
upload_time2024-10-19 20:09:06
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # filefrag

Python library to get FIE and command line tool

## Install

See [the video](https://asciinema.org/a/681791) for a demo including installing
from source, but you can install with pip:

```sh
pip install filefrag
```

## Usage

Run `pyfilefrag` on the command line. See `--help` for details. It has
`--verbose`, and `--json` outputs for your parsing pleasure.

To use the library, just call filefrag.FileMap('/path/whatever') to build a map
of the extents in the file using ioctl’s interface. Then you can poke about in
the guts of a file:

* ⛓️‍💥 inspect fragmentation
* 🔍 find out where data is on your physical drive
* 🟰 compare extents between paths
* 📔 use them as dict keys
* 🕳️ check files for holes, like before and after hole punching
* ✅ verify your deduplication strategy, write your own stats tool
* 💩 dump file layouts to json (`print(f"{filemap:j}"`)
* ⚠️ break your disk because you believed the outputs of this alpha release!

Comes with a Device class to do comparisons, so it ought to work with fragments
in files on different mountpoints, bind mounts and so on (unfortunately not
snap’s FUSE mounts; they’re far too abstract and piped in via a socket)

## Example

```python
from filefrag import FileMap

mapping = FileMap('/usr/bin/bash')

print(mapping)
print(extents)
```


            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "filefrag",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": null,
    "author_email": "Gareth Davidson <gaz@bitplane.net>",
    "download_url": "https://files.pythonhosted.org/packages/88/b2/49bd255904d3b5c6f3cb55b09551ede7c8c4e9de399ae6aab616d5c80815/filefrag-0.0.2.tar.gz",
    "platform": null,
    "description": "# filefrag\n\nPython library to get FIE and command line tool\n\n## Install\n\nSee [the video](https://asciinema.org/a/681791) for a demo including installing\nfrom source, but you can install with pip:\n\n```sh\npip install filefrag\n```\n\n## Usage\n\nRun `pyfilefrag` on the command line. See `--help` for details. It has\n`--verbose`, and `--json` outputs for your parsing pleasure.\n\nTo use the library, just call filefrag.FileMap('/path/whatever') to build a map\nof the extents in the file using ioctl\u2019s interface. Then you can poke about in\nthe guts of a file:\n\n* \u26d3\ufe0f\u200d\ud83d\udca5 inspect fragmentation\n* \ud83d\udd0d find out where data is on your physical drive\n* \ud83d\udff0 compare extents between paths\n* \ud83d\udcd4 use them as dict keys\n* \ud83d\udd73\ufe0f check files for holes, like before and after hole punching\n* \u2705 verify your deduplication strategy, write your own stats tool\n* \ud83d\udca9 dump file layouts to json (`print(f\"{filemap:j}\"`)\n* \u26a0\ufe0f break your disk because you believed the outputs of this alpha release!\n\nComes with a Device class to do comparisons, so it ought to work with fragments\nin files on different mountpoints, bind mounts and so on (unfortunately not\nsnap\u2019s FUSE mounts; they\u2019re far too abstract and piped in via a socket)\n\n## Example\n\n```python\nfrom filefrag import FileMap\n\nmapping = FileMap('/usr/bin/bash')\n\nprint(mapping)\nprint(extents)\n```\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "examine fragments of files in the filesystem",
    "version": "0.0.2",
    "project_urls": null,
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bd8d3436419818cc98d6e72e39e0fa28b52073e7818e2c752ad054952913f287",
                "md5": "135d2f68459dc16d84698d21d9dbb87c",
                "sha256": "a4f98fe5dfd08cc73e4e5d0b221b2864ba01d46fa5a17ed58c9c6fa0c4212cba"
            },
            "downloads": -1,
            "filename": "filefrag-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "135d2f68459dc16d84698d21d9dbb87c",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 9011,
            "upload_time": "2024-10-19T20:09:04",
            "upload_time_iso_8601": "2024-10-19T20:09:04.960289Z",
            "url": "https://files.pythonhosted.org/packages/bd/8d/3436419818cc98d6e72e39e0fa28b52073e7818e2c752ad054952913f287/filefrag-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "88b249bd255904d3b5c6f3cb55b09551ede7c8c4e9de399ae6aab616d5c80815",
                "md5": "4eed076ab956f834639c176f0ca09524",
                "sha256": "8c6ecdfc4f4f25476d8f9e312397f987f0208c4d7600ef63e3322d5d50939b18"
            },
            "downloads": -1,
            "filename": "filefrag-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "4eed076ab956f834639c176f0ca09524",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 7860,
            "upload_time": "2024-10-19T20:09:06",
            "upload_time_iso_8601": "2024-10-19T20:09:06.837742Z",
            "url": "https://files.pythonhosted.org/packages/88/b2/49bd255904d3b5c6f3cb55b09551ede7c8c4e9de399ae6aab616d5c80815/filefrag-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-19 20:09:06",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "filefrag"
}
        
Elapsed time: 0.72581s