how to use

copy files to system

sudo cp files/{,} /usr/local/bin/


#from . import nextcloud
import nextcloud

add function in ~/.bashrc

ncu() { "${1:--}" --user nextcloud_accoun --password nextcloud_password -v

install dependency

sudo apt install -y xsel xclip 
sudo pip install pyperclip keyring

apply ~/.bashrc

source ~/.bashrc

upload files to nextcloud in shell

chchang@hqdc039:~$ ncu server.cfg
OCS request: GET {'headers': {'OCS-APIREQUEST': 'true'}}
DAV request: PUT /server.cfg
Headers: {'X-OC-MTIME': '1623721838'}
DAV status: 201
OCS request: POST {'data': {'shareType': 3, 'path': '/server.cfg'}, 'headers': {'OCS-APIREQUEST': 'true'}}
OCS response: apps/files_sharing/api/v1
Share link URL:




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Recapitulation of Price Go Up AMA event held at AMA LOVERS CLUB

CS371p Fall 2021: John Mackie : Final Entry

[ENG] Dark Forest: Round 2

The DevOps tool arsenal: Results from ~100 DevOps/SRE surveys

Spiking Out a GUI Employee Time Clock

Zoom Notifications To Monitor Your Apps

The “New Scrum Master” Starter Pack

The Bootstrap Grid

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eric Chang

Eric Chang

More from Medium

How to make RSelenium work on macOS Monterey with Docker

Apple Pages app review

Storing Amazon SES Tracking Events directly in Mysql (RDS) Reduced our Load by 40%

How RChilli + Oracle HCM Cloud Help CHROs Automate Recruitment?

RChilli Resume Parser & Oracle HCM Cloud Profile Import Plugin