{"id":18746223,"url":"https://github.com/stastnypremysl/rfstools","last_synced_at":"2025-10-17T13:27:18.440Z","repository":{"id":179611199,"uuid":"507289799","full_name":"stastnypremysl/rfstools","owner":"stastnypremysl","description":"Mirror of https://gitlab.com/rfs4/rfstools - Remote file system tools for data manipulation between remote /and local host/ (cp, mv, ls, rm,..) written in Python3. This package provides you executables pcp, pls, pmv,..., which enables you to do painless data operations.","archived":false,"fork":false,"pushed_at":"2024-04-08T13:39:07.000Z","size":165,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-12-28T20:27:36.580Z","etag":null,"topics":["command-line-tool","fs","ftp","ftps","python","sftp","smb"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stastnypremysl.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2022-06-25T11:14:59.000Z","updated_at":"2023-06-22T07:41:02.000Z","dependencies_parsed_at":"2023-07-11T09:15:38.625Z","dependency_job_id":null,"html_url":"https://github.com/stastnypremysl/rfstools","commit_stats":null,"previous_names":["stastnypremysl/rfstools"],"tags_count":53,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stastnypremysl%2Frfstools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stastnypremysl%2Frfstools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stastnypremysl%2Frfstools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stastnypremysl%2Frfstools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stastnypremysl","download_url":"https://codeload.github.com/stastnypremysl/rfstools/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239628385,"owners_count":19671070,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","fs","ftp","ftps","python","sftp","smb"],"created_at":"2024-11-07T16:22:12.397Z","updated_at":"2025-10-17T13:27:13.391Z","avatar_url":"https://github.com/stastnypremysl.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# rfstools\nRemote file system tools for data manipulation between remote and local host (cp, mv, ls, rm,..) written in Python3. \nThis package provides you executables `pcp`, `pls`, `pmv`,..., which enables you to do painless data operations on remote/between remote and local host using SFTP/FTP/FTPS/SMB12(SMB version 1 or 2)/SMB23(SMB version 2 or 3)/FS(local file system) protocols.\n\nFurthermore, you can enable data re-encoding during data transfer (CRLF/LF and character re-encoding). \n\n\n## Installation\nThe `rfstools` tool can be installed using `pip` from [the PyPI public registry](https://pypi.org/project/rfstools/).\n\n    pip install rfstools\n\n\n## Documentation\nThe documentation can be found in autogenerated repository [rfstools-docs](https://gitlab.com/rfs4/rfstools-docs).\n\n\n## Configuration\nArguments can be passed to `rfstools` commands in multiple ways - configuration file, environment variable, and standard command line argument.\n\nIf an argument is specified in more than one place, then the\ncommand line argument overrides the environment variable which overrides the config file\nvalue which overrides the default value.\n\nArguments that start with '--' can be set in a config file -\n/etc/rfstools.conf or ~/.rfstools.conf or specified via -c. Config file\nsyntax allows: key=value, flag=true, stuff=[a,b,c] (for details, see syntax at\nhttps://goo.gl/R74nmi). \n\nDetails about concrete commands can be found in [rfstools-docs/commands](https://gitlab.com/rfs4/rfstools-docs/-/tree/master/commands?ref_type=heads).\n\n\n## Examples\nIn further subchapters, there are examples of solving some of the basic tasks using this tool. Only the first chapter contains the configuration file setup...in the others, it can be done analogically.\n\n### Copy a file from a SMB2 server to the local host\nFirst of all, we need to set up the configuration file.\n\n    cat \u003e /some-path/rfstools.conf \u003c\u003c EOF\n    connection-type=SMB12\n    \n    # For SMB we always need to say, which remote folder we use.\n    service-name=special-folder\n\n    host=speciserver-smb.cz\n    username=speciman\n\n    password=mysecret\n\n    EOF\n\nAfter that, we set up an environment variable `RFSTOOLS_CONFIG`, so the tool knows, which configuration file should it use.\n\n    export RFSTOOLS_CONFIG=/some-path/rfstools.conf\n\nFinally, we run\n\n    pcp r:/some-path2/file ./\n\n### Downloading all files from remote folder /etc ending with .conf\n\n    pcp r:/etc/*.conf ./\n\n### Listing all subfolders in some folder\n\n    pls r:/some-path/*/\n\n### Recursive copying of remote folder to local\n\n    pcp -r r:/folder ./\n\n### Moving all remote temporary files in /tmp to local host tmp\n\n    pmv r:/tmp/* /tmp\n\n### Cross-copying (using local and remote files) to the remote host\n\n    pcp r:/file1 /file2 r:/target-folder\n\n### Deletion of all remote files (with directories) ending with .tmp\n\n    prm -r r:/**/*.tmp\n\n### Copying greped files to the local host\n\n    pls -p r:/some-path | grep \"^.*/SOME_REGEX$\" | xargs pcp -t /target-folder \n\n### Recoding from CRLF to LF while copying from remote host to local host\n\n    export RFSTOOLS_REMOTE_CRLF=TRUE\n    pcp -X r:/crlf-file ./lf-file\n\n### Recoding from local UTF8 file to UTF16 remote encoding while copying\n    \n    export RFSTOOLS_REMOTE_ENCODING=UTF16\n    pcp -X ./utf8-file r:/utf16-file\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstastnypremysl%2Frfstools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstastnypremysl%2Frfstools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstastnypremysl%2Frfstools/lists"}